Image information distribution method, device and medium
By constructing a fitting relationship curve between video image distortion information and compression ratio, and combining it with driving status and environmental hazard level, the problem of improper video compression ratio selection is solved, the rapid uploading and analysis of video compression packages is achieved, and vehicle driving safety is improved.
Patent Information
- Application Number
- CN202510850152.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-24
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2045-06-24
AI Technical Summary
When existing traffic surveillance videos detect that a driver is unable to drive normally, improper video compression ratio selection leads to large computational complexity, high distortion, or slow upload speed, affecting timely policy execution and reducing driving safety.
By acquiring video images inside and outside the vehicle in real time, a fitting relationship curve between video image distortion information and compression ratio is constructed. The appropriate distortion information and compression ratio are determined in combination with the driving status and environmental hazard level, thus enabling rapid uploading and analysis of video compression packages.
It enables rapid uploading and analysis of compressed video packages, improves vehicle driving safety, ensures timely execution of strategies, and reduces driving risks.
Smart Images

Figure CN120358350B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a method, device and medium for distributing image information. Background Art
[0002] Currently, intelligent transportation systems can timely understand vehicle driving status by automatically analyzing visual content and extracting features from surveillance videos. However, the use of traffic surveillance videos still has limitations. For example, videos are only retrieved for observation and evidence collection after an accident occurs, or for manual accident monitoring, lacking applications for timely early warning and response. In some real-world scenarios, such as when a driver is detected to be incapable of driving, timely strategies such as speed reduction, lane change, and parking are required. However, the computational complexity of analyzing surveillance video content is too high for the onboard server to meet, necessitating the video be uploaded to another server for analysis. Video compression is required before uploading. However, excessively high compression ratios can result in excessive distortion, hindering clear understanding and proper analysis of the video content. Excessively low compression ratios result in larger compressed files and slower upload speeds, hindering the timely implementation of vehicle strategies and resulting in reduced driving safety. Summary of the Invention
[0003] In response to the above technical problems, the present invention provides a method, device and medium for distributing image information, which can determine appropriate video image distortion information and compression ratio information, so as to compress the video image according to these parameter information and realize the rapid uploading and analysis of video compression packages.
[0004] According to a first aspect of the present invention, there is provided a method for distributing image information, comprising the following steps:
[0005] S1, real-time acquisition of a first vehicle-mounted video image and a second vehicle-mounted video image corresponding to a target vehicle; the first vehicle-mounted video image is a video image for monitoring the driving user in the vehicle, and the second vehicle-mounted video image is a video image for monitoring the environment outside the vehicle.
[0006] S2, when it is detected from the first vehicle-mounted video image that the driving user in the target vehicle is in a preset driving state, obtaining a first vehicle-mounted video image set and a second vehicle-mounted video image set within a current preset time period.
[0007] S3, constructing a target fitting relationship curve between video image distortion information and video image compression ratio information based on a number of historical video image samples.
[0008] S4, determining the video image distortion information corresponding to the target vehicle based on the preset state level corresponding to the preset driving state and the vehicle environment hazard level represented by the second vehicle-mounted video image set, and determining the video image compression ratio information corresponding to the target vehicle based on the video image distortion information corresponding to the target vehicle and the target fitting relationship curve to obtain the distribution parameters of the image information to be compressed.
[0009] According to a second aspect of the present invention, a non-transitory computer-readable storage medium is provided, in which at least one instruction or at least one program is stored. The at least one instruction or the at least one program is loaded and executed by a processor to implement the above-mentioned method for distributing image information.
[0010] According to a third aspect of the present invention, there is provided an electronic device comprising a processor and the above-mentioned non-transitory computer-readable storage medium.
[0011] The present invention has at least the following beneficial effects:
[0012] The present invention provides a method for distributing image information, which obtains a first vehicle-mounted video image and a second vehicle-mounted video image corresponding to a target vehicle in real time, and can clearly grasp the current driving status of the target vehicle from both inside and outside the vehicle. When it is monitored from the first vehicle-mounted video image that the driving user in the target vehicle is in a preset driving state, the first vehicle-mounted video image set and the second vehicle-mounted video image set within the current preset time period are obtained, and then a target fitting relationship curve of video image distortion information and video image compression ratio information is constructed based on a number of historical video image samples. Finally, according to a preset state level corresponding to the preset driving state and a vehicle environment hazard level represented by the second vehicle-mounted video image set, the distribution parameters of the image information to be compressed are determined. By determining appropriate video image distortion information and compression ratio information, a balance between the compression ratio and the video image distortion degree can be achieved. By sacrificing a certain degree of distortion to increase the compression ratio, the video compression package can be quickly uploaded and analyzed, which is conducive to timely execution of strategies for the target vehicle and improved vehicle driving safety. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0014] Figure 1 A flowchart of a method for distributing image information provided by an embodiment of the present invention;
[0015] Figure 2A flowchart of obtaining a target fitting relationship curve provided by an embodiment of the present invention;
[0016] Figure 3 A flowchart for determining the vehicle environment danger level provided by an embodiment of the present invention;
[0017] Figure 4 A flowchart of determining video image distortion information corresponding to a target vehicle provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0018] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making any creative efforts shall fall within the scope of protection of the present invention.
[0019] The embodiment of the present invention provides a method for distributing image information, such as Figure 1 As shown, the method includes the following steps:
[0020] S1, real-time acquisition of the first vehicle-mounted video image and the second vehicle-mounted video image corresponding to the target vehicle; the first vehicle-mounted video image is a video image for monitoring the driving user in the vehicle, and the second vehicle-mounted video image is a video image for monitoring the environment outside the vehicle; it can be understood that: each second of video is composed of several frames of images, and the acquired vehicle-mounted video image is the video captured by the monitoring equipment installed in the vehicle.
[0021] As described above, by obtaining videos of users inside the vehicle and videos of the environment outside the vehicle, a clear understanding of the current driving conditions of the target vehicle can be obtained from both inside and outside the vehicle, so that the appropriate distortion and compression ratio can be selected in subsequent implementation to achieve compressed uploading of video images.
[0022] S2. When the driver of the target vehicle is detected in a preset driving state from the first in-vehicle video image, a first in-vehicle video image set and a second in-vehicle video image set within a preset time period are obtained. In a specific implementation, the preset driving state may be a state of driver fatigue. Since the technology for detecting whether the driver in the vehicle is in a state of driver fatigue is existing, the specific detection method is not described here.
[0023] Furthermore, the current preset time period refers to a historical time period corresponding to a preset duration before the current moment; those skilled in the art can set the preset duration according to actual needs, for example, 30 seconds.
[0024] S3, constructing a target fitting relationship curve between video image distortion information and video image compression ratio information based on a number of historical video image samples.
[0025] Furthermore, the video image distortion information includes information on four indicators corresponding to the video image distortion, namely, mean square error, peak signal-to-noise ratio, structural similarity index, and multi-scale structural similarity; it can be understood that the video image distortion can be reflected from four dimensions. Those skilled in the art know how to calculate the four indicator values corresponding to the video image distortion, and will not go into details here.
[0026] In a specific embodiment, Figure 2 As shown, step S3 includes the following steps:
[0027] S301 : For any historical video image sample, compress the historical image sample according to several preset compression ratios to obtain each indicator information corresponding to the video image distortion degree under each preset compression ratio.
[0028] S302, for any indicator corresponding to the video image distortion, based on k historical video image samples, the average value of several indicator information of the indicator corresponding to any preset compression ratio is determined as the new indicator information corresponding to the preset compression ratio itself; it can be understood that: for any indicator, each preset compression ratio corresponds to k indicator information of the indicator.
[0029] Furthermore, the indicator values are normalized to a value between 0 and 1 based on the corresponding data magnitude, and the average of the multiple indicator values for each indicator is calculated. For example, the structural similarity index and multi-scale structural similarity range from 0 to 1 and do not require normalization. However, both the mean square error and peak signal-to-noise ratio require normalization.
[0030] S303: Perform linear fitting based on a number of preset compression ratios and new indicator information corresponding to each preset compression ratio to obtain a linear relationship between the compression ratio and the indicator.
[0031] S304. The normalized value of the independent variable coefficient in the linear relationship between the compression ratio and the indicator is used as the indicator weight corresponding to the indicator, and the indicator weight corresponding to the indicator is substituted into the preset fitting relationship curve Y=a×1 / (1+ez) to obtain the intermediate fitting relationship curve, where z=∑nj=1 wjxj, wj is the indicator weight corresponding to the j-th indicator, xj represents the indicator information of the j-th indicator, n is the number of indicators, a is the amplification factor, and Y represents the compression ratio.
[0032] Specifically, the normalized value of the independent variable coefficient in the linear relationship between the compression ratio and the indicator refers to the value obtained after normalizing the independent variable coefficients corresponding to all indicators; it can be understood that the sum of the weights of all indicators is 1.
[0033] As mentioned above, since the independent variable coefficient in the linear relationship between the compression ratio and the indicator can reflect the changing trend and importance of the indicator, it is more reasonable to use it as the indicator weight.
[0034] S305 , obtaining a value of a according to the correspondence between the compression ratio and a plurality of indicator information in each historical video image sample, and obtaining a target fitting relationship curve according to a and the intermediate fitting relationship curve.
[0035] In one implementation, the average value of the obtained k magnification coefficient values is determined as a; it can be understood that one historical video image sample corresponds to one magnification coefficient value.
[0036] As described above, in the specific implementation, it can be seen that when the compression ratio is higher, the distortion also increases. In the case of low compression ratio, the distortion increases slowly. As the compression ratio increases, the distortion growth rate accelerates. The relationship curve between distortion and compression ratio is close to a convex function. Therefore, the relationship curve between compression ratio and distortion is close to a Sigmoid function, making the constructed target fitting relationship curve more reasonable and reliable.
[0037] S4, determining the video image distortion information corresponding to the target vehicle based on the preset state level corresponding to the preset driving state and the vehicle environment hazard level represented by the second vehicle-mounted video image set, and determining the video image compression ratio information corresponding to the target vehicle based on the video image distortion information corresponding to the target vehicle and the target fitting relationship curve to obtain the distribution parameters of the image information to be compressed.
[0038] Furthermore, if Figure 3 As shown, in step S4, the vehicle environment hazard level represented by the second vehicle-mounted video image set is determined through the following steps:
[0039] S401 , based on a second vehicle-mounted video image set, obtaining vehicle information and road information in an external vehicle environment; the vehicle information includes the number of vehicles and vehicle types, and the road information includes road width and road type.
[0040] S402, according to the preset vehicle environment hazard level determination rules, determine the vehicle environment hazard level represented by the second vehicle-mounted video image set; the vehicle environment hazard level determination rules are set based on the vehicle information and road information in the vehicle environment; technical personnel in this field set the vehicle environment hazard level according to actual needs, for example, the more vehicles there are and the larger the vehicle type, the higher the hazard level; the narrower the road, the higher the hazard level; when the road type is an expressway, the hazard level is higher than that of a low-speed road.
[0041] In a specific embodiment, Figure 4As shown, the video image distortion information corresponding to the target vehicle is determined through the following steps:
[0042] At step S410, data normalization is performed on both the preset state level corresponding to the preset driving state and the vehicle environment hazard level represented by the second vehicle-mounted video image set, thereby mapping the data to obtain a first degree value corresponding to the preset state level and a second degree value corresponding to the vehicle environment hazard level. For example, the preset state level and the vehicle environment hazard level may be set from level 1 to level 5, in descending order.
[0043] Specifically, performing data normalization on the preset status levels refers to mapping the preset status levels into numerical values. For example, the first degree value corresponding to the first level is 20 points, and the first degree value corresponding to the fifth level is 100 points.
[0044] Furthermore, performing data normalization on the vehicle environment hazard level refers to mapping the vehicle environment hazard level to a numerical value. For example, the second degree value corresponding to the first level is 20 points, and the second degree value corresponding to the fifth level is 100 points.
[0045] S420, a weighted sum is calculated based on the first degree value, the second degree value, and the preset level weights corresponding to the first degree value and the second degree value respectively to obtain a video image score corresponding to the target vehicle; those skilled in the art set the preset level weights corresponding to the first degree value and the second degree value respectively according to the importance of the driving state and the vehicle environment in actual needs, and usually the preset level weight corresponding to the first degree value is greater than the preset level weight corresponding to the second degree value, which will not be repeated here.
[0046] At step S430, information corresponding to each indicator of the video image distortion is obtained based on a preset linear relationship between the video image score and each indicator corresponding to the video image distortion, thereby determining video image distortion information corresponding to the target vehicle. This preset linear relationship can be understood as a linear relationship pre-set by a person skilled in the art based on a sample of video image scores and a desired video image distortion level. For example, a higher video image score indicates a lower driving safety of the target vehicle, and a certain degree of distortion should be sacrificed to achieve high-ratio video image compression for rapid upload and analysis.
[0047] Specifically, the determined video image distortion information corresponding to the target vehicle refers to normalizing the value of each indicator information to a value between 0 and 1; this can be understood as being the same as the data magnitude used when constructing the target fitting relationship curve.
[0048] As described above, by calculating the video image score through preset status levels and vehicle environment hazard levels, a comprehensive assessment of the driving hazard situation of the target vehicle from two dimensions: the driving user inside the vehicle and the driving environment outside the vehicle is achieved, making the assessment results more realistic and reliable, thereby determining the appropriate video image distortion information and compression ratio information, and compressing the video according to these image information distribution parameters to achieve rapid uploading of the video compression package.
[0049] Furthermore, after step S4, the following steps are also included:
[0050] The first vehicle-mounted video image set and the second vehicle-mounted video image set are respectively compressed according to the video image compression ratio information in the distribution parameter of the image information to be compressed, and the compressed video image sets are uploaded to the cloud.
[0051] As described above, using the video image compression ratio information obtained in advance to compress the video image can achieve a balance between the compression ratio and the video image distortion. By sacrificing a certain degree of distortion to increase the compression multiple, the compressed video can be quickly uploaded to the cloud, making it easier for back-end personnel to conduct specific analysis of the content captured by the video image in a timely manner, and then implement strategies such as speed reduction, lane change or parking for the target vehicle, effectively avoiding the occurrence of certain safety accidents and improving vehicle driving safety.
[0052] In summary, the present invention provides a method for distributing image information, which obtains the first on-board video image and the second on-board video image corresponding to the target vehicle in real time, and can clearly grasp the current driving condition of the target vehicle from both inside and outside the vehicle. When it is monitored from the first on-board video image that the driving user in the target vehicle is in a preset driving state, the first on-board video image set and the second on-board video image set within the current preset time period are obtained, and then based on a number of historical video image samples, a target fitting relationship curve of video image distortion information and video image compression ratio information is constructed. Finally, according to the preset state level corresponding to the preset driving state and the vehicle environment hazard level represented by the second on-board video image set, the distribution parameters of the image information to be compressed are determined. By determining appropriate video image distortion information and compression ratio information, a balance between the compression ratio and the video image distortion degree can be achieved. By sacrificing a certain degree of distortion to increase the compression ratio, the video compression package can be quickly uploaded and analyzed, which is conducive to timely execution of strategies for the target vehicle and improved vehicle driving safety.
[0053] An embodiment of the present invention also provides a non-transitory computer-readable storage medium, which can be set in an electronic device to store at least one instruction or at least one program related to implementing a method in a method embodiment. The at least one instruction or the at least one program is loaded and executed by the processor to implement the image information distribution method provided in the above embodiment.
[0054] An embodiment of the present invention further provides an electronic device including a processor and the aforementioned non-transitory computer-readable storage medium.
[0055] Although some specific embodiments of the present invention have been described in detail by way of examples, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It should also be understood by those skilled in the art that various modifications may be made to the embodiments without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the accompanying technical solutions.
Claims
1. A method for distributing image information, characterized in that: The method comprises the following steps: S1, acquiring in real time a first vehicle-mounted video image and a second vehicle-mounted video image corresponding to a target vehicle; the first vehicle-mounted video image is a video image for monitoring a user driving the vehicle, and the second vehicle-mounted video image is a video image for monitoring an environment outside the vehicle; S2, when it is detected from the first vehicle-mounted video image that the driving user in the target vehicle is in a preset driving state, obtaining a first vehicle-mounted video image set and a second vehicle-mounted video image set within a current preset time period; S3, constructing a target fitting relationship curve between video image distortion information and video image compression ratio information based on a number of historical video image samples; S4, determining the video image distortion information corresponding to the target vehicle based on the preset state level corresponding to the preset driving state and the vehicle environment hazard level represented by the second vehicle-mounted video image set, and determining the video image compression ratio information corresponding to the target vehicle based on the video image distortion information corresponding to the target vehicle and the target fitting relationship curve to obtain the distribution parameters of the image information to be compressed.
2. The image information distribution method according to claim 1, characterized in that: The current preset time period refers to a historical time period corresponding to a preset duration before the current moment.
3. The image information distribution method according to claim 1, characterized in that: The video image distortion information includes information on four indicators, namely, mean square error, peak signal-to-noise ratio, structural similarity index, and multi-scale structural similarity corresponding to the video image distortion degree.
4. The image information distribution method according to claim 3, characterized in that: The S3 step includes the following steps: S301, for any historical video image sample, compress the historical image sample according to several preset compression ratios, and obtain each indicator information corresponding to the video image distortion degree under each preset compression ratio; S302, for any indicator corresponding to the video image distortion, based on k historical video image samples, determining an average value of several indicator information corresponding to any preset compression ratio as new indicator information corresponding to the preset compression ratio itself; S303, performing linear fitting based on a plurality of preset compression ratios and new indicator information corresponding to each preset compression ratio to obtain a linear relationship between the compression ratio and the indicator; S304: The normalized value of the independent variable coefficient in the linear relationship between the compression ratio and the index is used as the index weight corresponding to the index, and the index weight corresponding to the index is substituted into the preset fitting relationship curve. In the middle fitting relationship curve, we get , w j is the indicator weight corresponding to the jth indicator, x j Indicates the indicator information of the j-th indicator, n is the number of indicators, a is the amplification coefficient, and Y is the compression ratio; S305 , obtaining a value of a according to the correspondence between the compression ratio and a plurality of indicator information in each historical video image sample, and obtaining a target fitting relationship curve according to a and the intermediate fitting relationship curve.
5. The image information distribution method according to claim 1, characterized in that: In step S4, the vehicle environment hazard level represented by the second vehicle-mounted video image set is determined through the following steps: S401, based on the second vehicle-mounted video image set, obtaining vehicle information and road information in the vehicle external environment; the vehicle information includes the number of vehicles and vehicle types, and the road information includes road width and road type; S402, determining the vehicle environment hazard level represented by the second vehicle-mounted video image set according to a preset vehicle environment hazard level determination rule; The vehicle environment hazard level determination rule is set based on vehicle information and road information in the vehicle exterior environment.
6. The image information distribution method according to claim 3, characterized in that: In step S4, the video image distortion information corresponding to the target vehicle is determined through the following steps: S410: performing data normalization processing on the preset state level corresponding to the preset driving state and the vehicle environment hazard level represented by the second vehicle-mounted video image set to map a first degree value corresponding to the preset state level and a second degree value corresponding to the vehicle environment hazard level; S420, calculating a weighted sum of the first degree value, the second degree value, and the preset level weights corresponding to the first degree value and the second degree value to obtain a video image score corresponding to the target vehicle; S430 , obtaining information of each indicator corresponding to the video image distortion degree according to a preset linear relationship between the video image score and each indicator corresponding to the video image distortion degree, so as to determine the video image distortion information corresponding to the target vehicle.
7. The image information distribution method according to claim 1, characterized in that: After step S4, the following steps are also included: The first vehicle-mounted video image set and the second vehicle-mounted video image set are respectively compressed according to the video image compression ratio information in the distribution parameter of the image information to be compressed, and the compressed video image sets are uploaded to the cloud.
8. A non-transitory computer-readable storage medium, wherein at least one instruction or at least one program is stored in the storage medium, characterized in that: The at least one instruction or the at least one program segment is loaded and executed by a processor to implement the image information distribution method according to any one of claims 1 to 7.
9. An electronic device, characterized in that: The device comprises a processor and the non-transitory computer-readable storage medium as claimed in claim 8.
Citation Information
Patent Citations
Code rate control method and device for video coding and storage medium
CN115379228A
Emergency video recording method of automobile data recorder and related device
CN120032441A