Driving video generation method and device, electronic equipment and vehicle
By monitoring vehicle speed and curve data in real time, the system automatically identifies triggering conditions and generates driving videos, solving the problems of low efficiency and insufficient information in existing driving video generation technologies. This enables automated video capture of the driving process and the presentation of information-rich driving videos.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- VOYAH AUTOMOBILE TECH CO LTD
- Filing Date
- 2026-03-30
- Publication Date
- 2026-06-19
AI Technical Summary
Existing in-vehicle systems are inefficient in generating driving videos and have limited information content. They lack the ability to automatically capture and generate videos of exciting moments during driving, especially in high-speed or mountain driving scenarios.
By monitoring vehicle speed and curve data in real time, the system automatically identifies triggering conditions and extracts video clips, integrates vehicle trajectory and road information to generate driving videos, and presents them in a bird's-eye view and picture-in-picture format, thus achieving automated generation of driving videos.
It improves the convenience and efficiency of driving video generation, increases the information content of the videos, provides a driving experience that is both entertaining and informative, and meets users' sharing needs.
Smart Images

Figure CN122248112A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video generation technology, and in particular to a driving video generation method, apparatus, electronic device, and vehicle. Background Technology
[0002] With the rapid development of intelligent vehicles and autonomous driving technology, the application scenarios of in-vehicle cameras have gradually expanded from traditional driver assistance to the field of personalized user experience.
[0003] In high-speed driving, mountain road driving, or extreme driving scenarios, users often want to record and share memorable moments during the driving process. Existing in-vehicle systems mainly revolve around vehicle monitoring and data collection, such as generating video streams from images collected in real time by in-vehicle cameras and sensors. Users then need to manually operate based on the video stream or edit it post-production to generate driving videos. However, this video generation method is inefficient, and the amount of information in the driving videos is limited. Summary of the Invention
[0004] This application provides a driving video generation method, apparatus, electronic device, and vehicle to improve the convenience and efficiency of driving video generation and increase the information content of the video.
[0005] In a first aspect, embodiments of this application provide a method for generating driving videos, including:
[0006] Real-time acquisition of vehicle speed and curve data of the driving lane;
[0007] If the driving speed and / or curve data meet the triggering conditions for generating the driving video, then video segments before and after the triggering time period are extracted.
[0008] Obtain the vehicle trajectory and road information corresponding to the video clip;
[0009] Generate driving videos that include vehicle trajectory and road information.
[0010] In one possible implementation, the triggering condition includes:
[0011] The driving speed is greater than or equal to the speed threshold and the duration is greater than the time threshold;
[0012] The number of consecutive curves is greater than or equal to a threshold number, and the number of consecutive curves is obtained based on curve data.
[0013] In one possible implementation, obtaining the number of consecutive curves based on curve data includes:
[0014] Based on curve data and external video data acquired during the same time period as the curve data, the lane curvature of the driving lane is obtained.
[0015] Lanes with a curvature greater than or equal to a curvature threshold are identified as curves.
[0016] The number of consecutive curves is obtained based on curves whose curve spacing is less than or equal to a distance threshold, where the curve spacing is the distance between adjacent curves.
[0017] In one possible implementation, generating a driving video containing vehicle trajectory and road information includes:
[0018] Based on the vehicle's driving trajectory, obtain the map range corresponding to the vehicle's driving trajectory;
[0019] Based on the map range and driving lanes, an electronic map with a bird's-eye view is obtained;
[0020] The vehicle's driving trajectory and dynamic position are overlaid onto a thumbnail map to obtain the target image;
[0021] Dynamic data charts are obtained based on the vehicle's speed, trajectory, and road information in the corresponding video clips.
[0022] Based on the target image and dynamic data charts, a driving video containing vehicle trajectory and road information is generated.
[0023] In one possible implementation, a driving video containing vehicle trajectory and road information is generated based on the target image and dynamic data charts, including:
[0024] Use the target screen as the main screen and the dynamic data charts as the secondary screen;
[0025] The main screen and the secondary screen are processed synchronously using a picture-in-picture format to obtain the target video;
[0026] Based on the target video, a driving video containing vehicle trajectory and road information is generated.
[0027] In one possible implementation, the driving video also includes video clips;
[0028] And / or, the audio corresponding to the driving video uses ambient sound or preset background audio collected by the in-vehicle equipment.
[0029] In one possible implementation, obtaining the vehicle's driving trajectory includes:
[0030] Real-time acquisition of the vehicle's dynamic location and corresponding time stamp;
[0031] The initial trajectory is obtained based on the time stamp and dynamic location;
[0032] Smooth the initial trajectory;
[0033] The smoothed initial trajectory is matched with the electronic map of the lane to obtain the vehicle's driving trajectory.
[0034] Secondly, embodiments of this application provide a driving video generation apparatus, comprising:
[0035] The acquisition unit is used to acquire the vehicle's speed and the curve data of the driving lane in real time.
[0036] The function triggering unit is used to extract video segments before and after the trigger if the driving speed and / or curve data meet the triggering conditions for driving video generation.
[0037] The information reading unit is used to acquire the vehicle's driving trajectory and road information corresponding to the video clip;
[0038] The video generation unit is used to generate driving videos that include vehicle trajectory and road information.
[0039] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0040] The memory stores instructions that the computer executes;
[0041] The processor executes computer execution instructions stored in memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0042] Fourthly, embodiments of this application provide a vehicle, including a vehicle body and the above-mentioned electronic equipment disposed in the vehicle body.
[0043] Fifthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0044] In a sixth aspect, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0045] The driving video generation method, apparatus, electronic device, and vehicle provided in this application provide accurate judgment criteria for automatic triggering by real-time monitoring of driving speed and curve data. When the triggering condition is met, video segments before and after the trigger are extracted to ensure complete capture of the exciting scenes corresponding to the triggering condition. Subsequently, trajectory data and road information synchronized with the video segments are acquired to achieve precise alignment of the image and data. Finally, a driving video with both realistic driving footage and trajectory visualization information is generated. Therefore, this application can automatically identify exciting driving scenes corresponding to triggering conditions, accurately extract video segments, and generate driving videos by fusing trajectory and road information without manual operation, improving the convenience and efficiency of driving video generation, and enhancing the practicality and information richness of the driving video content. Attached Figure Description
[0046] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0047] Figure 1 A flowchart illustrating the driving video generation method provided in this application;
[0048] Figure 2 A schematic diagram of a curve identified in an exemplary embodiment provided in this application;
[0049] Figure 3 A schematic diagram of a driving video generation system using the driving video generation method provided in this application;
[0050] Figure 4 This is a schematic flowchart illustrating an embodiment of the driving video generation method provided in this application implemented through a driving video generation system;
[0051] Figure 5 A schematic diagram of the driving video generation device provided in this application;
[0052] Figure 6 A schematic diagram of the structure of the electronic device provided in this application.
[0053] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0054] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0055] In existing technologies, in-vehicle cameras are mainly used for functions such as driver assistance and driving recording. Capturing and generating videos of exciting moments during driving requires manual operation by the user based on the video stream or post-editing. There is a lack of functionality for automatically capturing and generating videos of exciting moments during driving. When the vehicle speed reaches a certain value or encounters specific road conditions, such as continuous curves, these scenarios often have high viewing and sharing value, but currently there is no effective solution that can automatically identify and generate corresponding exciting videos.
[0056] In addition, existing video generation methods are mostly first-person or fixed-viewpoint, lacking the ability to generate videos from a bird's-eye view (or "God's-eye view"), and have not implemented the combination of driving trajectory with map as a thumbnail, nor have they incorporated dynamic calculation visualization of vehicle trajectory, resulting in insufficient video information and a monotonous visual experience.
[0057] For example, in one solution, video images are acquired using a vehicle-mounted front camera, a video stream is generated from the video images, target features are extracted from the video stream, driving behavior analysis and operational status analysis are performed on the target features to obtain corresponding analysis results, and the analysis results are output. Among them, the target features are license plates or vehicles, the driving behavior analysis is to analyze whether there is a violation of road safety driving rules, and the status analysis is to analyze whether the operation status of the vehicle's external indicator lights is consistent with the driving behavior; thus, dynamic traffic violation behavior is captured based on edge computing.
[0058] As can be seen from the above, existing video generation methods suffer from low efficiency and limited information content in driving videos.
[0059] Therefore, the driving video generation method provided in this application automatically identifies the triggering conditions and extracts video clips by monitoring real-time driving speed and curve data, and integrates the corresponding trajectory and road information to generate a video, thereby improving the convenience and efficiency of driving video generation, as well as the amount of information in the video content.
[0060] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0061] Figure 1 This is a flowchart illustrating the driving video generation method provided in this application, as shown below. Figure 1 As shown, the method includes:
[0062] S101. Real-time acquisition of vehicle speed and curve data of the driving lane.
[0063] Among them, the vehicle's driving speed can be collected in real time by the vehicle speed sensor at a certain sampling frequency (e.g., sampling frequency ≥10Hz). The curve data of the driving lane where the vehicle is located can be obtained in real time by the vehicle's curve detection sensor, such as the curve detection sensor installed under the steering wheel to collect the steering angle, and the curve data of the driving lane can be obtained based on the steering angle.
[0064] This embodiment achieves accurate capture of driving scenarios by acquiring and detecting vehicle speed and lane curve data in real time, which is used to determine whether to trigger the generation of driving videos.
[0065] S102. If the driving speed and / or curve data meet the triggering conditions for generating the driving video, then extract video segments before and after the triggering time period.
[0066] The video clips can be obtained through at least one external vehicle camera. In this embodiment, the video stream of the road surface and surrounding environment captured in real time by the external vehicle camera is preprocessed with noise reduction and image stabilization, and a timestamp (accurate to milliseconds) is added to each frame of video so that video clips before and after the driving video generation is triggered can be extracted. In addition, to ensure that the video has no blind spots and improve the obstruction of video content, an external vehicle camera equipped with a wide-angle lens can be used.
[0067] When the vehicle speed reaches a certain value or encounters specific road conditions, such as consecutive curves, these driving scenarios often have high viewing and sharing value. This embodiment is configured with trigger conditions for generating driving videos corresponding to driving speed and curve data. When the driving speed and / or curve data meet the trigger conditions, the system automatically identifies and acquires video segments of the corresponding time period for subsequent generation of exciting driving videos, eliminating the need for manual user operation and improving the user experience.
[0068] S103. Obtain the vehicle's driving trajectory and road information corresponding to the video clip.
[0069] The vehicle trajectory corresponding to the video clip can be obtained based on trajectory-related data, such as the vehicle's latitude and longitude, direction of travel, and speed. This trajectory-related data can be acquired in real time using a high-precision GPS module (e.g., positioning accuracy ≤ 1 meter). Additionally, road information includes at least the curve data of the corresponding lane in the video clip.
[0070] This embodiment extracts vehicle trajectory and road information that are synchronized with the video clip time, ensuring that the synchronization error between the video clip and the vehicle trajectory and road information is within an allowable range (e.g., less than or equal to 50ms). This achieves precise alignment between the video footage and the vehicle trajectory and road information, providing a synchronization foundation and data support for subsequent fusion and generation of driving videos.
[0071] S104. Generate a driving video containing vehicle trajectory and road information.
[0072] This embodiment integrates real video clips with trajectory maps and road information to generate the final driving video. It achieves a visual combination of real images and data, enhancing the viewing experience and information content of the driving video. Furthermore, the generated driving video can be directly shared, meeting users' social dissemination needs.
[0073] The driving video generation method provided in this application provides accurate judgment criteria for automatic triggering by real-time monitoring of driving speed and curve data; when the triggering condition is met, video segments before and after the trigger are extracted to ensure complete capture of the exciting scenes corresponding to the triggering condition; then, trajectory data and road information synchronized with the video segments are acquired to achieve precise alignment of the image and data; finally, a driving video with both realistic driving footage and trajectory visualization information is generated. It is evident that this application, by automatically identifying exciting driving scenes corresponding to triggering conditions, accurately extracting video clips, and integrating trajectory and road information to generate driving videos, achieves automated identification and capture of driving highlights, deep integration of video content and driving data, and a closed-loop process from acquisition to generation, significantly improving the information richness, viewing experience, and user sharing experience of driving videos.
[0074] In an exemplary embodiment of this application, the triggering condition for generating the driving video is a dual condition, which may specifically include:
[0075] The driving speed is greater than or equal to the speed threshold and the duration is greater than the time threshold;
[0076] The number of consecutive curves is greater than or equal to a threshold number, and the number of consecutive curves is obtained based on curve data.
[0077] This embodiment performs real-time detection of vehicle speed and curve data of the driving lane, compares the driving speed with the corresponding speed threshold and time threshold, compares the number of curves obtained based on the curve data with the number threshold, and determines whether the driving speed and curve data meet the vehicle speed condition and / or curve condition of the triggering condition.
[0078] In addition, the embodiments provided in this application also set a priority of triggering conditions. When both the vehicle speed condition and the curve condition are met, the video is triggered in the order of triggering time, with the moment when the condition is met first being the triggering time. If both conditions are met at the same time, the trigger is only triggered once to avoid duplicate video generation.
[0079] In one embodiment, a speed threshold of 120 mph, a time threshold of 30 seconds, and a quantity threshold of 3 are set. The corresponding trigger conditions for generating the driving video are: a driving speed ≥ 120 mph and a duration ≥ 30 seconds, and / or, a number of consecutive curves ≥ 3. This allows the video generation process to be triggered when the vehicle reaches a speed of 120 mph or encounters 3 or more consecutive curves, automatically generating a 5-minute driving video.
[0080] Thus, the above-mentioned embodiments provided in this application, by limiting the dual triggering conditions of continuous vehicle speed and continuous curve number, achieve accurate automatic identification of two exciting driving scenarios: high-speed driving and complex road conditions, thereby improving the accuracy of triggering and the completeness of scenario coverage.
[0081] In another exemplary embodiment, the step of obtaining the number of consecutive curves based on curve data may specifically include:
[0082] Based on curve data and external video data acquired during the same time period as the curve data, the lane curvature of the driving lane is obtained.
[0083] Lanes with a curvature greater than or equal to a curvature threshold are identified as curves.
[0084] The number of consecutive curves is obtained based on curves whose curve spacing is less than or equal to a distance threshold, where the curve spacing is the distance between adjacent curves.
[0085] In this embodiment, when acquiring continuous curves in the driving lane based on curve data, the system first acquires external video data collected by an external camera. The acquisition time period for this external video data is the same as the time period for acquiring the curve data. Then, an image recognition algorithm (e.g., an edge detection algorithm) is used to combine the external video data and the curve data to identify the lane curvature. Lanes with a curvature greater than or equal to a curvature threshold are determined to have curve characteristics. Further, the distance between adjacent curves is identified, and curves with a distance less than or equal to a distance threshold are identified as continuous curves. Then, based on the number of continuous curves, it is determined whether the corresponding triggering conditions are met. For example, in one embodiment, when ≥3 consecutive curves are detected (each curve curvature ≥0.005m⁻¹, and the distance between curves ≤500 meters), the driving video generation process is triggered.
[0086] Figure 2 A schematic diagram of a curve identified in an exemplary embodiment provided in this application. (See diagram below.) Figure 2 As shown, the curve spacing refers to the actual distance a vehicle travels along the lane centerline between the end of one curve and the beginning of the next. In other embodiments, the curve spacing can also be the straight-line distance between the center points of two curves. Figure 2 The embodiments shown are merely illustrative and do not limit the scope of this application.
[0087] Thus, the above-described embodiments provided in this application identify lane curvature by combining curve data and external video data, and accurately identify continuous curve scenarios using a dual judgment standard of curvature threshold and curve spacing threshold, thereby improving the reliability of triggering conditions and the accuracy of scene recognition.
[0088] In an exemplary embodiment of this application, the step of generating a driving video containing vehicle trajectory and road information may specifically include:
[0089] Based on the vehicle's driving trajectory, obtain the map range corresponding to the vehicle's driving trajectory;
[0090] Based on the map range and driving lanes, an electronic map with a bird's-eye view is obtained;
[0091] The vehicle's driving trajectory and dynamic position are overlaid onto a thumbnail map to obtain the target image;
[0092] Dynamic data charts are obtained based on the vehicle's speed, trajectory, and road information in the corresponding video clips.
[0093] Based on the target image and dynamic data charts, a driving video containing vehicle trajectory and road information is generated.
[0094] In this embodiment, the driving video includes a target image and dynamic data charts. The generation of the target image involves: first, expanding the boundary of the circumscribed rectangle from the start to the end of the vehicle's trajectory to obtain the map range corresponding to the vehicle's trajectory; then, scaling the corresponding area in the electronic map to obtain a bird's-eye view thumbnail map; finally, overlaying the vehicle's trajectory and dynamic position onto the thumbnail map to obtain the target image.
[0095] The generation of dynamic data tables involves obtaining vehicle speed changes over time curves, real-time counts of curves, and cumulative trajectory mileage based on the vehicle's corresponding video clips, creating a visual representation. Additionally, the dynamic data tables can be overlaid with animations of the trajectory calculation process (such as inflection point identification markers and curvature calculation formula pop-ups).
[0096] In one embodiment, the step of generating a driving video including a target image and dynamic data charts may include:
[0097] Based on electronic maps and vehicle driving trajectories, a thumbnail map is generated (fixed viewpoint: bird's-eye view, height 500 meters, covering the entire trajectory range).
[0098] The vehicle's driving trajectory is overlaid on the thumbnail map in a highlighted dynamic form. The trajectory drawing speed is synchronized with the actual driving speed, and the current dynamic position of the vehicle is updated in real time with a dynamic arrow.
[0099] Generate a visualization of the trajectory calculation: display dynamic data charts (such as vehicle speed changing curves over time, real-time counting of the number of curves, and cumulative display of trajectory mileage), and overlay animations of the trajectory calculation process (such as inflection point identification markers and curvature calculation formula pop-ups).
[0100] In this embodiment of the application, the generated video features include: generating a thumbnail map based on the map driving trajectory, overlaying the current vehicle's real-time driving trajectory, and simultaneously generating a dynamic visualization of trajectory calculation; the main body of the video is a thumbnail map, the vehicle is the second perspective, the shooting perspective is a bird's-eye view, that is, a God's-eye view camera position, and based on the content of the vehicle's external camera, GPS trajectory data and map information, it provides users with a driving experience and sharing material that is both entertaining and informative.
[0101] In other embodiments provided in this application, the generation of driving videos can be achieved by accessing the application programming interface of a video processing tool (such as Seedance), uploading video clips and vehicle driving trajectories, and configuring various core request parameters for generating driving videos:
[0102] Basic video parameters: 5 minutes in length, 1920×1080 resolution, 30fps frame rate;
[0103] Map parameters: Thumbnail map range (based on the bounding rectangle of the trajectory start-end point, expanded by 20%), map zoom level (ensuring complete display of the trajectory and surrounding 1km road network);
[0104] Track display parameters: track color (highlighted red, RGB: 255,0,0), track line width 3px, vehicle identifier (dynamic arrow icon, matching driving direction in real time);
[0105] Calculate screen parameters: data visualization type (speed curve, trajectory curvature distribution, curve count), pop-up window position (upper right corner of the video, occupying 1 / 4 of the screen), update frequency 1 second / time.
[0106] In another exemplary embodiment, the driving video can be shared after it is obtained. After the final driving video is generated, it is automatically stored on a cloud server, a download link is generated, and it is pushed to the user via the in-vehicle system or mobile device.
[0107] In addition, users can optimize and share videos through the configured local editing tools (supporting both mobile and PC) on the in-vehicle system or mobile device. These tools allow users to adjust track colors and line widths, hide / show the calculation screen, add track annotations, subtitles, and effects. When sharing, the system automatically generates thumbnails based on key road segments of the track and preset text to enable personalized video generation and sharing.
[0108] The functionality of local editing tools may include:
[0109] Customize the trajectory: Adjust the trajectory color and line width, and add trajectory annotations (such as curve names and maximum speed points);
[0110] Calculation screen editing: Hide / show the calculation screen, adjust the data chart type (line chart / bar chart);
[0111] Additional editing features: Add subtitles (automatically recognize vehicle speed and generate curve information), special effects (track glow, curve highlight), and replace background music.
[0112] One-click sharing function: Supports direct sharing of optimized videos to social media platforms. When sharing, a video thumbnail is automatically generated (using screenshots of key road segments from the map trajectory) and a preset text is attached (such as "My 5-minute high-speed driving trajectory! 120+ km / h throughout, the trajectory is super smooth~").
[0113] Thus, the above-described embodiments provided in this application, by fusing vehicle driving trajectory with electronic map to generate bird's-eye view thumbnail map, and simultaneously overlaying vehicle dynamic position and dynamic data charts, achieve the unity of visual presentation and data expression of the driving process, and improve the information density and visual expressiveness of driving video.
[0114] In another exemplary embodiment, the step of generating a driving video containing vehicle trajectory and road information based on the target image and dynamic data charts may specifically include:
[0115] Use the target screen as the main screen and the dynamic data charts as the secondary screen;
[0116] The main screen and the secondary screen are processed synchronously using a picture-in-picture format to obtain the target video;
[0117] Based on the target video, a driving video containing vehicle trajectory and road information is generated.
[0118] Thus, the above-described embodiments provided in this application achieve the coordinated presentation of driving scenes and data information by setting the dynamic trajectory map as the main screen and the data charts as the secondary screen and merging them synchronously in a picture-in-picture format, thereby enhancing the visual immersion and information richness of driving videos.
[0119] In another exemplary embodiment, the driving video further includes video clips; and / or, the audio corresponding to the driving video is ambient sound or preset background audio collected by an in-vehicle device.
[0120] In this embodiment, the generated driving video includes captured video clips; a thumbnail map generated based on the vehicle's driving trajectory, overlaid with the current vehicle's driving trajectory and dynamic position; and a dynamic visualization of the trajectory calculation is generated simultaneously to form a dynamic data chart.
[0121] The driving video consists mainly of video clips and thumbnail maps, while the audio uses ambient sounds captured by the vehicle's external cameras or preset background audio, providing a driving experience and sharing material that is both entertaining and informative.
[0122] Thus, the above-described embodiments provided in this application, by incorporating real video clips and ambient or background audio into the driving video, achieve an organic combination of the virtual trajectory map on the main screen and the real driving footage of the captured video clips, thereby enhancing the realism, immersion, and viewing experience of the resulting driving video.
[0123] In an exemplary embodiment of this application, the step of obtaining the vehicle's driving trajectory may specifically include:
[0124] Real-time acquisition of the vehicle's dynamic location and corresponding time stamp;
[0125] The initial trajectory is obtained based on the time stamp and dynamic location;
[0126] Smooth the initial trajectory;
[0127] The smoothed initial trajectory is matched with the electronic map of the lane to obtain the vehicle's driving trajectory.
[0128] This embodiment collects the vehicle's dynamic location in real time, including latitude and longitude, driving direction, and other data. The initial trajectory is generated by combining the data with a timestamp. The initial trajectory is then smoothed (using a Kalman filter algorithm to remove outliers) and matched with an electronic map to determine the vehicle's precise location and driving route on the map, thus obtaining the vehicle's driving trajectory.
[0129] It may also include trajectory data preprocessing steps: extracting key nodes of the vehicle's driving trajectory (start point, end point, curve inflection point, speed change point), calculating parameters such as total trajectory length, average curvature, and driving time of each road segment, to provide data support for thumbnail generation and screen calculation.
[0130] Thus, the above-described embodiments provided in this application, through progressive processing of vehicle dynamic position including time synchronization, smoothing, and electronic map matching, achieve the generation of high-precision, low-noise trajectory data, providing a precise location information foundation for subsequent video fusion.
[0131] Figure 3 This is a schematic diagram of a driving video generation system using the driving video generation method provided in this application, as shown below. Figure 3 As shown, the driving video generation system includes an external camera, sensors, and an onboard computing unit. The external camera is used to capture video clips of the vehicle in real time; the sensors are used to acquire the vehicle's speed and curve data of the lane in which the vehicle is traveling in real time; the onboard computing unit is connected to the external camera and sensors and is used to execute a driving video production method based on the video clips, speed, and curve data to obtain the vehicle's driving video.
[0132] In one embodiment, the external cameras include a high-resolution camera (1080P / 60fps) mounted on the front grille of the vehicle and an auxiliary camera (720P / 30fps) mounted on the rear bumper. Multiple external cameras ensure comprehensive coverage of the road surface and surrounding environment; the camera lenses are wide-angle lenses (120° field of view) and are waterproof and image-stabilized.
[0133] The sensors include a vehicle speed sensor, a cornering sensor, and a GPS module. The vehicle speed sensor is integrated into the vehicle's OBD (On-Board Diagnostics) interface, the cornering sensor is installed below the steering wheel (to collect steering angle data) to assist the camera's image recognition, and the high-precision GPS module is installed at the roof antenna location (to ensure unobstructed signal) and supports BeiDou + GPS dual-mode positioning.
[0134] The on-board computing unit is installed in the vehicle's trunk and is connected to the external camera, sensors, and GPS module via a CAN bus to ensure data transmission latency ≤100ms.
[0135] Figure 4 This is a schematic flowchart illustrating an embodiment of the driving video generation method provided in this application implemented using a driving video generation system. Figure 4 As shown, after the vehicle starts, all hardware automatically activates. The external camera captures video streams in real time, and the onboard computing unit performs noise reduction and image stabilization processing, adding a timestamp to each video frame (format: YYYY-MM-DD-HH-MM-SS-MS). The vehicle speed sensor obtains real-time vehicle speed data through the OBD interface, and the curve detection sensor combines lane line recognition from the camera video frames, outputting curve curvature data every 100ms. The GPS module collects latitude, longitude, and driving direction data every 50ms, transmits it to the onboard computing unit, removes positioning noise using a Kalman filter algorithm, and then matches it with the Gaode Map API to generate standardized trajectory data (format: JSON, including timestamp, latitude, longitude, altitude, and driving direction). The trajectory data and video frames are precisely aligned using timestamps to ensure synchronization between the trajectory and the video footage.
[0136] Dual-condition detection is implemented. The onboard computing unit monitors vehicle speed data in real time. When a vehicle speed of ≥120 km / h is detected for 30 seconds, a video generation command is immediately triggered, and the trigger time point T0 is recorded. If the vehicle speed condition is not met, the curve detection data is continuously analyzed. When three curves are identified consecutively (curvature ≥0.005m⁻¹, spacing ≤500 meters), a video generation command is triggered, and the trigger time point T0 is recorded. After triggering, the system automatically locks a 5-minute video segment (T0-1 minute to T0+4 minutes). If the vehicle has been traveling for less than 4 minutes when the trigger is triggered, the subsequent video segment is automatically extended to complete the 5-minute segment after the vehicle stops traveling.
[0137] Video generation. The application programming interface (API) of the video processing tool Seedance 2.0 is automatically invoked to upload a locked 5-minute video clip, trajectory data, and configuration parameters (map range, trajectory display style, and calculation screen type). After receiving the data, the video processing tool performs video fusion processing using an artificial intelligence model.
[0138] Step 1: Parse the trajectory data and generate a thumbnail map (call the Amap static API to obtain map tiles for the trajectory range, with a zoom level of 15).
[0139] Step 2: Generate dynamic trajectories using an animation engine. The trajectory is drawn using Bezier curves for smoothing. The vehicle icons are 3D models (matching the user's vehicle model and can be customized via the mobile app).
[0140] Step 3: Generate a trajectory calculation screen. Calculate the vehicle speed curve and the number of curves in real time based on sensor data. Generate a dynamic chart using Chart.js and overlay an animation of the calculation process (e.g., "Curve recognition: 3rd consecutive curve, curvature 0.008m⁻¹").
[0141] Step 4: Merge the main and secondary screens, synchronize the audio track, and generate the final MP4 format video (bitrate 8Mbps, resolution 1920×1080).
[0142] Once the video is generated, the cloud server stores the video file, generates a download link, prompts the user via a pop-up window on the vehicle's central control screen, and simultaneously pushes it to the linked mobile device.
[0143] Video optimization and sharing. Users receive a download link via their mobile devices. After downloading the video, they can use the built-in editing tools on the mobile app to adjust the trajectory color (e.g., change it to blue), add a caption indicating "maximum speed 135 km / h," and hide the bar chart in the calculation screen. After editing, users can click "One-click sharing," select various social media platforms, and the system will automatically generate a thumbnail (a map screenshot of the longest straight section in the trajectory) with the caption "Three consecutive sharp turns + 120+ km / h throughout, my driving trajectory is so cool! #IntelligentDriving #TrackVideo." After user confirmation, the video can be published directly.
[0144] Therefore, implementing the driving video generation method provided in this application through a driving video generation system has at least the following characteristics.
[0145] First, automatically capture exciting moments: accurately identify exciting scenes such as high-speed driving and continuous curves, and automatically generate 5-minute videos without the need for manual operation by the user, covering the core highlights of the driving process;
[0146] Second, innovative trajectory visualization: Thumbnails are generated based on the map driving trajectory, and vehicle dynamic trajectory and calculation screen are overlaid. This not only presents the driving process, but also intuitively displays driving data, improving the amount of video information and professionalism.
[0147] Third, a unique visual experience: bird's-eye view + picture-in-picture calculation screen, breaking the limitations of traditional first-person view dashcams, combining visual appeal and technological feel, and meeting users' personalized sharing needs.
[0148] Fourth, the accuracy of data support: Based on high-precision GPS and sensor data, the trajectory generation error is ≤1 meter, and the data of the calculated image is accurate in real time, which improves the credibility and practicality of the video.
[0149] Fifth, high degree of freedom optimization: supports custom editing of trajectory and calculation screen to meet the aesthetic and sharing needs of different users;
[0150] Sixth, ease of sharing: The one-click sharing function simplifies the dissemination process, and the automatically generated thumbnails and text enhance the appeal of sharing and increase users' willingness to spread the word.
[0151] Figure 5 This is a schematic diagram of the driving video generation device provided in this application. Figure 5 As shown, the driving video generation device 50 includes:
[0152] The acquisition unit 501 is used to acquire the vehicle's driving speed and the curve data of the driving lane in real time.
[0153] The function triggering unit 502 is used to extract video segments before and after the trigger if the driving speed and / or curve data meet the triggering conditions for driving video generation.
[0154] The information reading unit 503 is used to acquire the vehicle driving trajectory and road information corresponding to the video clip;
[0155] The video generation unit 504 is used to generate driving videos that include vehicle trajectory and road information.
[0156] In one possible implementation, the triggering conditions include: the driving speed is greater than or equal to a speed threshold and the duration is greater than a time threshold; the number of consecutive curves is greater than or equal to a number threshold, and the number of consecutive curves is obtained based on curve data.
[0157] In one possible implementation, the acquisition unit 501 is further configured to obtain the lane line curvature of the driving lane based on the curve data and the vehicle exterior video data acquired in the same time period as the curve data; identify lane positions where the lane line curvature is greater than or equal to a curvature threshold as curves; and obtain the number of consecutive curves based on curves where the curve spacing is less than or equal to a distance threshold, wherein the curve spacing is the distance between adjacent curves.
[0158] In one possible implementation, the video generation unit 504 is further configured to: obtain the map range corresponding to the vehicle's driving trajectory based on the vehicle's driving trajectory; obtain a bird's-eye view thumbnail map based on the map range and the electronic map of the driving lane; overlay the vehicle's driving trajectory and the vehicle's dynamic position onto the thumbnail map to obtain the target image; obtain a dynamic data chart based on the vehicle's driving speed, vehicle driving trajectory, and road information of the corresponding video segment; and generate a driving video containing the vehicle's driving trajectory and road information based on the target image and the dynamic data chart.
[0159] In one possible implementation, the video generation unit 504 is further configured to use the target image as the main image and the dynamic data chart as the secondary image; to use a picture-in-picture format to synchronously process the main image and the secondary image to obtain the target video; and to generate a driving video containing vehicle trajectory and road information based on the target video.
[0160] In one possible implementation, the driving video also includes video clips.
[0161] In one possible implementation, the audio corresponding to the driving video is ambient sound collected by the in-vehicle device or preset background audio.
[0162] In one possible implementation, the acquisition unit 501 is further configured to acquire the dynamic position of the vehicle and the corresponding time stamp in real time; obtain an initial trajectory based on the time stamp and dynamic position; smooth the initial trajectory; and match the smoothed initial trajectory with the electronic map of the lane to obtain the vehicle's driving trajectory.
[0163] The driving video generation device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0164] Figure 6 A schematic diagram of the structure of the electronic device provided in this application. Figure 6 As shown, the electronic device 60 provided in this embodiment includes at least one processor 601 and a memory 602. Optionally, the device 60 further includes a communication component 603. The processor 601, memory 602, and communication component 603 are connected via a bus 604.
[0165] In a specific implementation, at least one processor 601 executes computer execution instructions stored in memory 602, causing at least one processor 601 to perform the above-described method.
[0166] The specific implementation process of processor 601 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0167] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0168] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0169] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0170] This application also provides a vehicle, including a vehicle body and the above-mentioned electronic equipment disposed in the vehicle body.
[0171] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0172] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0173] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0174] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0175] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0176] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0177] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0178] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0179] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0180] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. A method for generating driving videos, characterized in that, include: Real-time acquisition of vehicle speed and curve data of the driving lane; If the driving speed and / or the curve data meet the triggering conditions for driving video generation, then video segments before and after the triggering time period are extracted. Obtain the vehicle trajectory and road information corresponding to the video segment; Generate a driving video containing the vehicle's trajectory and the road information.
2. The driving video generation method according to claim 1, characterized in that, The triggering conditions include: The driving speed is greater than or equal to the speed threshold and the duration is greater than the time threshold; The number of consecutive curves is greater than or equal to a threshold number, which is obtained based on the curve data.
3. The driving video generation method according to claim 2, characterized in that, The number of consecutive curves is obtained based on the curve data, including: Based on the curve data and the external video data acquired in the same time period as the curve data, the lane curvature of the driving lane is obtained. Lanes with a curvature greater than or equal to a curvature threshold are identified as curves; The number of consecutive curves is obtained based on the curves whose curve spacing is less than or equal to a distance threshold, where the curve spacing is the distance between adjacent curves.
4. The driving video generation method according to any one of claims 1 to 3, characterized in that, The generation of a driving video containing the vehicle's trajectory and the road information includes: Based on the vehicle's driving trajectory, the map range corresponding to the vehicle's driving trajectory is obtained; Based on the electronic map of the map area and the driving lane, a bird's-eye view thumbnail map is obtained; The vehicle's driving trajectory and dynamic position are overlaid onto the thumbnail map to obtain the target image; Based on the vehicle's speed corresponding to the video segment, the vehicle's trajectory, and the road information, a dynamic data chart is obtained; Based on the target image and the dynamic data chart, a driving video containing the vehicle's trajectory and road information is generated.
5. The driving video generation method according to claim 4, characterized in that, The step of generating a driving video containing the vehicle's trajectory and road information based on the target image and the dynamic data chart includes: Use the target screen as the main screen and the dynamic data chart as the secondary screen; The main screen and the secondary screen are processed synchronously using a picture-in-picture method to obtain the target video; Based on the target video, a driving video containing the vehicle's trajectory and the road information is generated.
6. The driving video generation method according to claim 5, characterized in that, The driving video also includes the video clips; And / or, the audio corresponding to the driving video is ambient sound collected by the in-vehicle device or preset background audio.
7. The driving video generation method according to any one of claims 1 to 3, characterized in that, The acquisition of the vehicle's driving trajectory includes: The dynamic location and corresponding time stamp of the vehicle are obtained in real time. Based on the time identifier and the dynamic position, the initial trajectory is obtained; The initial trajectory is smoothed. The smoothed initial trajectory is matched with the electronic map of the lane to obtain the vehicle's driving trajectory.
8. A driving video generation device, characterized in that, include: The acquisition unit is used to acquire the vehicle's speed and the curve data of the driving lane in real time. A function triggering unit is used to extract video segments before and after the trigger if the driving speed and / or the curve data meet the triggering conditions for driving video generation. An information reading unit is used to acquire the vehicle's driving trajectory and road information corresponding to the video clip; The video generation unit is used to generate a driving video containing the vehicle's driving trajectory and the road information.
9. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the driving video generation method as described in any one of claims 1 to 7.
10. A vehicle, characterized in that, It includes a vehicle body and an electronic device as described in claim 9 disposed in the vehicle body.