Vehicle Defogging Method and Device

By obtaining and analyzing the internal and external environment data of the vehicle in real time, and automatically judging and controlling the defog removal operation, the problem of vehicle defog removal delay is solved, and the defog removal efficiency and driving safety are improved.

CN119840556BActive Publication Date: 2025-06-24ZHEJIANG GEELY HLDG GRP CO LTD +1
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510323376.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-19
Publication Date
2025-06-24
Estimated Expiration
2045-03-19

AI Technical Summary

Technical Problem

In the prior art, the vehicle defogging operation is delayed, resulting in the potential threat of driving safety under extreme weather conditions.

Method used

By obtaining the associated data of the target vehicle, including the interior and exterior environment data, we can judge in real time whether the vehicle needs to defog and automatically control the defog operation.

Benefits of technology

It reduces the delay in defogging operation, improves the efficiency and effect of vehicle defogging, and ensures driving safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119840556B_ABST
    Figure CN119840556B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of vehicle control, and discloses a vehicle defogging method and device. The method includes: obtaining associated data of a target vehicle; wherein, the associated data of the target vehicle includes at least one of in-vehicle environment data and out-vehicle environment data; determining whether the target vehicle needs to be defogged according to the associated data of the target vehicle; and if the target vehicle needs to be defogged, controlling the target vehicle to perform defogging.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of vehicle control, and particularly to a vehicle defogging method and device. Background Art

[0002] With the rapid development of the automotive industry, the safety and comfort of vehicles have become the focus of increasing concern among consumers. Under cold or humid weather conditions, key parts of vehicles such as the front windshield, side windows, and rearview mirrors are prone to fogging, seriously affecting the driver's vision and increasing potential safety hazards during driving. Therefore, effectively removing the fog on vehicles has become an important part of ensuring driving safety.

[0003] Currently, the fog on vehicles is often removed manually. Among them, it is required that after the driver discovers that the vehicle is fogged, through manual operations such as using a windshield wiper, cloth, or hot water to remove the fog. This process highly depends on the driver's vision and judgment, that is, the driver needs to first observe the fogging situation of the vehicle with the naked eye and then decide what defogging measures to take.

[0004] However, the lag of manual defogging is mainly reflected in the time difference between the driver discovering the fog and making a response. Since the driver needs to first visually perceive the existence of the fog and then decide to take actions (such as turning on the windshield wiper, etc.), this process often leads to a delay in the defogging operation. Under extreme weather conditions, this lag may seriously threaten driving safety.

[0005] Therefore, how to improve the efficiency of vehicle defogging has become a problem to be solved. Summary of the Invention

[0006] In view of this, the present invention provides a vehicle defogging method and device.

[0007] In a first aspect, the present invention provides a vehicle defogging method, which includes: obtaining associated data of a target vehicle; wherein, the associated data of the target vehicle includes at least one of in-vehicle environment data and out-vehicle environment data; determining whether the target vehicle needs to be defogged according to the associated data of the target vehicle; if the target vehicle needs to be defogged, controlling the target vehicle to perform defogging.

[0008] The vehicle defogging method provided in this embodiment determines whether the target vehicle has conditions that cause the window to fog through at least one of the in-vehicle environment data and the out-vehicle environment data. Once it is detected that the conditions that cause the window to fog occur, the target vehicle can be immediately controlled to perform defogging without the driver manually operating the defogging components of the target vehicle, thereby reducing the delay of the defogging operation. Moreover, the defogging operation is intelligently adjusted according to the in-vehicle and out-vehicle environment data, thereby effectively improving the vehicle defogging effect.

[0009] In a possible implementation, the in-vehicle environment data of the target vehicle includes: in-vehicle temperature data and in-vehicle humidity data; the out-vehicle environment data includes: out-vehicle temperature data and out-vehicle humidity data; and determining whether the target vehicle needs to defog according to the associated data of the target vehicle includes: determining the temperature difference between the out-vehicle temperature data and the in-vehicle temperature data according to the out-vehicle temperature data and the in-vehicle temperature data; determining the out-vehicle relative humidity according to the out-vehicle humidity data and the maximum humidity corresponding to the out-vehicle temperature data; determining the in-vehicle relative humidity according to the in-vehicle humidity data and the maximum humidity corresponding to the in-vehicle temperature data; if at least one of the out-vehicle relative humidity and the in-vehicle relative humidity is greater than the relative humidity threshold and the temperature difference is greater than the temperature difference threshold, determining that the target vehicle needs to defog.

[0010] The vehicle defogging method provided in this embodiment can sense the subtle changes in the vehicle's internal and external environments in real time through the temperature difference between the indoor temperature and the outdoor temperature, and the in-vehicle relative humidity and the out-vehicle relative humidity. That is, whether it is a slight fluctuation in temperature or an increase or decrease in humidity, it can quickly capture the subtle changes in the vehicle's internal and external environments, so as to accurately determine whether the vehicle needs to defog according to the subtle changes in the vehicle's internal and external environments.

[0011] In a possible implementation, the out-vehicle environment data includes rainfall data; and determining whether the target vehicle needs to defog according to the associated data of the target vehicle includes: when the rainfall data is not less than the rainfall threshold, determining that the target vehicle needs to defog.

[0012] The vehicle defogging method provided in this embodiment can distinguish the rainy conditions of the vehicle by detecting the rainfall data in the out-vehicle environment data, such as heavy rain, moderate rain, light rain, etc., and can determine the distribution of raindrops on the glass parts of the vehicle, so that it can accurately determine whether the vehicle needs to defog only considering the rainfall data.

[0013] In a possible implementation, the associated data of the target vehicle further includes: the first to-be-detected image data of the glass parts of the target vehicle; determining whether the target vehicle needs to defog according to the associated data of the target vehicle includes: determining the first defogging judgment result according to the first to-be-detected image data of the glass parts of the target vehicle, the labeled image data corresponding to the first to-be-detected image data, and the target fogging threshold; where the labeled image data corresponding to the first to-be-detected image data is the image data of the glass parts of the target vehicle collected when the target vehicle does not need to defog; determining whether the target vehicle needs to defog according to the first defogging judgment result.

[0014] The vehicle defogging method provided in this embodiment increases the conditions for determining whether a vehicle needs to be defogged by introducing the first to-be-tested image data of the glass part of the target vehicle, and determines whether the vehicle needs to be defogged based on the defogging judgment result determined by combining the labeled image data corresponding to the first to-be-tested image data and the target fogging threshold, thereby improving the accuracy of vehicle defogging judgment.

[0015] In a possible implementation manner, determining the first defogging judgment result according to the first to-be-tested image data of the glass part of the target vehicle, the labeled image data corresponding to the first to-be-tested image data, and the target fogging threshold includes: determining the first gray gradient component in the horizontal direction and the second gray gradient component in the vertical direction of each pixel point in the first to-be-tested image data; determining the gradient amplitude corresponding to each pixel point according to the first gray gradient component and the second gray gradient component; determining the gray gradient mean value corresponding to the first to-be-tested image data according to the gradient amplitude corresponding to each pixel point; determining the first defogging judgment result according to the ratio of the gray gradient mean value to the target gray gradient and the target fogging threshold; wherein, the target gray gradient is calculated from the labeled image data corresponding to the first to-be-tested image data; determining whether the target vehicle needs to be defogged according to the first defogging judgment result includes: when the ratio of the gray gradient mean value to the target gray gradient is less than the target fogging threshold, determining that the target vehicle needs to be defogged.

[0016] The vehicle defogging method provided in this embodiment can determine the precise information of the gray change of each pixel point in the image by determining the first gray gradient component in the horizontal direction and the second gray gradient component in the vertical direction of each pixel point in the to-be-tested image data. Then, according to the gray gradient components in the horizontal and vertical directions of each pixel point, and based on the mean value of the gradient amplitudes of all pixel points in the to-be-tested image data, the gray gradient mean value is obtained, and the ratio of the gray gradient mean value to the target gray gradient is compared with the fogging threshold, so as to quantify the difference in gray gradient between the to-be-tested image and the target image, thereby accurately determining whether the vehicle needs to be defogged.

[0017] In a possible implementation manner, determining whether the target vehicle needs to be defogged according to the first defogging judgment result includes: using a pre-trained defogging judgment model to obtain a second defogging judgment result according to the associated data; determining whether the target vehicle needs to be defogged according to the first defogging judgment result and the second defogging judgment result.

[0018] The vehicle defogging method provided in this embodiment introduces the first to-be-tested image data of the glass component of the target vehicle, the labeled image data corresponding to the first to-be-tested image data, and the first defogging judgment result determined by the target fogging threshold as a judgment condition for determining whether the vehicle performs defogging. Instead of determining whether the vehicle needs to perform defogging only through the first defogging judgment result, it determines whether the vehicle needs to perform defogging by combining the first defogging judgment result and the second defogging judgment result of a pre-trained defogging judgment model, avoiding misjudgment of vehicle defogging caused by inaccurate judgment of the defogging judgment model, thereby improving the accuracy of vehicle defogging judgment.

[0019] In a possible implementation manner, the method further includes: inputting the second to-be-tested image data of the glass component of the target vehicle into the pre-trained defogging judgment model to obtain a third defogging judgment result; repeatedly performing the search operation for the target fogging threshold until the target fogging threshold is determined. The search operation for the target fogging threshold includes: determining the fourth defogging judgment result for the search operation according to the second to-be-tested image data of the glass component of the target vehicle, the labeled image data corresponding to the second to-be-tested image data, and the candidate fogging threshold for the search operation; when the third defogging judgment result is different from the fourth defogging judgment result, determining the candidate fogging threshold for the next search operation according to a preset value and the candidate fogging threshold for the search operation; when the third defogging judgment result is the same as the fourth defogging judgment result, determining the candidate fogging threshold for the search operation as the target fogging threshold.

[0020] In the vehicle defogging method provided in this embodiment, when the third defogging judgment result is different from the fourth defogging judgment result, it indicates that the fourth defogging judgment result obtained through image processing is inaccurate, and it is necessary to adjust the candidate fogging threshold to determine the target fogging threshold, that is, continuously adjust the candidate fogging threshold for the target fogging threshold search operation according to a preset value, so that when the third defogging judgment result is the same as the fourth defogging judgment result, the target fogging threshold is accurately determined.

[0021] In a possible implementation manner, determining whether the target vehicle needs to perform defogging according to the associated data of the target vehicle includes: determining the fogging judgment parameter corresponding to the associated data of the target vehicle based on the associated data of the target vehicle; where the fogging judgment parameter includes a temperature parameter and a humidity parameter, and the associated data of the target vehicle is data that changes in real time; determining whether the target vehicle needs to perform defogging according to the comparison result between the fogging judgment parameter and the associated data of the target vehicle.

[0022] For the vehicle defogging method provided in this embodiment, the temperature parameter and the humidity parameter can be changed through associated data, and the associated data is data that changes in real time. That is, different temperature parameters and humidity parameters can be determined according to different associated data. Then, through the associated data and the fogging judgment parameter corresponding to the associated data, it can be accurately determined whether the target vehicle needs to be defogged.

[0023] In a possible implementation manner, the above method further includes: inputting the associated data into a pre-trained defogging judgment model to obtain a predicted defogging probability corresponding to the associated data, where the predicted defogging probability represents the probability of needing to be defogged under the condition represented by the associated data; determining a fifth defogging judgment result corresponding to the associated data according to the comparison result between the predicted defogging probability corresponding to the associated data and the defogging probability threshold; when the fifth defogging judgment result corresponding to the associated data is different from the annotation result of the associated data, updating the parameters of the pre-trained defogging judgment model.

[0024] For the vehicle defogging method provided in this embodiment, by continuously updating the parameters of the model through the associated data, the model can better adapt to various actual situations and improve the accuracy of determining whether the target vehicle needs to be defogged. In addition, when the pre-trained defogging judgment model faces new and unseen data, its performance often depends on its generalization ability. By continuously updating the parameters of the pre-trained defogging judgment model with the associated data of the new target vehicle and the corresponding annotation results, the adaptability of the model to new data can be enhanced and its generalization performance can be improved.

[0025] In a possible implementation manner, the associated data further includes at least one of vehicle own data and other vehicle data; the vehicle own data includes at least one of the season data where the target vehicle is located, the regional location where the target vehicle is located, and the vehicle speed data; the other vehicle data includes at least one of the season data where the other vehicle is located, the regional location where the other vehicle is located, and the vehicle speed data.

[0026] For the vehicle defogging method provided in this embodiment, since the possibility of window fogging may vary significantly in different seasons, different regions, and at different vehicle speeds, by introducing more dimensional data (season, regional location, and vehicle speed), the model can more comprehensively understand the current environmental conditions, thereby improving the accuracy of determining whether the target vehicle needs to be defogged.

[0027] In a possible implementation manner, the image data collected when the target vehicle meets the preset conditions is used as the annotation image data corresponding to the first image data to be measured; where the preset conditions include: the current weather is fog-free and precipitation-free, the visibility of the glass parts of the target vehicle is greater than the visibility threshold, the relative humidity is lower than the relative humidity threshold, and the defogging function of the target vehicle is not turned on.

[0028] The vehicle defogging method provided in this embodiment can truly reflect the clear state of the vehicle glass under the current weather conditions without fogging, precipitation, and with the visibility of the vehicle glass being greater than the visibility threshold through the image data collected in the preset state. It can accurately determine the images of the glass parts of the vehicle that do not require defogging, so as to more accurately predict whether the vehicle needs defogging through the images of the glass parts that do not require defogging.

[0029] In a second aspect, the present invention provides a vehicle defogging device, which includes: an acquisition module for acquiring the associated data of the target vehicle; wherein, the associated data of the target vehicle includes at least one of the in-vehicle environment data and the out-vehicle environment data; a determination module for determining whether the target vehicle needs to be defogged according to the associated data of the target vehicle; and a control module for controlling the target vehicle to defog if the target vehicle needs to be defogged.

[0030] In a third aspect, the present invention provides a computer device, including: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the vehicle defogging method according to the first aspect or any corresponding embodiment thereof.

[0031] In a fourth aspect, the present invention provides a computer-readable storage medium, on which computer instructions are stored, and the computer instructions are used to cause a computer to execute the vehicle defogging method according to the first aspect or any corresponding embodiment thereof.

[0032] In a fifth aspect, the present invention provides a computer program product, including computer instructions, and the computer instructions are used to cause a computer to execute the vehicle defogging method according to the first aspect or any corresponding embodiment thereof.

[0033] In a sixth aspect, the present invention provides a vehicle, including a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the vehicle defogging method according to the first aspect or any corresponding embodiment thereof. Description of the Drawings

[0034] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the prior art. Obviously, the drawings in the following description are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0035] Figure 1 It is a flowchart of the vehicle defogging method according to an embodiment of the present invention;

[0036] Figure 2 is a schematic flowchart of another vehicle defogging method according to an embodiment of the present invention;

[0037] Figure 3 is a schematic diagram of a vehicle defogging method according to an embodiment of the present invention;

[0038] Figure 4 is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed implementation manners

[0039] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0040] According to an embodiment of the present invention, an embodiment of a vehicle defogging method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.

[0041] In this embodiment, a vehicle defogging method is provided, which can be specifically executed by a computer device on the vehicle. For example, it can be executed by a vehicle controller, etc. Figure 1 is a schematic flowchart of a vehicle defogging method according to an embodiment of the present invention, as Figure 1 shown, and the process includes the following steps:

[0042] Step S101, obtain the associated data of the target vehicle; where the associated data of the target vehicle includes at least one of the in-vehicle environment data and the out-vehicle environment data.

[0043] The target vehicle can be any vehicle to which the method provided by any embodiment of the present disclosure can be applied.

[0044] The associated data of the vehicle can characterize various information of the vehicle's internal and external environments. The associated data of the vehicle includes at least one of the in-vehicle environment data and the out-vehicle environment data, and specifically can include the following multiple situations: Situation 1: In-vehicle environment data; Situation 2: Out-vehicle environment data; Situation 3: In-vehicle environment data and out-vehicle environment data.

[0045] As an example, for the above-mentioned situation 1: The in-vehicle environment data may include the in-vehicle humidity and the in-vehicle temperature. For example, the in-vehicle humidity is 90% and the in-vehicle temperature is 22°C. The judgment logic may be that if the in-vehicle humidity is higher than the preset threshold (such as 85%) and the in-vehicle temperature is moderate (to avoid the influence of extreme high or low temperatures on the judgment), then the glass fogs up due to the high in-vehicle humidity, and the vehicle needs to defog.

[0046] As an example, for the above-mentioned situation 1: The in-vehicle environment data may include the in-vehicle air quality. Among them, the judgment logic may be that poor air quality leads to poor ventilation in the vehicle, indirectly increasing the fogging risk, then it is judged that the vehicle needs to defog.

[0047] As an example, for the above-mentioned situation 2: The out-vehicle environment data may include the out-vehicle temperature and the out-vehicle humidity. The judgment logic may be that the out-vehicle temperature is low and the humidity is high, then it is determined that the vehicle needs to defog.

[0048] As an example, for the above-mentioned situation 2: The out-vehicle environment data may include rainfall data. The judgment logic may be that when it is judged to be heavy rain according to the current rainfall, it is determined that the vehicle needs to defog.

[0049] As an example, for the above-mentioned situation 3: The in-vehicle environment data includes: in-vehicle temperature data, in-vehicle humidity data; the out-vehicle environment data includes: out-vehicle temperature data, out-vehicle humidity data. The judgment logic may be to determine whether the vehicle needs to defog based on the temperature difference and relative humidity inside and outside the vehicle.

[0050] In a possible implementation, the associated data of the vehicle may further include vehicle speed data and the position data of the target vehicle. Among them, it can be determined whether the target vehicle needs to defog through a defogging judgment model. Among them, the above-mentioned situations 1 to 3, vehicle speed data, and the position data of the target vehicle can all be used as inputs to the defogging judgment model when determining whether the target vehicle needs to defog.

[0051] As an example, the defogging judgment model may represent a pre-trained model for determining whether the target vehicle defogs. Among them, the defogging judgment model may be a Support Vector Machines (SVM), a neural network model (such as a convolutional neural network), a random forest model, etc., which are not specifically limited here.

[0052] Step S102, determine whether the target vehicle needs to defog according to the associated data of the target vehicle.

[0053] As can be seen from the above, there are corresponding judgment methods for whether the target vehicle needs to defog in the above cases 1 to 3. For example, the in-vehicle environment data may include the in-vehicle humidity, and the out-of-vehicle environment data may include the out-of-vehicle humidity. The judgment method may be that when the relative humidity of the in-vehicle humidity and / or the out-of-vehicle humidity is greater than the relative humidity threshold, it is determined that the vehicle needs to defog, etc. For another example, the in-vehicle environment data may include the in-vehicle temperature, and the out-of-vehicle environment data may include the out-of-vehicle temperature. The judgment method may be that when the temperature difference between the in-vehicle temperature and the out-of-vehicle temperature is greater than the temperature threshold, it is determined that the vehicle needs to defog, etc.

[0054] Step S103, if the target vehicle needs to defog, control the target vehicle to defog.

[0055] After determining that the vehicle needs to defog, the defog function of the vehicle can be executed by controlling the controller of the target vehicle.

[0056] As an example, functions such as front windshield defogging and side window defogging can be turned on. The temperature and wind speed of the air conditioning system can also be adjusted, and the windshield wiper of the vehicle can also be turned on, etc., which are not specifically limited here.

[0057] The vehicle defogging method provided in this embodiment determines whether the target vehicle has a condition that causes the window to fog through at least one of the in-vehicle environment data and the out-of-vehicle environment data. Once it is detected that there is a condition that causes the window to fog, the target vehicle can be immediately controlled to defog, without the driver manually operating the defogging components of the target vehicle, thereby reducing the delay of the defogging operation. And, the defogging operation is intelligently adjusted according to the in-vehicle and out-of-vehicle environment data, thereby effectively improving the vehicle defogging effect.

[0058] In a possible implementation manner, taking the above case 3 as an example, when the vehicle defogging method is implemented through a defogging judgment model, it may specifically include:

[0059] When the user manually turns on the defogging function, obtain the first associated data of the target vehicle, and perform model training on the defogging judgment model according to the first associated data of the target vehicle to obtain an updated defogging judgment model, where the associated data includes in-vehicle environment data, out-of-vehicle environment data, vehicle speed data, and the position data of the target vehicle; when the second associated data of the target vehicle is obtained and the user does not manually turn on the defogging function, input the second associated data of the target vehicle into the defogging judgment model to determine the defogging judgment result; based on the defogging judgment result, determine whether the target vehicle needs to defog, and when it is determined that the target vehicle needs to defog, control the target vehicle to defog.

[0060] It should be noted that the defogging judgment model is a pre-trained defogging judgment model. The first associated data and the second associated data can be different associated data. For example: the first associated data can include temperature data and humidity data; among them, the temperature data in the first associated data can be M1, and the humidity data in the first associated data can be N1. The second associated data can also include temperature data and humidity data; among them, the temperature data in the second associated data can be M2, and the humidity data in the second associated data can be N2.

[0061] The way for the user to manually turn on the defogging function can be that the user clicks the defogging function button, etc. After the user manually turns on the defogging function, the vehicle controller can respond to the trigger operation of the user manually turning on the defogging function and turn on the electric heater configured in the vehicle, so as to achieve the purpose of defogging.

[0062] In specific implementation, during the driving of the vehicle, the defogging judgment model needs to determine in real time whether the vehicle needs to be defogged according to the first associated data of the target vehicle. Among them, when the user manually turns on the defogging function, the user's defogging requirement is that the vehicle needs to be defogged, and the defogging judgment result of the defogging judgment model is that the vehicle does not need to be defogged, that is, the defogging judgment result of the defogging judgment model is inaccurate, and the defogging judgment result violates the user's defogging requirement. Then, the defogging judgment model needs to be trained to improve the accuracy of the defogging judgment model and obtain an updated defogging judgment model.

[0063] As an example, when the defogging judgment model can be a support vector machine, the training process of the defogging judgment model can be:

[0064] First, it is necessary to partition and seasonally distinguish the geographical locations on the cloud platform and encode them, representing them with specific hexadecimal values, for distinguishing data between different regions and seasons in the neural network model code.

[0065] Input the in-vehicle environment data, out-of-vehicle environment data, vehicle speed data, and the position data of the target vehicle as features into the neural network model, and whether to start the defogging function as the target value (0 or 1). Divide the data set into a training set, a test set, and a validation set through the train_test_split function, and use the training set as the model training data for input, and perform model training through the support vector machine (Support Vector Machine, SVM) class function in the sklearn library function.

[0066] Use the validation set separated from the data set to verify the defogging judgment model, adjust the hyperparameters of the machine learning model through grid search, reduce misclassification and clarify the decision boundary, and accept the model learning results through accuracy and recall metrics.

[0067] The output result of the updated defogging judgment model can be verified using a test set to obtain a more complete scenario classification of whether the user enables or disables the defogging function, enabling it to be applied to actual new data.

[0068] The usage process of the updated defogging judgment model can be as follows: When the current season is spring and user A is driving on the coastal highway in Guangdong, the temperature difference between the inside and outside of the vehicle seriously affects the line of sight. Therefore, user A manually turns on the defogging (corresponding to the southern coast, spring, heavy rain, and highway respectively, and the matching user behavior is to manually turn on the defogging function - assign a value of 1). The usage process of the updated defogging judgment model can be that when the current season is spring, user A is driving on the coastal highway in Guangdong and the temperature difference between the inside and outside of the vehicle seriously affects the line of sight, it is determined that the target vehicle needs to defog; When user A drives back to his hometown in Hubei in winter and stops at a rest area midway to rest, and suddenly there is a heavy rain, but user A has no defogging requirement. Therefore, the matching user behavior result is that the defogging is not turned on (assign a value of 0). The usage process of the updated defogging judgment model can be that when the current season is winter, user A drives back to his hometown in Hubei and stops at a rest area midway to rest, and suddenly there is a heavy rain, it is determined that the target vehicle does not need to defog.

[0069] The vehicle defogging method provided in this embodiment trains the defogging judgment model by obtaining the in-vehicle environment data, out-vehicle environment data, vehicle speed data, and the position data of the target vehicle, and determines whether the vehicle needs to defog according to the defogging judgment model. It can intelligently judge whether the vehicle needs to defog, and can immediately control the vehicle to defog when the vehicle meets the defogging conditions, improving the efficiency of vehicle defogging.

[0070] In addition, considering that the user's manual activation of the defogging function reflects that the judgment result of the defogging judgment model is inconsistent with the user's defogging requirement. When the user manually activates the defogging function, it is necessary to train the defogging judgment model according to the associated data of the target vehicle to improve the accuracy of the defogging judgment model, so that the defogging judgment model can better meet the user's defogging requirement, thereby improving the accuracy of vehicle defogging.

[0071] In this embodiment, a vehicle defogging method is provided, which can be specifically executed by a computer device on the vehicle. For example, it can be executed by a vehicle controller. Figure 2 It is a flowchart of another vehicle defogging method according to an embodiment of the present invention. As Figure 2 shown, the process includes the following steps:

[0072] Step S201, obtain the associated data of the target vehicle. For details, please refer to Figure 1 Step S101 of the embodiment shown, which will not be elaborated here.

[0073] Step S202: Determine whether the target vehicle needs defogging based on the associated data of the target vehicle.

[0074] Specifically, the in-vehicle environment data of the target vehicle includes: in-vehicle temperature data, in-vehicle humidity data; the out-of-vehicle environment data includes: out-of-vehicle temperature data, out-of-vehicle humidity data; among them, the above step S202 includes:

[0075] Step S2021: Determine the temperature difference between the out-of-vehicle temperature data and the in-vehicle temperature data based on the out-of-vehicle temperature data and the in-vehicle temperature data.

[0076] The out-of-vehicle temperature data can represent the current temperature information of the vehicle's external environment. The in-vehicle temperature data can represent the current temperature information of the vehicle's internal environment. In specific implementation, when determining the out-of-vehicle temperature data and the in-vehicle temperature data, the out-of-vehicle temperature data can be subtracted from the in-vehicle temperature data to obtain the temperature difference.

[0077] As an example, when the out-of-vehicle temperature is 20°C and the in-vehicle temperature is 15°C, the temperature difference can be 5°C.

[0078] Step S2022: Determine the out-of-vehicle relative humidity based on the out-of-vehicle humidity data and the maximum humidity corresponding to the out-of-vehicle temperature data.

[0079] The out-of-vehicle humidity data can represent the current humidity information of the vehicle's external environment. The out-of-vehicle humidity data can represent the current humidity information outside the vehicle. The maximum humidity can represent the maximum amount of water vapor that the air can contain under the current temperature information of the vehicle's external environment, and can be represented by the humidity when the relative humidity reaches 100%. In specific implementation, the out-of-vehicle humidity data and the maximum humidity at the corresponding out-of-vehicle temperature can be used to calculate the outdoor relative humidity.

[0080] As an example, the out-of-vehicle relative humidity can be calculated by: out-of-vehicle relative humidity = (out-of-vehicle humidity / maximum humidity at out-of-vehicle temperature) * 100%.

[0081] As another example, it can also be determined by the following formula: RH1 = e1 / E1 × 100%; where RH1 is the out-of-vehicle relative humidity, e1 is the actual vapor pressure, and E1 is the saturated vapor pressure. Among them, the actual vapor pressure can be determined by the out-of-vehicle humidity, and the saturated vapor pressure can be determined by the maximum humidity at the out-of-vehicle temperature.

[0082] Step S2023: Determine the in-vehicle relative humidity based on the in-vehicle humidity data and the maximum humidity corresponding to the in-vehicle temperature data.

[0083] The in-vehicle humidity data can represent the current humidity information of the vehicle interior environment. The in-vehicle humidity data can represent the current humidity information inside the vehicle. The maximum humidity can represent the maximum amount of water vapor that the air can contain under the current temperature information of the vehicle interior environment, and can be represented by the humidity when the relative humidity reaches 100%. Specifically, in implementation, the in-vehicle humidity data and the maximum humidity at the corresponding in-vehicle temperature can be used to calculate the indoor relative humidity.

[0084] Step S2024, if at least one of the out-vehicle relative humidity and the in-vehicle relative humidity is greater than the relative humidity threshold, and the temperature difference is greater than the temperature difference threshold, it is determined that the target vehicle needs to defog.

[0085] The relative humidity threshold can be a threshold for judging whether the relative humidity is too high. Among them, the relative humidity threshold can be 90% etc., and no specific limitation is made here. The temperature difference threshold can be a threshold for judging whether the temperature difference is too high. Among them, the temperature difference threshold can be 5°C etc., and no specific limitation is made here. Specifically, by judging at least one of the out-vehicle relative humidity and the in-vehicle relative humidity, and various factors of the temperature difference, it is determined whether the target vehicle needs to defog.

[0086] As an example, the vehicle has been parked overnight in cold and foggy weather, the out-vehicle temperature is -2°C, and the out-vehicle humidity is 95%; the interior of the vehicle has maintained a certain temperature and humidity due to the use by passengers the previous night, the in-vehicle temperature is 10°C, and the in-vehicle humidity is 50%. Then it is determined that the vehicle needs to defog.

[0087] As an example, the relative humidity threshold is 90%, and the temperature difference threshold is 5°C. If the out-vehicle relative humidity is 95%, the in-vehicle relative humidity is 65%, and the temperature difference is 8°C, then because the out-vehicle relative humidity is greater than the threshold and the temperature difference is also greater than the threshold, it is determined that the vehicle needs to defog.

[0088] Step S203, if the target vehicle needs to defog, control the target vehicle to defog. For details, please refer to Figure 1 Step S103 of the embodiment shown, which will not be elaborated here.

[0089] The vehicle defogging method provided in this embodiment can sense the subtle changes in the vehicle interior and exterior environments in real time through the temperature difference between the indoor temperature and the outdoor temperature, the in-vehicle relative humidity and the out-vehicle relative humidity. That is, whether it is a slight fluctuation in temperature or an increase or decrease in humidity, it can quickly capture the subtle changes in the vehicle interior and exterior environments, so as to accurately determine whether the vehicle needs to defog according to the subtle changes in the vehicle interior and exterior environments.

[0090] In a possible implementation manner, the out-vehicle environment data includes rainfall data; wherein, the above step S202 includes: when the rainfall data is not less than the rainfall threshold, it is determined that the target vehicle needs to defog.

[0091] Rainfall data can represent the real-time rainfall information of the environment where the vehicle is located. The rainfall threshold can be used to indicate the condition for judging whether the current rainfall has reached the trigger for the defogging operation.

[0092] In specific implementation, the rainfall information of the environment where the target vehicle is located can be obtained in real time through a rainfall sensor or other meteorological data sources installed on the vehicle. A reasonable rainfall threshold can be preset according to factors such as historical meteorological data and user preferences. Compare the rainfall data obtained in real time with the rainfall threshold. If the rainfall data is not less than the rainfall threshold (i.e., the rainfall is large and may cause the windshield to fog up), it is determined that the target vehicle needs to perform defogging; otherwise, if the rainfall data is less than the rainfall threshold, it is judged that the vehicle does not need to perform defogging.

[0093] In a possible implementation manner, the rainfall threshold can be set according to different regions or determined according to historical data, and no specific limitation is made here, and it can be implemented by those skilled in the art.

[0094] As an example, in humid and rainy regions, due to frequent and large rainfall, the rainfall threshold can be set relatively high. In dry and less rainy regions, due to scarce and small rainfall, the rainfall threshold can be set relatively low to ensure that the defogging operation can be triggered in a timely manner under limited rainfall conditions.

[0095] As an example, by analyzing the historical meteorological data of the region where the target vehicle is located, especially the rainfall amount and rainfall frequency, the setting of the rainfall threshold can be further optimized. For example, if it is found that the rainfall amount is often greater than a certain specific value and the windshield fogs up during a certain period in the historical data, this value can be used as the rainfall threshold.

[0096] The vehicle defogging method provided in this embodiment can distinguish the rainy conditions of the vehicle by detecting the rainfall data in the external environment data of the vehicle, such as heavy rain, moderate rain, light rain, etc., and can determine the distribution of raindrops on the glass parts of the vehicle, so that it is possible to accurately determine whether the vehicle needs to perform defogging only considering the rainfall data.

[0097] In order to adjust the defogging power of the target vehicle, in a possible implementation manner, the above vehicle defogging method may further include: when the rainfall data is not less than the rainfall threshold, input the rainfall data and the vehicle speed data into the defogging control model to determine the defogging power, and based on the defogging power, control the target vehicle to perform defogging.

[0098] When the vehicle needs to defog, it is first necessary to detect whether the rainfall data is not less than the rainfall threshold. Among them, the rainfall threshold can indicate whether it is raining. When the rainfall data is not less than the rainfall threshold, the rainfall data and vehicle speed data are input into the defog control model to determine the defog power, and the vehicle is defogged according to the defog power. For example: when the speed is low and the rainfall is small, reduce the defog heating power; otherwise, use the maximum power for heating. The defog power can adjust the temperature emitted by the defog heater of the vehicle, thereby controlling the target vehicle to defog.

[0099] For the vehicle defogging method provided in this embodiment, according to the real-time rainfall data and vehicle speed data, the defog control model can dynamically adjust the defog power, and the defog power calculated by the model is more accurate, avoiding the problems of over-defogging or incomplete defogging that may be caused by traditional fixed-power defogging.

[0100] In a possible implementation manner, the associated data of the target vehicle further includes: the first to-be-detected image data of the glass part of the target vehicle, where the above step S202 includes:

[0101] Step S301, determining a first defogging judgment result according to the first to-be-detected image data of the glass part of the target vehicle, the labeled image data corresponding to the first to-be-detected image data, and the target fogging threshold; where the labeled image data is the image data of the glass part of the target vehicle collected when the target vehicle does not need to defog.

[0102] The first to-be-detected image data can be the image data of the front windshield, rear windshield, front camera, rearview mirror, etc. of the vehicle. Among them, the first to-be-detected image data can be real-time image data. Specifically, it can be detected by an image sensor of the vehicle, etc., and no specific limitation is made here.

[0103] The target fogging threshold can indicate that the first to-be-detected image will not cause a change in the gray gradient due to fogging. The labeled image data corresponding to the first to-be-detected image data is the image data of the glass part of the target vehicle collected when the target vehicle does not need to defog, that is, the labeled image data corresponding to the first to-be-detected image data can be pre-collected data.

[0104] Specifically, when implementing, a camera or other image acquisition device can be used to obtain the first to-be-detected image data of the glass part of the target vehicle. The labeled image data of the glass part collected when the target vehicle does not need to defog can also be retrieved from the storage system.

[0105] When determining the first defogging judgment result, an image processing algorithm can be used to determine the difference between the mean gray gradient of the first image data to be measured and the gray gradient of the labeled image data corresponding to the first image data to be measured. According to the comparison result between the gray gradient ratio of the mean gray gradient of the first image data to be measured and the gray gradient of the labeled image data corresponding to the first image data to be measured and the target fogging threshold, it is judged whether the clarity of the glass part in the first image data to be measured is lower than the reference level of the clarity of the glass part in the labeled image data, so as to determine that the target vehicle needs to defog. For example: If the first image to be measured shows that there is significant fog or water droplets on the glass part, affecting the field of view clarity, the reference level of the clarity of the glass part in the labeled image data corresponding to the first image data to be measured is no fog or water droplets, and the clarity of the glass part in the first image data to be measured is lower than the reference level in the labeled image data corresponding to the first image data to be measured, then it is determined that the vehicle needs to perform a defogging operation.

[0106] Specifically, step S301 includes:

[0107] Step S3011, determine the first gray gradient component in the horizontal direction and the second gray gradient component in the vertical direction of each pixel point in the first image data to be measured.

[0108] A pixel point can represent the smallest unit in an image, and each pixel point contains information such as color and brightness. Among them, the first image data to be measured can be gray image data. The first gray gradient component can represent the brightness change rate in the horizontal direction. The second gray gradient component can represent the brightness change rate in the vertical direction.

[0109] In specific implementation, the gray difference between each pixel point in the image data to be measured and its horizontally adjacent pixel point can be calculated to obtain the gray gradient in the horizontal direction. The gray difference between each pixel point in the image data to be measured and its vertically adjacent pixel point can be calculated to obtain the gray gradient in the vertical direction.

[0110] Step S3012, according to the first gray gradient component and the second gray gradient component, determine the gradient amplitude corresponding to each pixel point.

[0111] The gradient amplitude of each pixel point can be calculated according to the Pythagorean theorem or an equivalent method, combining the gray gradient components in the horizontal and vertical directions. Among them, the gradient amplitude can indicate the comprehensive intensity of the brightness change of the pixel point.

[0112] Step S3013, according to the gradient amplitude corresponding to each pixel point, determine the mean gray gradient corresponding to the first image data to be measured.

[0113] Calculate the average value of the gradient amplitudes of all pixel points in the image to obtain the mean gray gradient. The mean gray gradient can indicate the overall brightness change degree of the image and can be used to evaluate the clarity of the image.

[0114] Step S3014: Determine the third defogging judgment result based on the ratio of the mean gray gradient to the target gray gradient and the target fogging threshold. When the ratio of the mean gray gradient to the target gray gradient is less than the target fogging threshold, determine that the target vehicle needs to perform defogging, where the target gray gradient is calculated from the labeled image data corresponding to the first image data to be measured.

[0115] The target gray gradient is the mean gray gradient of the labeled image data corresponding to the first image data to be measured. Specifically, in implementation, calculate the ratio of the mean gray gradient of the second image data to be measured to the target gray gradient. Compare the ratio of the mean gray gradient of the second image data to be measured to the target gray gradient with the target fogging threshold. Among them, if the ratio of the mean gray gradient of the second image data to be measured to the target gray gradient is less than the target fogging threshold, the target vehicle needs to perform defogging.

[0116] As an example, in the initial judgment stage, the target gray gradient G = the mean gray gradient G0, and calculate the fogging parameter G0 / G = 1; when G0 is much smaller than G, it is judged that the fogging probability is high at this time, and the vehicle needs to perform defogging, output 1 (the vehicle needs to perform defogging), otherwise output 0 (the vehicle does not need to perform defogging).

[0117] Step S302: Determine whether the target vehicle needs to perform defogging according to the first defogging judgment result.

[0118] After determining the first defogging judgment result, it can be directly determined whether the target vehicle needs to perform defogging according to the first defogging judgment result. For example: if the first defogging judgment result is defogging, then it is determined that the target vehicle needs to perform defogging.

[0119] Specifically, the above step S302 includes:

[0120] Step S3021: Use the pre-trained defogging judgment model to obtain the second defogging judgment result according to the associated data.

[0121] The associated data can be used as the input of the pre-trained defogging judgment model, and the second defogging judgment result can be used as the output of the pre-trained defogging judgment model.

[0122] Step S3022: Determine whether the target vehicle needs to perform defogging according to the first defogging judgment result and the second defogging judgment result.

[0123] It can be determined whether the vehicle needs to perform defogging by combining the first defogging judgment result and the second defogging judgment result. Among them, when any one or more of the first defogging judgment result and the second defogging judgment result indicate that the vehicle needs to perform defogging, it is determined that the target vehicle needs to perform defogging.

[0124] The vehicle defogging method provided in this embodiment increases the conditions for determining whether the vehicle needs defogging by introducing the first image data to be measured of the glass part of the target vehicle, and determines whether the vehicle performs defogging based on the defogging judgment result determined by combining the labeled image data and the target fogging threshold, thereby improving the accuracy of vehicle defogging judgment.

[0125] In addition, by determining the first gray gradient component in the horizontal direction and the second gray gradient component in the vertical direction of each pixel point in the image data to be measured, the precise information of the gray change of each pixel point in the image can be determined. Then, based on the gray gradient components in the horizontal and vertical directions of each pixel point, and according to the mean value of the gradient amplitudes of all pixel points in the image data to be measured, the gray gradient mean value is obtained, and the ratio of the gray gradient mean value to the target gray gradient is compared with the fogging threshold, so as to quantify the difference in gray gradient between the image to be measured and the target image, and thus accurately determine whether the vehicle needs defogging.

[0126] In addition, introducing the first defogging judgment result determined by the first image data to be measured of the glass part of the target vehicle, the labeled image data and the target fogging threshold as a judgment condition for determining whether the vehicle performs defogging, not only determines whether the vehicle needs defogging through the first defogging judgment result, but determines whether the vehicle needs defogging through the combination of the first defogging judgment result and the prediction result, avoiding misjudgment of vehicle defogging in the case of inaccurate judgment of the defogging judgment model, thereby improving the accuracy of vehicle defogging judgment.

[0127] In a possible implementation manner, the above method further includes:

[0128] Step S401: Input the second image data to be measured of the glass part of the target vehicle into a pre-trained defogging judgment model to obtain a third defogging judgment result.

[0129] The third defogging judgment result can indicate whether the vehicle needs defogging judged by the defogging judgment model. Specifically, the second image data to be measured of the glass part can be used as the input of the defogging judgment model, and the third defogging judgment result can be used as the output of the defogging judgment model.

[0130] Step S402: Repeatedly perform the search operation for the target fogging threshold until the target fogging threshold is determined. The search operation for the target fogging threshold includes: determining the fourth defogging judgment result for the search operation according to the second image data to be measured of the glass part of the target vehicle, the labeled image data corresponding to the second image data to be measured, and the candidate fogging threshold for the search operation;

[0131] Step S403: When the third defogging judgment result is different from the fourth defogging judgment result, determine the candidate fogging threshold for the next search operation according to the preset value and the candidate fogging threshold targeted by the search operation.

[0132] The preset value can be set manually. Among them, the preset value can be 2% or 3%, etc., and no specific limitation is made here.

[0133] In specific implementation, if the third defogging judgment result is different from the fourth defogging judgment result, it indicates that the fourth defogging judgment result obtained by image processing is inaccurate, and it is necessary to adjust the candidate fogging threshold according to the preset value to determine the candidate fogging threshold for the next search operation.

[0134] Step S404: When the third defogging judgment result is the same as the fourth defogging judgment result, determine the candidate fogging threshold targeted by the search operation as the target fogging threshold.

[0135] When the third defogging judgment result is the same as the fourth defogging judgment result, that is, the candidate fogging threshold targeted by the search operation corresponding to the fourth defogging judgment result can ensure that the gray gradient of the second image to be measured will not change due to fogging, and the candidate fogging threshold targeted by the search operation can be determined as the target fogging threshold.

[0136] In the vehicle defogging method provided in this embodiment, when the third defogging judgment result is different from the fourth defogging judgment result, it indicates that the fourth defogging judgment result obtained by image processing is inaccurate, and it is necessary to adjust the candidate fogging threshold to determine the target fogging threshold, that is, continuously adjust the candidate fogging threshold targeted by the target fogging threshold search operation according to the preset value, so that when the third defogging judgment result is the same as the fourth defogging judgment result, the target fogging threshold can be accurately determined.

[0137] In a possible implementation manner, the above step S202 includes:

[0138] Step S501: Based on the associated data of the target vehicle, determine the fogging judgment parameter corresponding to the associated data of the target vehicle; among them, the fogging judgment parameter includes a temperature parameter and a humidity parameter, and the associated data of the target vehicle is data that changes in real time.

[0139] The fogging judgment parameter can represent the judgment condition for determining whether the vehicle needs defogging through the associated data. Among them, the fogging judgment parameter can include a temperature parameter and a humidity parameter.

[0140] In specific implementation, the fogging judgment parameter can be determined based on the associated data of the target vehicle. Among them, the associated data changes in real time, that is, the latest associated information can be continuously obtained, so that the fogging judgment parameter can also be updated in real time.

[0141] As an example, the fogging determination parameters corresponding to different associated data can be determined through a mapping table between the fogging determination parameters and the associated data. Analyzing the fogging determination parameters in real time enables the target vehicle to determine whether the vehicle needs to defog under different conditions such as different regions, different temperatures, and different humidities.

[0142] Step S502: Determine whether the target vehicle needs to defog according to the comparison result between the fogging determination parameters and the associated data of the target vehicle.

[0143] After determining the fogging determination parameters, it is possible to determine whether defogging is required based on the comparison result between the fogging determination parameters and the associated data of the target vehicle. For example: the temperature parameter in the fogging determination parameters is T1, and the associated data includes the outside temperature and the inside temperature of the vehicle. Among them, the difference between the outside temperature and the inside temperature is T2. When T2 is greater than T1, it is determined that the target vehicle needs to defog.

[0144] In the vehicle defogging method provided in this embodiment, the temperature parameter and the humidity parameter can be changed through the associated data. The associated data is data that changes in real time, that is, different temperature parameters and humidity parameters can be determined according to different associated data. Then, through the associated data and the fogging determination parameters corresponding to the associated data, it can be accurately determined whether the target vehicle needs to defog.

[0145] In a possible implementation manner, the above method further includes:

[0146] Step S601: Input the associated data into a pre-trained defogging determination model to obtain the predicted defogging probability corresponding to the associated data. The predicted defogging probability represents the probability of defogging required under the conditions represented by the associated data.

[0147] Step S602: Determine the fifth defogging determination result corresponding to the associated data according to the comparison result between the predicted defogging probability corresponding to the associated data and the defogging probability threshold.

[0148] Input the associated data into a pre-trained defogging determination model. The pre-trained defogging determination model calculates the predicted defogging probability according to the input associated data, and compares the predicted defogging probability with the defogging probability threshold. If the predicted probability is greater than or equal to the defogging probability threshold, it is determined that the vehicle needs to defog; otherwise, it is determined that the vehicle does not need to defog. Compare the comparison result of comparing the predicted defogging probability with the defogging probability threshold with the annotation result in the training data to determine whether the parameters of the pre-trained defogging determination model need to be updated.

[0149] Step S603: When the fifth defogging determination result corresponding to the associated data is different from the annotation result of the associated data, update the parameters of the pre-trained defogging determination model.

[0150] If the fifth defogging judgment result corresponding to the associated data is different from the annotation result of the associated data, it indicates that the prediction performance of the pre-trained defogging judgment model needs to be improved. At this time, the parameters of the pre-trained defogging judgment model should be updated to improve the prediction accuracy of the model.

[0151] The vehicle defogging method provided in this embodiment can continuously update the parameters of the model through the associated data, enabling the model to better adapt to various actual situations and improving the accuracy of determining whether the target vehicle needs defogging. In addition, when the pre-trained defogging judgment model faces new and unseen data, its performance often depends on its generalization ability. By continuously updating the parameters of the pre-trained defogging judgment model with the associated data of the new target vehicle and the corresponding annotation results, the adaptability of the model to new data can be enhanced, and its generalization performance can be improved.

[0152] In a possible implementation, the associated data further includes at least one of vehicle own data and other vehicle data; the vehicle own data includes at least one of the season data where the target vehicle is located, the regional location where the target vehicle is located, and the vehicle speed data; the other vehicle data includes at least one of the season data where the other vehicle is located, the regional location where the other vehicle is located, and the vehicle speed data.

[0153] The associated data of the target vehicle can include not only the data of the vehicle itself but also the data of other vehicles. Among them, the data of other vehicles can be received by the cloud server and sent to the target vehicle.

[0154] In the vehicle defogging method provided in this embodiment, since the possibility of window fogging may vary significantly in different seasons, different regions, and different vehicle speeds, by introducing more dimensional data (season, regional location, and vehicle speed), the model can more comprehensively understand the current environmental conditions, thereby improving the accuracy of determining whether the target vehicle needs defogging.

[0155] In order to accurately determine the annotated image data, in a possible implementation, the above method further includes: using the image data collected when the target vehicle meets the preset conditions as the annotated image data; where the preset conditions include: the current weather is fog-free and precipitation-free, the visibility of the glass parts of the target vehicle is greater than the visibility threshold, the relative humidity is lower than the relative humidity threshold, and the defogging function of the target vehicle is not turned on.

[0156] Fog-free and precipitation-free can represent that there is no fog and precipitation in the weather conditions. The visibility threshold can be n1 or n2, etc., and no specific limitation is made here. The relative humidity can be represented as the ratio of the water vapor content in the air to the maximum water vapor content that the air can contain at the current temperature.

[0157] In specific implementation, the current weather condition is obtained in real time through weather sensors installed on the vehicle or external weather data sources. The visibility of glass components such as the windshield is evaluated using cameras or sensors inside the vehicle. The relative humidity data of the current environment is obtained in real time through humidity sensors on the vehicle. Whether the user manually activates the defogging function is monitored through the control system inside the vehicle. The above information is integrated to determine whether the current state meets the preset conditions (i.e., no fogging, no precipitation, the visibility of the glass components is greater than the threshold, the relative humidity is lower than the relative humidity threshold, and the defogging function is not activated). If the preset conditions are met, image data is collected using the camera on the vehicle and saved as labeled image data.

[0158] The vehicle defogging method provided in this embodiment can truly reflect the clear state of the vehicle glass components under the current weather conditions without fogging, no precipitation, and the visibility of the vehicle's glass components being greater than the visibility threshold and other interfering factors through the image data collected under the preset state. It can accurately determine the images of the glass components that do not require defogging for the vehicle, so as to more accurately predict whether the vehicle needs defogging.

[0159] Please refer to Figure 3 , Figure 3 which is a schematic diagram of the vehicle defogging method according to an embodiment of the present invention.

[0160] The associated data of the vehicle is obtained. The associated data of the vehicle may include: temperature, humidity, rainfall, and image data. The real-time temperature is measured by temperature sensors arranged inside and outside the vehicle and uploaded to the cloud server. The Electronic Control Unit (ECU) can obtain the in-vehicle humidity value (H_in), the out-vehicle humidity value (H_out), the in-vehicle temperature value (T_in), and the out-vehicle temperature value (T_out) from the humidity sensor and the temperature sensor at regular intervals (such as every 5 s). By comparing the real-time humidity with the maximum humidity at the current temperature through the humidity sensors inside and outside the vehicle, the in-vehicle relative humidity and the out-vehicle relative humidity are calculated respectively. Then, when any one of the in-vehicle relative humidity and the out-vehicle relative humidity is greater than the relative humidity threshold (such as 90%) and the temperature difference > the temperature difference threshold (such as 5 °C), it is determined that there is a current fogging risk, and it is determined that the vehicle needs to be defogged.

[0161] The current rainfall information is tested through a rainfall sensor. According to the rainfall national standard definition level, when the rainfall ≥ moderate rain, it is recorded that the vehicle needs to be defogged. When the vehicle activates the defogging function, the wiper controller can be started in combination with the rainfall sensor at the same time, so that the wiper clears the vehicle's field of vision to maximize the clearing of the front and rear fields of vision.

[0162] Based on the fogging judgment algorithm for processed images captured by a camera, it can be determined whether the vehicle needs to defog. When it is detected that there is no fog, the color image is first converted into a grayscale image. The gray-scale gradient value of each pixel point is obtained through an edge detection operator, and the gray-scale gradient amplitude is calculated. The target gray-scale gradient G of all pixel points' gray-scale gradient amplitudes is obtained. Calculate different gray-scale gradient means G0 in the acquired image. If G0 is much lower than G (that is, whether the ratio of the gray-scale gradient mean to the target gray-scale gradient is less than the fogging threshold), it is determined that the fogging probability is relatively high at this time, and it is determined that the vehicle needs to defog.

[0163] For example: In winter, when the hot air conditioner is turned on in the vehicle and the vehicle comes out of the underground parking lot, it is determined that the relative humidity is less than 90% and it is determined that it is not raining outside. However, due to the lower outside temperature and a large temperature difference compared to the inside of the vehicle, the short-term glass temperature difference causes water vapor to condense. At this time, the calculated parameter G0 / G of the camera image recognition is less than the threshold, and it is determined that the vehicle needs to defog.

[0164] The vehicle defogging method provided in this embodiment determines whether the conditions for window fogging occur inside the vehicle through any one of the in-vehicle environment data, the out-of-vehicle environment data, and the image data to be measured of the vehicle's glass parts. Once the fogging condition is detected, the defogging program can be immediately started without the driver manually operating the vehicle's defogging components, thereby reducing the delay of defogging operations. Moreover, the defogging operation is intelligently adjusted according to the in-vehicle and out-of-vehicle environment data and the image data of the glass parts to be measured, thereby effectively improving the vehicle defogging effect.

[0165] In this embodiment, a vehicle defogging device is also provided. This device is used to implement the above-mentioned embodiments and preferred implementation manners, and those that have been described will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.

[0166] This embodiment provides a vehicle defogging device, which includes: an acquisition module for acquiring the associated data of the target vehicle; wherein the associated data of the target vehicle includes at least one of the in-vehicle environment data and the out-of-vehicle environment data; a determination module for determining whether the target vehicle needs to defog according to the associated data of the target vehicle; and a control module for controlling the target vehicle to defog if the target vehicle needs to defog.

[0167] In some possible implementation manners, the in-vehicle environment data of the target vehicle includes: in-vehicle temperature data and in-vehicle humidity data; the out-vehicle environment data includes: out-vehicle temperature data and out-vehicle humidity data; wherein, the determination module includes: a first determination unit, configured to determine a temperature difference between the out-vehicle temperature data and the in-vehicle temperature data according to the out-vehicle temperature data and the in-vehicle temperature data; a second determination unit, configured to determine the out-vehicle relative humidity according to the out-vehicle humidity data and the maximum humidity corresponding to the out-vehicle temperature data; a third determination unit, configured to determine the in-vehicle relative humidity according to the in-vehicle humidity data and the maximum humidity corresponding to the in-vehicle temperature data; a fourth determination unit, configured to determine that the target vehicle needs to perform defogging if at least one of the out-vehicle relative humidity and the in-vehicle relative humidity is greater than a relative humidity threshold and the temperature difference is greater than a temperature difference threshold.

[0168] In some possible implementation manners, the out-vehicle environment data includes rainfall data; the determination module includes: a fifth determination unit, configured to determine that the target vehicle needs to perform defogging when the rainfall data is not less than a rainfall threshold.

[0169] In some possible implementation manners, the associated data of the target vehicle further includes: first to-be-detected image data of a glass part of the target vehicle, and the determination module includes: a sixth determination unit, configured to determine a first defogging determination result according to the first to-be-detected image data of the glass part of the target vehicle, the labeled image data corresponding to the first to-be-detected image data, and a target fogging threshold; wherein, the labeled image data corresponding to the first to-be-detected image data is image data of the glass part of the target vehicle collected when the target vehicle does not need defogging; a seventh determination unit, configured to determine whether the target vehicle needs to perform defogging according to the first defogging determination result.

[0170] In a possible implementation manner, the sixth determination unit includes: a first determination subunit, configured to determine a first gray gradient component in the horizontal direction and a second gray gradient component in the vertical direction of each pixel point in the to-be-detected image data; a second determination subunit, configured to determine a gradient amplitude corresponding to each pixel point according to the first gray gradient component and the second gray gradient component; a third determination subunit, configured to determine a gray gradient mean value corresponding to the first to-be-detected image data according to the gradient amplitude corresponding to each pixel point; a detection and determination subunit, configured to determine that the target vehicle needs to perform defogging if the ratio of the gray gradient mean value to a target gray gradient is less than the fogging threshold, wherein the target gray gradient is calculated from the labeled image data corresponding to the first to-be-detected image data.

[0171] In a possible implementation manner, the seventh determination unit includes: a fourth determination subunit, configured to use a pre-trained defogging determination model to obtain a second defogging determination result according to the associated data; a fifth determination subunit, configured to determine whether the target vehicle needs to perform defogging according to the first defogging determination result and the second defogging determination result.

[0172] In some possible implementation manners, the above-mentioned device further includes: a training module, configured to input second to-be-detected image data of a glass component of a target vehicle into a pre-trained defogging judgment model to obtain a third defogging judgment result; a repeating execution module, configured to repeatedly execute an operation of searching for a target defogging threshold until the target defogging threshold is determined, and the operation of searching for the target defogging threshold includes: determining a fourth defogging judgment result for the searching operation according to the second to-be-detected image data of the glass component of the target vehicle, the annotation image data corresponding to the second to-be-detected image data, and the candidate defogging threshold for the searching operation; when the third defogging judgment result is different from the fourth defogging judgment result, determining a candidate defogging threshold for the next searching operation according to a preset value and the candidate defogging threshold for the searching operation; when the third defogging judgment result is the same as the fourth defogging judgment result, determining the candidate defogging threshold for the searching operation as the target defogging threshold.

[0173] In some possible implementation manners, the determining module includes: an eighth determining unit, configured to determine a defogging judgment parameter corresponding to the associated data of the target vehicle based on the associated data of the target vehicle; wherein, the defogging judgment parameter includes a temperature parameter and a humidity parameter, and the associated data of the target vehicle is data that changes in real time; a ninth determining unit, configured to determine whether the target vehicle needs to be defogged according to a comparison result between the defogging judgment parameter and the associated data of the target vehicle.

[0174] In some possible implementation manners, the above-mentioned device further includes: a training subunit, configured to input the associated data into a pre-trained defogging judgment model to obtain a predicted defogging probability corresponding to the associated data, and the predicted defogging probability represents the probability of defogging required under the condition represented by the associated data; a comparison subunit, configured to determine a fifth defogging judgment result corresponding to the associated data according to a comparison result between the predicted defogging probability corresponding to the associated data and a defogging probability threshold; an updating subunit, configured to update parameters of the pre-trained defogging judgment model when the fifth defogging judgment result corresponding to the associated data is different from the annotation result of the associated data.

[0175] In some possible implementation manners, the associated data further includes at least one of own vehicle data and other vehicle data; the own vehicle data includes at least one of season data in which the target vehicle is located, regional location where the target vehicle is located, and vehicle speed data; the other vehicle data includes at least one of season data in which the other vehicle is located, regional location where the other vehicle is located, and vehicle speed data.

[0176] In some possible implementations, the above device further includes: a labeled image data determination module, configured to use the image data collected when the target vehicle meets a preset condition as the labeled image data corresponding to the first image data to be measured; where the preset condition includes: the current weather is fog-free and precipitation-free, the visibility of the glass parts of the target vehicle is greater than the visibility threshold, the relative humidity is lower than the relative humidity threshold, and the defogging function of the target vehicle is not turned on.

[0177] The further function descriptions of the above various modules and units are the same as those in the corresponding above embodiments, and will not be elaborated here.

[0178] The vehicle defogging device in this embodiment is presented in the form of functional units. Here, the functional units refer to ASIC (Application Specific Integrated Circuit) circuits, processors and memories that execute one or more software or fixed programs, and / or other devices that can provide the above functions.

[0179] The embodiment of the present invention further provides a computer device having the above vehicle defogging device.

[0180] Please refer to Figure 4 , Figure 4 which is a schematic structural diagram of a computer device provided by an optional embodiment of the present invention. As Figure 4 shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including a high-speed interface and a low-speed interface. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some optional implementations, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a set of blade servers, or a multi-processor system). Figure 4 In

[0181] Figure 1, one processor 10 is taken as an example.

[0182] Among them, the memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the methods shown in the above embodiments.

[0183] The memory 20 may include a program storage area and a data storage area. Among them, the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 may optionally include a memory remotely provided with respect to the processor 10, and these remote memories may be connected to the computer device through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.

[0184] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state drive; the memory 20 may also include a combination of the above types of memories.

[0185] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30, and the output device 40 may be connected through a bus or other means. Figure 4 Taking connection through a bus as an example.

[0186] The input device 30 may receive input digital or character information, and generate key signal inputs related to the user settings and function controls of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (such as an LED), and a haptic feedback device (such as a vibration motor), etc. The above display device includes but is not limited to a liquid crystal display, a light-emitting diode, a display, and a plasma display. In some alternative embodiments, the display device may be a touch screen.

[0187] Embodiments of the present invention also provide a computer-readable storage medium. The methods according to the embodiments of the present invention can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented as computer code that is originally stored in a remote storage medium or a non-transitory machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the methods described herein can be stored in such software processes on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code, and when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the methods shown in the above embodiments are implemented.

[0188] A part of the present invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can call or provide the methods and / or technical solutions according to the present invention through the operation of the computer. Those skilled in the art should understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executes the instructions, or the computer compiles the instructions and then executes the corresponding compiled program, or the computer reads and executes the instructions, or the computer reads and installs the instructions and then executes the corresponding installed program. Here, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.

[0189] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A vehicle defogging method, characterized in that: The method comprises: Acquire the associated data of the target vehicle; wherein the associated data of the target vehicle includes at least one of the in-vehicle environment data and the out-vehicle environment data; Determining whether the target vehicle needs to be defogged according to the associated data of the target vehicle; when determining whether the target vehicle needs to be defogged using a defog judgment model and the associated data, the defog judgment model is trained using first associated data, and the first associated data is obtained when a user manually turns on a defog function; If the target vehicle needs to be defogged, the target vehicle is controlled to be defogged.

2. The vehicle defogging method according to claim 1, characterized in that: The in-vehicle environment data of the target vehicle includes: in-vehicle temperature data and in-vehicle humidity data; the out-vehicle environment data includes: out-vehicle temperature data and out-vehicle humidity data; and determining whether the target vehicle needs to be defogged according to the associated data of the target vehicle includes: Determining a temperature difference between the vehicle exterior temperature data and the vehicle interior temperature data according to the vehicle exterior temperature data and the vehicle interior temperature data; Determine the relative humidity outside the vehicle according to the maximum humidity corresponding to the humidity data outside the vehicle and the temperature data outside the vehicle; Determining the relative humidity in the vehicle according to the maximum humidity corresponding to the humidity data in the vehicle and the temperature data in the vehicle; If at least one of the relative humidity outside the vehicle and the relative humidity inside the vehicle is greater than the relative humidity threshold, and the temperature difference is greater than the temperature difference threshold, it is determined that the target vehicle needs to be defogged.

3. The vehicle defogging method according to claim 1, characterized in that: The vehicle exterior environment data includes rainfall data; and determining whether the target vehicle needs to be defogged based on the associated data of the target vehicle, including: when the rainfall data is not less than a rainfall threshold, determining that the target vehicle needs to be defogged.

4. The vehicle defogging method according to claim 1, characterized in that: The associated data of the target vehicle further includes: first image data to be tested of a glass member of the target vehicle, wherein determining whether the target vehicle needs to be defogged according to the associated data of the target vehicle includes: Determine a first defogger judgment result according to the first image data to be tested of the glass member of the target vehicle, the annotated image data corresponding to the first image data to be tested, and the target fogging threshold; wherein the annotated image data corresponding to the first image data to be tested is the image data of the glass member of the target vehicle collected when the target vehicle does not need to be defogged; According to the first defogger judgment result, it is determined whether the target vehicle needs to be defogged.

5. The vehicle defogging method according to claim 4, characterized in that: The determining of a first defogger judgment result according to the first image data to be tested of the glass member of the target vehicle, the annotated image data corresponding to the first image data to be tested, and the target fogging threshold value includes: Determine a first grayscale gradient component in a horizontal direction and a second grayscale gradient component in a vertical direction for each pixel in the first image data to be tested; Determine the gradient amplitude corresponding to each pixel point according to the first grayscale gradient component and the second grayscale gradient component; Determine the grayscale gradient mean corresponding to the first image data to be tested according to the gradient amplitude corresponding to each pixel point; A first defog judgment result is determined according to the ratio of the grayscale gradient mean to the target grayscale gradient and the target fogging threshold; wherein the target grayscale gradient is calculated from the annotated image data corresponding to the first image data to be tested.

6. The vehicle defogging method according to claim 5, characterized in that: Determining whether the target vehicle needs to be defogged according to the first defog judgment result includes: Using the pre-trained defogging judgment model, and according to the associated data, obtaining a second defogging judgment result; Whether the target vehicle needs to be defogged is determined according to the first defogger judgment result and the second defogger judgment result.

7. The vehicle defogging method according to claim 6, characterized in that: The method further comprises: Inputting the second to-be-tested image data of the glass member of the target vehicle into a pre-trained defogger judgment model to obtain a third defogger judgment result; The search operation of the target fogging threshold is repeatedly performed until the target fogging threshold is determined. The search operation of the target fogging threshold includes: Determine a fourth defogging judgment result targeted by the search operation according to the second image data to be tested of the glass member of the target vehicle, the annotated image data corresponding to the second image data to be tested, and the candidate fogging threshold targeted by the search operation; When the third defogging judgment result and the fourth defogging judgment result are different, determining the candidate fogging threshold for the next search operation according to the preset value and the candidate fogging threshold for the search operation; When the third defogging judgment result and the fourth defogging judgment result are the same, the candidate fogging threshold targeted by the search operation is determined as the target fogging threshold.

8. The vehicle defogging method according to claim 6, characterized in that: The method further comprises: Inputting the associated data into a pre-trained defogging judgment model to obtain a predicted defogging probability corresponding to the associated data, wherein the predicted defogging probability indicates the probability of needing to perform defogging under the conditions indicated by the associated data; Determining a fifth defogging judgment result corresponding to the associated data according to a comparison result between the predicted defogging probability corresponding to the associated data and a defogging probability threshold; When the fifth defog judgment result corresponding to the associated data is different from the labeled result of the associated data, the parameters of the pre-trained defog judgment model are updated.

9. The vehicle defogging method according to claim 1, characterized in that: The step of determining whether the target vehicle needs to be defogged according to the associated data of the target vehicle comprises: Based on the associated data of the target vehicle, determining the fogging judgment parameter corresponding to the associated data of the target vehicle; wherein the fogging judgment parameter includes a temperature parameter and a humidity parameter, and the associated data of the target vehicle is data that changes in real time; According to the comparison result of the fogging judgment parameter and the associated data of the target vehicle, it is determined whether the target vehicle needs to be defogged.

10. The vehicle defogging method according to claim 4, characterized in that: The method further comprises: The image data collected when the target vehicle meets the preset conditions is used as the annotated image data corresponding to the first image data to be tested; wherein the preset conditions include: the current weather is without fog and precipitation, the visibility of the glass parts of the target vehicle is greater than the visibility threshold, the relative humidity is lower than the relative humidity threshold, and the defog function of the target vehicle is not turned on.

11. The vehicle defogging method according to any one of claims 1 to 10, characterized in that: The associated data also includes: at least one of the own vehicle data and other vehicle data; The vehicle data includes at least one of the seasonal data of the target vehicle, the regional location of the target vehicle, and the speed data of the target vehicle; The other vehicle data includes at least one of the season data of the other vehicles, the regional location of the other vehicles, and the speed data of the other vehicles.

12. A vehicle defogger, characterized in that: The device comprises: An acquisition module, used to acquire the associated data of the target vehicle; wherein the associated data of the target vehicle includes at least one of the in-vehicle environment data and the out-vehicle environment data; A determination module, configured to determine whether the target vehicle needs to be defogged according to the associated data of the target vehicle; in the case of using a defog determination model and the associated data to determine whether the target vehicle needs to be defogged, the defog determination model is trained using first associated data, and the first associated data is obtained when a user manually turns on a defog function; The control module is used to control the target vehicle to perform defog if the target vehicle needs to be defogged.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the vehicle defog method according to any one of claims 1 to 11.

14. A vehicle, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the vehicle defogger method according to any one of claims 1 to 11 by executing the computer instructions.

Citation Information

Patent Citations

  • Field of view clearing method and device for electronic in-car rearview mirror

    CN106657716A

  • Vehicle, and system and method for frost and mist removal of same

    CN106809177A

  • Vehicle window demisting control method and device, computer equipment and storage medium

    CN115257632A

  • Vehicle demisting method and device and vehicle

    CN117549858A