Driving record data processing method, system and electronic device
By adjusting the video frame rate and inserting frames based on vehicle speed, the hardware consumption and playback stuttering issues caused by high frame rates in dashcams have been resolved, achieving energy savings and extending device lifespan.
Patent Information
- Application Number
- CN202310948473.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-31
- Publication Date
- 2026-02-27
- Estimated Expiration
- 2043-07-31
AI Technical Summary
Existing dashcams consume excessive amounts of hardware and energy due to the high density of video frames during vehicle operation, which affects the lifespan of the device and makes it prone to stuttering during playback.
The video frame rate is dynamically adjusted based on the vehicle speed, generating and storing the video and inserting the inserted frames. Timestamps are added to restore the original video frame rate, making reasonable use of storage space and CPU resources.
Without affecting the recording quality, the system reduces hardware and energy consumption, extends device lifespan, and provides smoother playback. The compression level of stored video files is matched to vehicle speed, saving energy.
Smart Images

Figure CN117197922B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of data processing, in particular to a driving record data processing method, a driving record data processing system and an electronic device. BACKGROUND
[0002] The main function of a driving recorder is to record the image outside the vehicle during driving, which can provide evidence for traffic accidents, etc.
[0003] The driving recorder starts working after the vehicle starts, receives video data sent by the camera and stores it. Generally, the more dense the video frames of a video file, the clearer the details recorded by the video file. However, a higher video frame rate puts a heavy burden on the storage space and CPU and other hardware for image processing of the driving recorder. For example, the chip generates heat, and the energy loss is high. For example, because of the heat, the service life of the hardware is reduced, and the possibility of damage is increased.
[0004] Analyzing the driving process of a vehicle does not require high-density video frames in all cases. If the video frame rate is reduced, the energy consumption and service life loss of the hardware can be reduced.
[0005] Therefore, a driving record data processing scheme is needed to generate the demand for video frame rate according to the driving state of the vehicle, compress the video frame rate for storage accordingly, and restore the original video frame rate for playback after the video frame rate is compressed. SUMMARY
[0006] The purpose of the present application is to provide a driving record data processing method, a driving record data processing system and an electronic device, which at least solve one of the above technical problems.
[0007] The present application provides the following scheme:
[0008] According to one aspect of the present application, a driving record data processing method is provided, which comprises:
[0009] Collecting original video data of a driving record along with the movement of a vehicle;
[0010] Obtaining the driving speed of the vehicle;
[0011] According to the driving speed of the vehicle, the video frame rate of the original video is compressed to generate a storage video for storage;
[0012] Obtaining the pixel deviation of adjacent video frames in the storage video;
[0013] Generating an inserted frame according to the pixel deviation of adjacent video frames in the storage video;
[0014] inserting the insertion frame between video frames of the storage video in which the insertion frame is generated, restoring the number of video frames of the original video before compression.
[0015] Further, the compression of the number of video frames of the original video comprises:
[0016] generating encoding rate information according to the vehicle driving speed;
[0017] compressing the number of video frames of the original video according to the encoding rate information to generate the storage video;
[0018] video frame timestamp;
[0019] wherein the timestamp of the storage video corresponds to the timestamp of the original video.
[0020] Further, the compression of the number of video frames of the original video further comprises:
[0021] judging the current vehicle driving speed to compress the number of video frames of the original video;
[0022] if the current vehicle driving speed is greater than 90 km / h, the number of video frames of the storage video remains the number of video frames of the original video;
[0023] if the current vehicle driving speed is less than or equal to 90 km / h and greater than 60 km / h, the number of video frames of the storage video is reduced to 75% of the number of video frames of the original video;
[0024] if the current vehicle driving speed is less than or equal to 60 km / h, the number of video frames of the storage video is reduced to 50% of the number of video frames of the original video.
[0025] According to two aspects of the present application, a driving record data processing system is provided, which comprises a compression storage module and a decompression playback module.
[0026] The compression storage module is configured to generate a storage video after compressing the number of video frames of the original video according to the vehicle driving speed, and store the storage video.
[0027] The decompression playback module is configured to generate an insertion frame according to the pixel deviation of adjacent video frames in the storage video, and restore the number of video frames before compression.
[0028] Further, the compression storage module comprises a dynamic adjustment encoding frame rate module, a vehicle dynamic control module, a video compression module, a video acquisition module, and a video storage module.
[0029] The video acquisition module is configured to acquire the original video data of the driving record while the vehicle is moving.
[0030] The vehicle dynamic control module is configured to acquire the vehicle speed information.
[0031] The dynamic adjustment of the encoding frame rate module is configured to determine the current vehicle speed and generate the encoding frame rate information.
[0032] The video compression module is configured to compress the original video data according to the encoding frame rate information.
[0033] The video storage module is configured to store the compressed storage video.
[0034] Further, the decompression and playback module comprises:
[0035] The vehicle dynamic control module sends the vehicle speed information to the dynamic adjustment of the encoding frame rate module.
[0036] The dynamic adjustment of the encoding frame rate module receives the data, generates the encoding frame rate information according to the vehicle speed information, and sends the information to the video compression module.
[0037] The video acquisition module sends the original video data to the video compression module.
[0038] The video compression module receives the data, compresses the video frames of the original video according to the encoding frame rate information, generates the storage video, and sends the storage video to the video storage module.
[0039] The video storage module stores the storage video.
[0040] Further, the decompression and playback module comprises an insertion frame module.
[0041] The insertion frame module is configured to generate an insertion frame according to the pixel deviation of adjacent video frames in the storage video.
[0042] Further, the decompression and playback module further comprises a timestamp module.
[0043] The timestamp module is configured to generate a timestamp of the insertion frame according to the positional relationship between the insertion frame and adjacent video frames of the storage video, and mark the timestamp on the insertion frame.
[0044] Further, the decompression and playback module further comprises a decoding module.
[0045] The decoding module is configured to insert the insertion frame into the storage video according to the timestamp.
[0046] The insertion frame module generates an insertion frame and sends it to the timestamp module;
[0047] The timestamp module receives data, marks the timestamp on the inserted frame, and sends it to the decoding module;
[0048] The decoding module receives data, inserts the inserted frames into the video frames of the stored video according to the timestamp order, restores the number of video frames before compression, and generates a decompressed video file.
[0049] According to three aspects of the present invention, an electronic device is provided, comprising: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;
[0050] The memory stores a computer program, which, when executed by the processor, causes the processor to perform the steps of the in-vehicle camera photo capture control method.
[0051] The above solution achieves the following beneficial technical effects:
[0052] This application reduces the number of video frames recorded during low-speed vehicle travel, thereby reducing the hardware and energy consumption of the driving recorder and saving energy and extending the device's lifespan without affecting the recording quality.
[0053] This application generates insertion frames and inserts them into the video frames of the stored video, eliminating stuttering caused by compression during playback and making the playback effect closer to that of the original video file.
[0054] This application determines the vehicle speed and controls the compression ratio of video frames to match the compression level of the stored video files with the video requirements at vehicle speed, thus making reasonable use of storage space and CPU resources.
[0055] This application completes the insertion and playback of video frames by marking timestamps on the video frames, and ensures that the decompression of the inserted video frames proceeds smoothly based on the timestamps. Attached Figure Description
[0056] Figure 1 This is a flowchart of a vehicle recording data processing method provided by one or more embodiments of the present invention.
[0057] Figure 2 This is a structural diagram of a vehicle recording data processing system provided in one or more embodiments of the present invention.
[0058] Figure 3 This is a structural diagram of a vehicle recording data processing device provided in one or more embodiments of the present invention.
[0059] Figure 4 is a schematic diagram of a video storage system of one embodiment of the present application.
[0060] Figure 5 is a schematic diagram of video encoding of one embodiment of the present application.
[0061] Figure 6 is a schematic diagram of generating an insertion frame of one embodiment of the present application.
[0062] Figure 7 is a schematic diagram of marking a time stamp of an insertion frame of one embodiment of the present application.
[0063] Figure 8 is a structural block diagram of an electronic device of a driving record data processing method provided by one or more embodiments of the present application. DETAILED DESCRIPTION
[0064] The technical solutions of the present application will be described below in conjunction with the accompanying drawings, obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0065] Figure 1 is a flowchart of a driving record data processing method provided by one or more embodiments of the present application.
[0066] As shown in the driving record data processing method includes: Figure 1
[0067] Step S1, collecting original video data of driving record accompanying vehicle movement;
[0068] Step S2, obtaining vehicle driving speed;
[0069] Step S3, generating storage video after compressing the video frame number of the original video according to the vehicle driving speed, and storing;
[0070] Step S4, obtaining pixel deviation of adjacent video frames in the storage video;
[0071] Step S5, generating an insertion frame according to the pixel deviation of adjacent video frames in the storage video;
[0072] Step S6, inserting the insertion frame between the video frames of the storage video in which the insertion frame is generated, restoring the video frame number of the original video before compression.
[0073] Through the above scheme, the following beneficial technical effects are obtained:
[0074] The application reduces the hardware consumption and energy consumption of the driving record device by reducing the video frames of the driving record during the low-speed driving stage of the vehicle, saves energy and prolongs the service life of the device without affecting the driving record effect.
[0075] The application eliminates the lag caused by compression during playback by generating an inserted frame and inserting it into the video frame of the stored video, making the playback closer to the playback effect of the original video file.
[0076] The application controls the compression ratio of the video frame by judging the vehicle speed, so that the compression degree of the stored video file matches the video demand at the vehicle speed, and the storage space and CPU resources are reasonably utilized.
[0077] The application completes the insertion and playback of the video frame by labeling the timestamp on the video frame, and according to the timestamp, the decompression work of the inserted video frame is smoothly carried out.
[0078] Specifically, the driving recorder starts working after the vehicle starts, receives the video data sent by the camera and stores it. Generally, the video frame collected by the driving recorder is 30 frames per second, and the long-time high video frame number brings a large burden to the storage space and CPU.
[0079] By analyzing the process of vehicle driving, it is found that in the low-speed state, most of the driving is on low-speed sections, and there are fewer serious traffic accidents at low speed, and most of them are caused by collisions with objects at the same low speed. The video frame at a low speed can be compressed and stored, which can save storage space on the one hand, and reduce the video encoding calculation amount on the other hand.
[0080] Generally, the video file stored by the driving recorder will not be frequently opened and read, and only when there is a traffic accident or special need, it will be read from the storage, and most of the time it is only circularly stored. When opened, you can select the part you want to play and play directly. You can also restore the same video frame number of the original video and then play it.
[0081] In this embodiment, the number of video frames of the original video is compressed, including:
[0082] According to the vehicle speed, the encoding rate information is generated;
[0083] According to the encoding rate information, the number of video frames of the original video is compressed to generate a stored video;
[0084] The video frame is labeled with a timestamp;
[0085] Among them, the timestamp labeled by the stored video corresponds to the timestamp labeled by the original video.
[0086] Specifically, the compression degree of the original video depends on the vehicle driving speed. According to the vehicle speed, the encoding rate is generated, the encoding module is controlled to encode, and the corresponding frame rate is taken to compress. The method of reducing the frame rate is essentially to discard some frames, and the recorded storage video is actually cut from a part of the original video. The timestamp marked by the video frame of the storage video corresponds to the corresponding video frame of the original video. If it is not decompressed, it can still be played according to the timestamp, and the speed is the same as that of the original video.
[0087] In the embodiment, the number of video frames of the compressed original video also includes:
[0088] The number of video frames of the original video is compressed according to the current vehicle driving speed;
[0089] If the current vehicle driving speed is greater than 90 km / h, the number of video frames of the storage video remains the number of video frames of the original video;
[0090] If the current vehicle driving speed is less than or equal to 90 km / h and greater than 60 km / h, the number of video frames of the storage video is reduced to 75% of the number of video frames of the original video;
[0091] If the current vehicle driving speed is less than or equal to 60 km / h, the number of video frames of the storage video is reduced to 50% of the number of video frames of the original video.
[0092] Specifically, the vehicle speed exceeding 90 km / h corresponds to the vehicle on the highway, the vehicle speed between 60 km / h and 90 km / h corresponds to the vehicle on the national road or the suburban road, and the vehicle speed less than 60 km / h corresponds to the vehicle on the urban road. After calculation, the moving object at a speed of 120 km / h has a deviation of about 6.6 cm between each frame in a 30-frame video format. The moving object at a speed of 90 km / h has a deviation of about 5 cm between each frame in a 30-frame video format. The moving object at a speed of 90 km / h has a deviation of about 6.6 cm between each frame in a 22.5-frame video format. The moving object at a speed of 60 km / h has a deviation of about 4.5 cm between each frame in a 22.5-frame video format. The moving object at a speed of 60 km / h has a deviation of about 6.6 cm between each frame in a 15-frame video format. By compressing the number of video frames, the recorded object image moving deviation between video frames is not worse than that of the moving object at a speed of 120 km / h in a 30-frame video format, that is, the video recording requirement is met.
[0093] Figure 2 is a structural diagram of a driving record data processing system provided by one or more embodiments of the application.
[0094] As Figure 2The driving record data processing system comprises a compressed storage module and a decompression playing module.
[0095] The compressed storage module is used for generating a storage video after compressing the video frame number of the original video according to the vehicle driving speed, and storing the storage video.
[0096] The decompression playing module is used for generating an inserted frame according to the pixel deviation of adjacent video frames in the storage video, and restoring the video frame number before compression.
[0097] Specifically, the driving record is often generated as long as the vehicle is started, and the data is recorded after being compressed, so that the energy consumption and hardware loss can be reduced. Since the compression is realized by abandoning part of the video frames of the original video, it is impossible to completely restore the original video from the storage video, but the same video frame number as the original video frame can be restored by the way of inserting the frame, so as to guarantee the smoothness during playing.
[0098] In the embodiment, the compressed storage module comprises a dynamic adjustment coding frame rate module, a vehicle dynamic control module, a video compression module, a video acquisition module and a video storage module.
[0099] The video acquisition module is used for acquiring the original video data of the driving record along with the movement of the vehicle.
[0100] The vehicle dynamic control module is used for acquiring the vehicle driving speed information.
[0101] The dynamic adjustment coding frame rate module is used for judging the current vehicle driving speed and generating coding frame rate information.
[0102] The video compression module is used for compressing the original video data according to the coding frame rate information.
[0103] The video storage module is used for storing the storage video after compression.
[0104] Specifically, the vehicle speed information is converted into coding frame rate information for controlling the coding speed to control the coding of the video compression module. Generally, the video head acquires yuv data which is not compressed, and the module responsible for coding is required to code and compress. According to the coding frame rate information, part of the yuv data can be abandoned for coding.
[0105] In the embodiment, the following steps are included.
[0106] The vehicle dynamic control module sends the vehicle driving speed information to the dynamic adjustment coding frame rate module.
[0107] The dynamic adjustment coding frame rate module receives the data, generates the coding frame rate information according to the vehicle driving speed information, and sends the coding frame rate information to the video compression module.
[0108] The video acquisition module sends the original video data to the video compression module;
[0109] The video compression module receives the data, compresses the video frame number of the original video according to the encoding frame rate information, generates a storage video, and sends the storage video to the video storage module;
[0110] The video storage module stores the storage video.
[0111] Specifically, the storage video stored by the video storage module is a video that is matched with the vehicle speed and is compressed by encoding.
[0112] In the embodiment, the decompression and playback module comprises an insertion frame module.
[0113] The insertion frame module is configured to generate an insertion frame according to a pixel deviation between adjacent video frames in the storage video.
[0114] Specifically, the pixel deviation between two video frames is compared, that is, the direction of the movement of the object in the video is compared, and the image that may be presented at the intermediate time is calculated as the insertion frame.
[0115] In the embodiment, the decompression and playback module further comprises a timestamp module.
[0116] The timestamp module is configured to generate a timestamp of the insertion frame according to a positional relationship between the insertion frame and adjacent video frames of the storage video, and mark the timestamp on the insertion frame.
[0117] Specifically, the timestamp of the generated insertion frame is set according to a time point between the two video frames from which the insertion frame is generated, and is marked on the insertion frame.
[0118] In the embodiment, the decompression and playback module further comprises a decoding module.
[0119] The decoding module is configured to insert the insertion frame into the storage video according to the timestamp.
[0120] The insertion frame module generates the insertion frame and sends the insertion frame to the timestamp module.
[0121] The timestamp module receives the data, marks the timestamp on the insertion frame, and sends the insertion frame to the decoding module.
[0122] The decoding module receives the data, inserts the insertion frame into the video frames of the storage video according to the timestamp, restores the video frame number before compression, and generates a decompression video file.
[0123] Specifically, after the timestamp is marked on the insertion frame, the insertion frame and the original video frames of the storage video are rearranged according to the timestamp, and the insertion frame is played according to the timestamp.
[0124] Figure 3It is a structure diagram of a driving record data processing device provided by one or more embodiments of the present application.
[0125] As shown in the driving record data processing device includes: original video acquisition module, vehicle speed acquisition module, video compression processing module, pixel deviation acquisition module, inserted frame generation module, video decompression module; Figure 3
[0126] The original video acquisition module is configured to collect original video data of the driving record along with the movement of the vehicle.
[0127] The vehicle speed acquisition module is configured to acquire the driving speed of the vehicle.
[0128] The video compression processing module is configured to generate and store a storage video by compressing the video frame number of the original video according to the driving speed of the vehicle.
[0129] The pixel deviation acquisition module is configured to acquire the pixel deviation of adjacent video frames in the storage video.
[0130] The inserted frame generation module is configured to generate an inserted frame according to the pixel deviation of adjacent video frames in the storage video.
[0131] The video decompression module is configured to insert the inserted frame between the video frames of the storage video in which the inserted frame is generated, and restore the video frame number of the original video before compression.
[0132] It is worth noting that although the system only discloses the original video acquisition module, the vehicle speed acquisition module, the video compression processing module, the pixel deviation acquisition module, the inserted frame generation module, and the video decompression module, it does not mean that the device is limited to the above basic functional modules. On the contrary, the meaning expressed by the present application is that on the basis of the above basic functional modules, a person skilled in the art can add one or more functional modules to form an infinite number of embodiments or technical solutions in combination with the prior art. That is to say, the system is open rather than closed, and it cannot be considered that the protection scope of the present application is limited to the above disclosed basic functional modules just because the present embodiment discloses only individual basic functional modules.
[0133] Figure 4 It is a schematic diagram of a video storage system of one specific embodiment of the present application.
[0134] Figure 5 It is a schematic diagram of video encoding of one specific embodiment of the present application.
[0135] The car video recorder records the image outside the vehicle during driving. The video raw data sent from the Carmera module is mainly uncompressed yuv data. The amount of yuv format data of the video is very large and is not suitable for transmission and storage. The VideoEncoder module (video encoder) is needed to encode and compress the original yuv data. The data after encoding and compression is relatively suitable for transmission and storage.
[0136] The general car video recorder DVR uses a fixed frame rate for video encoding. If the frame rate of the video data sent by the Carmera module is 30 frames / second, the output of the VideoEncoder module is always the highest frame rate of 30 frames / second. Therefore, a fixed frame rate is used for encoding regardless of the speed of the vehicle.
[0137] Video encoding is a high-energy-consuming work for the chip. The CPU will be 100% occupied for 2-3 cores. Even if the dsp hard coding is used on the vehicle terminal, the energy consumption is still high. As long as the car is started, the video encoder will always work in the background. Therefore, it is necessary to optimize the video encoding of the vehicle terminal.
[0138] As shown in Figure 4 The embodiment is based on the driving speed to dynamically adjust the video encoding frame rate. When the driving speed is low, the frame rate is appropriately reduced to meet the driving recording requirements. When the driving speed is high, the encoding frame rate is appropriately increased. In this way, the basic function of the car video recorder can be met, and the purpose of reducing energy consumption, saving power and saving storage space can be achieved.
[0139] The VDC is an automobile dynamic control system. It can send the speed of the car to the DynamicAdjustVideoFrameRate module (dynamic adjustment of encoding frame rate module) in real time through the someip protocol.
[0140] The DynamicAdjustVideoFrameRate module adjusts the video frame rate parameter according to the received vehicle speed and sends the video frame rate parameter to the VideoFrameDown module (video frame down module).
[0141] The VideoFrameDown module is responsible for reducing the video frame rate and sending the selected video frame to the VideoEncoder for video encoding.
[0142] When 0<current vehicle speed<=60km / h, the frame rate of video encoding is adjusted to 15 frames / second.
[0143] When 60<current vehicle speed<=90km / h, the frame rate of video encoding is adjusted to 22.5 frames / second.
[0144] When 90 < current speed, the frame rate of video encoding is adjusted to 30 frames per second.
[0145] As shown in Figure 5 each video frame sent from the camera has a corresponding time stamp, using the frame rate of the camera 30 frames, the time stamp of the video frame is 33ms, 66ms, 100ms, 133ms, 166ms, 200ms, etc.
[0146] According to the frame rate of video encoding, a desired time stamp can be calculated; if the encoding frame rate is 22.5 frames, the desired encoding frame rate time stamp is 44ms, 88ms, 132ms, etc.
[0147] Select the encoding frame algorithm:
[0148] dela1 = |ExpectedPTS (expected time stamp) - LastFramePTS (last frame time stamp) |;
[0149] dela2 = |ExpectedPTS (expected time stamp) - CurrentFramePTS (current frame time stamp) |;
[0150] if (dela1 <= dela2) Select LastFrame (select the last frame);
[0151] if (dela1 > dela2) Select CurrentFrame (select the current frame);
[0152] The VideoEncoder module encodes the video frame sent by the VideoFrameDown module to generate video compression data (h264 / h265);
[0153] The Store module encapsulates the h264 / h265 data and combines the audio compression data to generate mp4 format data;
[0154] The Store module stores the generated mp4 data to the U disk.
[0155] Figure 6 is a schematic diagram of generating an inserted frame of a specific embodiment of the present application.
[0156] Figure 7 is a schematic diagram of inserting frame time stamp of a specific embodiment of the present application.
[0157] The interpolated frame can be obtained in two steps, namely motion estimation and pixel synthesis. These two steps can be combined into one process, i.e. the pixel synthesis of the interpolated frame is regarded as a local convolution of the two input frames. The convolution kernel captures the local motion and the coefficients of the pixel synthesis between the input frames. It employs a deep fully convolutional neural network (FCN) to estimate the spatially adaptive convolution kernel for each pixel. Its training can be performed end-to-end on widely available video data without any ground truth (GT) data, such as optical flow, which is difficult to obtain.
[0158] For each output pixel (x, y), the convolution kernel K is estimated and convolved with the two patches P1 and P2 centered at (x, y) of the two input frames to produce the interpolated image I^(x, y).
[0159] Given two video frames I1 and I2, the task is to interpolate a new frame I^ in the middle of the two input frames in the temporal domain. The traditional interpolation method estimates the color of a pixel I^(x, y) in the interpolated frame in two steps, namely optical flow estimation and pixel interpolation, as shown in part (a) of Figure 6 When the optical flow is unreliable due to occlusion, motion blur and lack of texture, this two-step method can be affected in performance. In addition, rounding the coordinates to obtain the colors of I1(x1, y1) and I2(x2, y2) is prone to aliasing, and using a fixed kernel for resampling cannot well preserve sharp edge information.
[0160] The solution is to integrate the motion estimation and pixel synthesis into one step, and define the pixel interpolation as a local convolution of the input images I1 and I2. As shown in part (b) of Figure 6 , the value of the pixel (x, y) of the interpolated target image is obtained by convolving the patches P1(x, y) and P2(x, x) centered at (x, y) in the corresponding input images and the appropriate kernel K. The convolution kernel K captures the motion and resampling coefficients of the pixel synthesis.
[0161] The pixel interpolation by convolution has the following advantages: 1) it combines the motion estimation and pixel synthesis into one step to provide a more robust solution than the two-step procedure; 2) the convolution kernel provides flexibility to solve difficult cases such as occlusion, a data-driven method directly estimates the convolution kernel and produces visually reasonable interpolation results for occluded regions; 3) this convolution formula can seamlessly integrate other resampling techniques, such as edge-aware filtering, to provide clear interpolation results.
[0162] As shown in Figure 7 , in the present embodiment, the current video frame rate is 15 frames, which is restored to 30 frames by the method of inserting frames.
[0163] First video first frame LastFramePTS-0ms (the last frame timestamp is 0ms), the second frame currentFramePTs-66ms (the current frame timestamp is 66ms);
[0164] The first frame timestamp ExpectedPTS (insert frame) of the video to be recovered is 0ms, and LastFrame is directly taken;
[0165] The second frame timestamp ExpectedPTS (insert frame) of the video to be recovered is 33ms:
[0166] LastFramePTS<ExpectedPTS<currentFramePTS,
[0167] Input [LastFrame, LastFramePTS, CurrentFrame, CurrentFramePTS, insert frame PTS]--->Ouput [generated insert frame];
[0168] Finally, the original compressed frame and the insert frame of the video file are sent to the video decoder in the order of the timestamp, so that the video playback function is completed.
[0169] Figure 8 It is a kind of electronic equipment structure block diagram provided by the driving record data processing method of one or more embodiments of the application.
[0170] As Figure 8 The present application provides an electronic device, comprising: processor, communication interface, memory and communication bus, wherein, processor, communication interface, memory complete mutual communication by communication bus;
[0171] The memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the driving record data processing method.
[0172] The present application also provides a computer readable storage medium, which stores a computer program executable by an electronic device, and when the computer program runs on the electronic device, the electronic device executes the steps of the driving record data processing method.
[0173] The present application also provides a vehicle, comprising:
[0174] The electronic device is used to implement the steps of the driving record data processing method.
[0175] The processor runs the program, and when the program runs, the data output from the electronic device executes the steps of the driving record data processing method.
[0176] A storage medium for storing a program that, when executed, performs the steps of the driving record data processing method on data output from the electronic device.
[0177] The communication bus mentioned above can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is shown in the figure, but this does not mean that there is only one bus or only one type of bus.
[0178] The electronic device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system. The hardware layer includes hardware such as a central processing unit (CPU), a memory management unit (MMU), and a memory. The operating system can be any one or more computer operating systems that implement electronic device control through processes, such as a Linux operating system, a Unix operating system, an Android operating system, an iOS operating system, or a windows operating system, etc. In embodiments of the present application, the electronic device can be a handheld device such as a smartphone or a tablet computer, or an electronic device such as a desktop computer or a laptop computer, and is not particularly limited in embodiments of the present application.
[0179] The execution subject of the electronic device control in embodiments of the present application can be an electronic device, or a functional module in the electronic device that can call and execute a program. The electronic device can obtain firmware corresponding to the storage medium, which is provided by a vendor. The firmware corresponding to different storage media can be the same or different, and is not limited herein. After obtaining the firmware corresponding to the storage medium, the electronic device can write the firmware corresponding to the storage medium into the storage medium, specifically by burning the firmware corresponding to the storage medium into the storage medium. The process of burning the firmware into the storage medium can be implemented using existing technology, and is not described in detail in embodiments of the present application.
[0180] The electronic device can also obtain a reset command corresponding to the storage medium, which is provided by a vendor. The reset command corresponding to different storage media can be the same or different, and is not limited herein.
[0181] At this time, the storage medium of the electronic device is the storage medium on which the corresponding firmware is written, and the electronic device can respond to the reset command corresponding to the storage medium in the storage medium on which the corresponding firmware is written, so that the electronic device resets the storage medium on which the corresponding firmware is written according to the reset command corresponding to the storage medium. The process of resetting the storage medium according to the reset command can be implemented in the prior art, and will not be described in detail in the embodiment of the present application.
[0182] For the convenience of description, the above apparatus is described as various units and modules in function. Of course, the functions of the units and modules can be implemented in one or more software and / or hardware in the implementation of the present application.
[0183] Those skilled in the art can understand that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which the present application belongs. It should also be understood that terms such as those defined in a general dictionary should be understood in the context of the present application and should not be interpreted in an idealized or overly formal sense unless specifically defined.
[0184] For the convenience of description, the above apparatus is described as various units and modules in function. Of course, the functions of the units and modules can be implemented in one or more software and / or hardware in the implementation of the present application.
[0185] From the above description of the embodiments, those skilled in the art can clearly understand that the present application can be implemented by means of software and the necessary general hardware platform. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which can be stored in a storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions to make a computer device (which can be a personal computer, a server or a network device, etc.) execute the methods described in the various embodiments or some parts of the embodiments of the present application.
[0186] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, and are not intended to limit the present application; although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that the technical solutions recorded in the above embodiments can be modified, or some or all of the technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A method of processing drive record data, characterized by, The driving record data processing method comprises: Collecting original video data of driving record along with vehicle movement; Obtaining vehicle driving speed; According to the vehicle driving speed, the video frame number of the original video is compressed to generate a storage video for storage; Obtaining the pixel deviation of adjacent video frames in the storage video; According to the pixel deviation of adjacent video frames in the storage video, an insertion frame is generated; The insertion frame is inserted between the video frames of the storage video in which the insertion frame is generated, and the video frame number of the original video before compression is restored; The compression of the video frame number of the original video comprises: According to the vehicle driving speed, the encoding rate information is generated; According to the encoding rate information, the video frame number of the original video is compressed to generate the storage video; Video frame timestamp; The timestamp of the storage video corresponds to the timestamp of the original video.
2. The method of claim 1, wherein, The compression of the video frame number of the original video further comprises: Judging the current vehicle driving speed and compressing the video frame number of the original video; If the current vehicle driving speed is greater than 90 km / h, the video frame number of the storage video remains the video frame number of the original video; If the current vehicle driving speed is less than or equal to 90 km / h and greater than 60 km / h, the video frame number of the storage video is reduced to 75% of the video frame number of the original video; If the current vehicle driving speed is less than or equal to 60 km / h, the video frame number of the storage video is reduced to 50% of the video frame number of the original video.
3. A drive record data processing system characterized by comprising: The driving record data processing system comprises a compression storage module and a decompression playback module; The compression storage module is configured to compress the video frame number of the original video according to the vehicle driving speed, generate a storage video, and store the storage video; The decompression playback module is configured to generate an insertion frame according to the pixel deviation of adjacent video frames in the storage video, and restore the video frame number before compression; The compression of the video frame number of the original video comprises: According to the vehicle driving speed, the encoding rate information is generated; According to the encoding rate information, the video frame number of the original video is compressed to generate the storage video; Video frame timestamp; The timestamp of the storage video corresponds to the timestamp of the original video.
4. The vehicle event data processing system of claim 3, wherein, The compression storage module comprises a dynamic adjustment of encoding frame rate module, a vehicle dynamic control module, a video compression module, a video acquisition module and a video storage module; The video acquisition module is configured to collect the original video data of driving record along with vehicle movement; The vehicle dynamic control module is configured to obtain vehicle driving speed information; The dynamic adjustment of encoding frame rate module is configured to judge the current vehicle driving speed and generate the encoding frame rate information; The video compression module is configured to compress the original video data according to the encoding frame rate information; The video storage module is configured to store the storage video after compression processing.
5. The vehicle event data processing system of claim 4, wherein, The vehicle dynamic control module sends vehicle driving speed information to the dynamic adjustment of encoding frame rate module; The dynamic adjustment coding frame rate module receives data, generates coding frame rate information according to vehicle driving speed information, and sends the coding frame rate information to the video compression module; The video acquisition module sends original video data to the video compression module; The video compression module receives data, compresses the video frame number of the original video according to the coding frame rate information, generates a storage video, and sends the storage video to the video storage module; The video storage module stores the storage video.
6. The vehicle event data processing system of claim 5, wherein, The decompression and playback module comprises an insertion frame module; The insertion frame module is configured to generate an insertion frame according to a pixel deviation of adjacent video frames in the storage video.
7. The vehicle event data processing system of claim 6, wherein, The decompression and playback module further comprises a timestamp module; The timestamp module is configured to generate a timestamp of the insertion frame according to a positional relationship between the insertion frame and adjacent video frames of the storage video, and mark the timestamp on the insertion frame.
8. The vehicle event data processing system of claim 7, wherein, The decompression and playback module further comprises a decoding module; The decoding module is configured to insert the insertion frame into the storage video according to the timestamp; The insertion frame module generates an insertion frame and sends the insertion frame to the timestamp module; The timestamp module receives data, marks a timestamp on the insertion frame, and sends the insertion frame to the decoding module; The decoding module receives data, inserts the insertion frame into the storage video according to the timestamp order, restores the video frame number before compression, and generates a decompression video file.
9. An electronic device, comprising: It comprises: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; The memory stores a computer program, and when the computer program is executed by the processor, the processor executes the steps of the driving record data processing method in any one of claims 1 or 2.
Citation Information
Patent Citations
Video frame insertion method and device and electronic equipment
CN113015007A