Method, device and equipment for switching high beam and low beam of vehicle and storage medium

By using a multi-dimensional discrimination model to distinguish between vehicle lights and ambient light sources, the problem of false triggering of high and low beam headlights has been solved, improving driving safety and user experience.

CN121789174APending Publication Date: 2026-04-03DONGFENG LIUZHOU MOTOR
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-11-27
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing technologies struggle to distinguish between real vehicle lights and ambient light sources under diverse nighttime lighting conditions, leading to the problem of false triggering of high and low beams.

Method used

By acquiring the vehicle's light source image area, light source coordinate information, and environmental information, multi-dimensional discrimination is performed using spatial segmentation models, semantic segmentation models, and scene recognition models. Spatial rationality scores, semantic category scores, and scene recognition scores are calculated, and the target fusion score is comprehensively calculated to determine the switching between high and low beam headlights.

Benefits of technology

It enables accurate identification of vehicle lights and environmental interference sources, significantly reducing the false switching rate of high beams and improving driving safety and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121789174A_ABST
    Figure CN121789174A_ABST
Patent Text Reader

Abstract

The invention discloses a vehicle high beam and low beam switching method, device and equipment and a storage medium, relates to the technical field of vehicle control, and discloses a vehicle high beam and low beam switching method which comprises the steps that a light source image area, light source coordinate information and current environment information of a current vehicle are obtained; calculating a spatial rationality score according to the light source image area and the light source coordinate information, and inputting the light source image area and the light source coordinate information into a semantic segmentation model to obtain a semantic category score; inputting the current environment information into a scene recognition model to obtain a scene recognition score; calculating a target fusion score according to the spatial rationality score, the semantic category score and the scene recognition score; and switching the high beam and the low beam according to the target fusion score. Whether the light source is a vehicle lamp needing to be responded or not is accurately judged, the wrong switching rate of the high beam is reduced, different driving scenes are adapted, and the switching accuracy of the high beam and the low beam is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of vehicle control technology, and in particular to methods, devices, equipment and storage media for switching high and low beam headlights of vehicles. Background Technology

[0002] With the development of intelligent driving and auxiliary lighting technologies, higher demands are placed on the switching between high beams and low beams when vehicles are driving at night. To ensure nighttime driving safety, vehicles need to be able to promptly identify the types of light sources on the road ahead and switch lights accordingly to avoid dazzling oncoming vehicles while ensuring that the driver has a stable and sufficient lighting range.

[0003] Traditional technologies primarily rely on single light intensity data or image recognition models to determine the current lighting conditions and potential vehicle positions. They typically achieve basic automatic headlight control by acquiring images of the road ahead or ambient brightness and setting fixed thresholds or using a single algorithm model to trigger high / low beam switching. While these methods can perform basic high / low beam adjustment in some scenarios, they often struggle to distinguish between high-mounted ambient light sources and actual vehicle headlights due to a lack of comprehensive understanding of the spatial characteristics, category attributes, and differences in road environments. This leads to misidentification and false triggering issues under common nighttime road conditions.

[0004] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0005] The main objective of this application is to provide a method, device, equipment, and storage medium for switching between high and low beam headlights of a vehicle, aiming to solve the technical problem of difficulty in distinguishing between real vehicle lights and high-position ambient light sources under diverse nighttime light source conditions, which leads to the false triggering of high and low beam headlights.

[0006] To achieve the above objectives, this application proposes a method for switching between high and low beam headlights of a vehicle, the method comprising: Obtain the current vehicle's light source image area, light source coordinate information, and current environment information; The spatial rationality score is calculated based on the light source image region and the light source coordinate information, and the light source image region and the light source coordinate information are input into the semantic segmentation model to obtain the semantic category score; The current environment information is input into the scene recognition model to obtain the scene recognition score; The target fusion score is calculated based on the spatial rationality score, the semantic category score, and the scene recognition score. The high and low beam headlights are switched based on the target fusion score.

[0007] In one embodiment, the step of calculating a spatial rationality score based on the light source image region and the light source coordinate information includes: Obtain preset sensing distance, preset headlight height, height threshold, and deviation threshold; The relative distance to the light source, the height of the light source, and the offset of the center of the light source are determined based on the light source image area and the light source coordinate information. A spatial rationality score is calculated based on the preset sensing distance, the preset headlight height, the height threshold, the deviation threshold, the relative distance of the light source, the height of the light source, and the offset of the light source center.

[0008] In one embodiment, the step of calculating the spatial rationality score based on the preset sensing distance, the preset headlight height, the height threshold, the deviation threshold, the relative distance of the light source, the height of the light source, and the center offset of the light source includes: Obtain the distance weight, height weight, and horizontal deviation weight; A distance score is calculated based on the relative distance to the light source and the preset sensing distance. A height score is calculated based on the light source height, the preset headlight height, and the height threshold. Calculate the horizontal deviation score based on the light source center offset and the deviation threshold. The spatial rationality score is calculated based on the distance weight, the height weight, the horizontal deviation weight, the distance score, the height score, and the horizontal deviation score.

[0009] In one embodiment, the step of inputting the light source image region and the light source coordinate information into a semantic segmentation model to obtain a semantic category score includes: Obtain the preset rating coefficient; The light source image region and the light source coordinate information are input into the semantic segmentation model to obtain the vehicle category confidence score. The semantic category score is calculated based on the preset scoring coefficient and the vehicle category confidence level.

[0010] In one embodiment, the step of inputting the current environment information into the scene recognition model to obtain a scene recognition score includes: The system acquires location information, current vehicle speed, first vehicle speed threshold, light intensity threshold, preset first density, second vehicle speed threshold, and preset second density, and determines the road conditions based on the location information, wherein the first vehicle speed threshold is greater than the second vehicle speed threshold, and the preset first density is greater than the preset second density. Determine the ambient light intensity and street light density based on the current environmental information; The current scene is identified based on the current vehicle speed, the first vehicle speed threshold, the light intensity threshold, the preset first density, the second vehicle speed threshold, the preset second density, the ambient light intensity, and the street light density. The current scene is input into the scene recognition model to obtain a scene recognition score.

[0011] In one embodiment, the step of calculating the target fusion score based on the spatial rationality score, the semantic category score, and the scene recognition score includes: Obtain spatial rationality weights, semantic category weights, and scene recognition weights; The target fusion score is calculated based on the spatial rationality weight, the semantic category weight, the scene recognition weight, the spatial rationality score, the semantic category score, and the scene recognition score.

[0012] In one embodiment, the step of switching between high and low beam headlights based on the target fusion score includes: Obtain the first score threshold, the second score threshold, and the change stability threshold; When the target fusion score is greater than the first score threshold and less than the second score threshold, the score change trend of the target fusion score is determined; When the score change trend is greater than the change stability threshold, or when the target fusion score is greater than the second score threshold, the high beam / low beam switching is performed.

[0013] In addition, to achieve the above objectives, this application also proposes a high beam switching device for a vehicle, the high beam switching device for a vehicle comprising: an information acquisition module, used to acquire the current light source image area of ​​the vehicle, light source coordinate information and current environmental information; The scoring calculation module is used to calculate the spatial rationality score based on the light source image region and the light source coordinate information, and input the light source image region and the light source coordinate information into the semantic segmentation model to obtain the semantic category score; The scoring calculation module is also used to input the current environment information into the scene recognition model to obtain a scene recognition score; The scoring calculation module is also used to calculate the target fusion score based on the spatial rationality score, the semantic category score, and the scene recognition score; The high / low beam switching module is used to switch between high and low beams based on the target fusion score.

[0014] In addition, to achieve the above objectives, this application also proposes a high / low beam headlight switching device for a vehicle, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the high / low beam headlight switching method for a vehicle as described above.

[0015] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of the vehicle high / low beam switching method described above.

[0016] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the vehicle high / low beam headlight switching method described above.

[0017] One or more technical solutions proposed in this application have at least the following technical effects: By employing a multi-model parallel processing design—which acquires the current vehicle's light source image area, light source coordinate information, and current environmental information, and then inputs the light source image area and light source coordinate information into spatial segmentation and semantic segmentation models to obtain spatial rationality scores and semantic category scores respectively, while simultaneously inputting the current environmental information into a scene recognition model to obtain a scene recognition score—this approach differs from traditional single-image recognition or single-parameter judgment methods. It can initially distinguish light sources from three independent dimensions: spatial location, object category, and macro-scene. This solves the problem of existing technologies being unable to distinguish between environmental light sources such as streetlights and crane lights and vehicle lights, leading to frequent erroneous high beam switching. Subsequently, a target fusion score is calculated based on the above three scores, integrating multi-dimensional discrimination criteria and avoiding the one-sidedness of single-dimensional judgment. High and low beam switching is then performed based on the target fusion score, enabling the switching decision to comprehensively consider the spatial rationality, category reliability, and scene adaptability of the light source. It effectively solves the problems of misjudging interference sources by a single indicator and the static and rigid decision-making logic that cannot adapt to different scenarios in the existing high and low beam switching technology. It achieves accurate identification of vehicle lights and environmental interference sources, significantly reduces the false switching rate of high beams, and enables high and low beam switching to adapt to the lighting needs of different driving scenarios, thereby improving driving safety and user experience. Attached Figure Description

[0018] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0019] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 A flowchart illustrating the method for switching between high and low beam headlights in the vehicle described in this application; Figure 2 This is a flowchart illustrating Embodiment 2 of the method for switching between high and low beam headlights for the vehicle in this application. Figure 3 A simplified flowchart illustrating the method for switching between high and low beam headlights in a vehicle according to Embodiment 2 of this application; Figure 4 This is a schematic diagram of the module structure of the high / low beam switching device for a vehicle according to an embodiment of this application; Figure 5 This is a schematic diagram of the device structure of the hardware operating environment involved in the high beam / low beam switching method of the vehicle in the embodiments of this application.

[0021] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0022] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0023] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0024] The main solution of this application embodiment is as follows: acquire the current vehicle's light source image area, light source coordinate information, and current environment information; calculate the spatial rationality score based on the light source image area and the light source coordinate information, and input the light source image area and the light source coordinate information into a semantic segmentation model to obtain a semantic category score; input the current environment information into a scene recognition model to obtain a scene recognition score; calculate the target fusion score based on the spatial rationality score, the semantic category score, and the scene recognition score; and switch between high and low beam headlights based on the target fusion score.

[0025] In this embodiment, for ease of description, the following description will focus on the high / low beam switching device for identifying vehicles.

[0026] Because existing technologies struggle to distinguish between real vehicle lights and ambient light sources under diverse nighttime lighting conditions, leading to erroneous high beam switching, this application provides a solution. This solution involves acquiring the current vehicle's light source image area, light source coordinates, and current environmental information. The light source image area and coordinates are then input into a spatial segmentation model and a semantic segmentation model to obtain spatial rationality scores and semantic category scores, respectively. Simultaneously, the current environmental information is input into a scene recognition model to obtain a scene recognition score. This multi-model parallel processing design, unlike traditional single-image recognition or single-parameter judgment methods, enables preliminary discrimination of light sources from three independent dimensions: spatial location, object category, and macroscopic scene. This solves the problem of existing technologies failing to distinguish between ambient light sources such as streetlights and crane lights and vehicle lights, resulting in frequent erroneous high beam switching. Subsequently, a target fusion score is calculated based on the three scores, integrating multi-dimensional discrimination criteria and avoiding the one-sidedness of single-dimensional judgment. High beam switching is then performed based on the target fusion score, allowing the switching decision to comprehensively consider the spatial rationality, category reliability, and scene adaptability of the light source. It effectively solves the problems of misjudging interference sources by a single indicator and the static and rigid decision-making logic that cannot adapt to different scenarios in the existing high and low beam switching technology. It achieves accurate identification of vehicle lights and environmental interference sources, significantly reduces the false switching rate of high beams, and enables high and low beam switching to adapt to the lighting needs of different driving scenarios, thereby improving driving safety and user experience.

[0027] It should be noted that the executing entity in this embodiment can be a computing service device with data processing, network communication, and program execution functions, such as a tablet computer, personal computer, or mobile phone, or an electronic device capable of performing the above functions, such as a vehicle's high / low beam switching device. The following description uses a vehicle's high / low beam switching device as an example to illustrate this embodiment and the subsequent embodiments.

[0028] Based on this, embodiments of this application provide a method for switching between high and low beam headlights of a vehicle, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the high / low beam headlight switching method for the vehicle described in this application.

[0029] In this embodiment, the method for switching between high and low beam headlights of the vehicle includes steps S10 to S50: Step S10: Obtain the current vehicle's light source image area, light source coordinate information, and current environment information; It should be noted that the light source image region is the portion of the image containing each light source extracted after the vehicle's front-view camera detects potential light sources in front of the vehicle. This region can reflect the visual characteristics of the light source in the image, providing a visual basis for subsequent semantic analysis.

[0030] Additionally, the light source coordinate information, namely the three-dimensional spatial coordinate information of the light source, is obtained through stereo vision technology or sensor fusion. It can accurately describe the relative spatial position relationship between the light source and the current vehicle, including key data such as relative distance and ground clearance.

[0031] Furthermore, the current environmental information is surrounding environmental data related to vehicle driving, mainly including GPS positioning information, vehicle speed, ambient light intensity, and density of surrounding streetlights. This information can reflect the characteristics of the current driving scenario.

[0032] It is understandable that the vehicle's forward-facing camera detects potential light sources ahead to obtain the image area of ​​the light source, while obtaining the coordinate information of the light source through stereo vision or sensor fusion, and collecting current environmental information such as GPS, vehicle speed, and ambient light intensity.

[0033] Step S20: Calculate the spatial rationality score based on the light source image region and the light source coordinate information, and input the light source image region and the light source coordinate information into the semantic segmentation model to obtain the semantic category score; It should be understood that this embodiment can use a spatial segmentation model to calculate the spatial rationality score. The spatial segmentation model is a dedicated model for calculating the spatial rationality score. Its core is to evaluate whether the light source in spatial position conforms to the characteristics of vehicle lights by weighted summation based on parameters such as relative distance, ground height, and horizontal offset in the coordinate information of the light source.

[0034] Additionally, semantic segmentation models are used to identify the categories of objects that are light sources. In this embodiment, a deep learning model such as a convolutional neural network (CNN) is used.

[0035] Furthermore, the spatial rationality score is a score calculated through a spatial segmentation model, used to measure the degree of fit between the light source and typical vehicle lights in spatial location. The score range is consistent with the subsequent scoring system, providing a spatial dimension basis for judging whether the light source is an interference source.

[0036] Furthermore, the semantic category score is a score calculated based on the vehicle category confidence score output by the semantic segmentation model. The confidence score is mapped to a fixed score range through a preset scoring coefficient, which is used to determine whether the light source is a vehicle light from the object category dimension.

[0037] Understandably, the spatial rationality score can be calculated by first combining the light source image region with auxiliary localization, extracting parameters such as relative distance, ground height, and horizontal offset from the light source coordinate information, and then calculating the spatial rationality score. Alternatively, the spatial rationality score can be calculated using a model. At the same time, the light source image region and light source coordinate information are input into the semantic segmentation model. After processing by the model, the vehicle category confidence score is obtained, and then converted into a semantic category score through a preset scoring coefficient.

[0038] In one feasible implementation, step S20 may include steps A21 to A23: Step A21: Obtain the preset sensing distance, preset headlight height, height threshold, and deviation threshold; It should be noted that the preset sensing distance is the distance of the farthest effective sensing light source that is pre-set. In this embodiment, this distance is set to 200 meters. When the relative distance between the light source and the current vehicle exceeds this value, the light source will not participate in the calculation of the spatial rationality score, ensuring that only light sources within the effective range are analyzed.

[0039] In addition, the preset headlight height is a fixed value for the ground clearance of typical vehicle headlights, which is determined based on statistical data of the installation positions of headlights in common vehicle models, and serves as a reference benchmark for judging whether the detected light source conforms to the characteristics of vehicle headlight height.

[0040] Furthermore, the height threshold is the maximum range of deviations allowed between the detected light source height and the preset vehicle headlight height. When the deviation is within this threshold range, the light source is more likely to be identified as a vehicle headlight in the height dimension; if it exceeds this range, the height score will be reduced.

[0041] Furthermore, the deviation threshold is the maximum range of horizontal deviation of the detected light source relative to the center line of the vehicle's lane. This value is set according to the lane width and vehicle driving specifications and is used to determine whether the light source is within the horizontal position range that conforms to the vehicle's lights.

[0042] Understandably, preset sensing distance, preset headlight height, height threshold, and deviation threshold are extracted from the pre-configured parameter storage module to provide necessary parameter support for the subsequent calculation of spatial rationality score.

[0043] Step A22: Determine the relative distance to the light source, the height of the light source, and the offset of the center of the light source based on the light source image area and the light source coordinate information; It should be noted that the relative distance of the light source is the straight-line distance between the detected light source and the current vehicle. This distance is obtained by analyzing the coordinate information of the light source using stereo vision technology or by combining sensor fusion data, and reflects the distance between the light source and the current vehicle.

[0044] Additionally, the light source height is the detected vertical height of the light source from the ground. This height is extracted from the vertical dimension data in the light source coordinate information and is a core spatial feature that distinguishes high-altitude environmental light sources (such as streetlights) from low-altitude vehicle lights.

[0045] Furthermore, the light source center offset is the detected horizontal offset distance of the light source relative to the center line of the current vehicle's driving lane. It is calculated by comparing the light source coordinate information with the lane center line position information and is used to determine whether the light source is within the normal driving lane range.

[0046] Understandably, by combining the light source image region with auxiliary positioning, the relative distance to the light source, the height of the light source, and the offset of the center of the light source can be extracted and determined from the coordinate information of the light source.

[0047] Step A23: Calculate the spatial rationality score based on the preset sensing distance, the preset headlight height, the height threshold, the deviation threshold, the relative distance of the light source, the height of the light source, and the offset of the center of the light source.

[0048] Understandably, the distance score is calculated based on the preset perception distance and the relative distance to the light source, the height score is calculated based on the preset headlight height, height threshold, and light source height, and the horizontal offset score is calculated based on the deviation threshold and the center offset of the light source. Then, the three scores are weighted and summed according to the preset distance weight, height weight, and horizontal offset weight to obtain the spatial rationality score.

[0049] In one feasible implementation, step A23 may include steps A231 to A235: Step A231: Obtain the distance weight, height weight, and horizontal deviation weight; It should be noted that the distance weight is a pre-set coefficient used to measure the importance of the distance score in the final spatial rationality score. Its value is determined according to the degree of influence of distance factors on light source discrimination under different driving scenarios, and it is one of the key parameters for subsequent weighted summation calculation.

[0050] Additionally, the height weight is a pre-defined coefficient used to measure the importance of the height score in the final spatial rationality score.

[0051] Furthermore, the horizontal deviation weight is a pre-set coefficient used to measure the importance of the horizontal deviation score in the final spatial rationality score. Its value is determined based on the distribution characteristics of the lane width and the horizontal position of the light source during vehicle movement, and the sum of the spatial rationality weight, height weight, and horizontal deviation weight is 1.

[0052] Step A232: Calculate the distance score based on the relative distance to the light source and the preset sensing distance; It should be noted that the distance score is a score used to assess whether the relative distance of the light source is within the effective range of the vehicle lights.

[0053] In this embodiment, when the relative distance between the light sources is less than or equal to the preset sensing distance, the distance score decreases as the distance increases; when the relative distance between the light sources is greater than the preset sensing distance, the distance score is 0, and only the distance dimension is evaluated for light sources within the effective range. The distance score calculation formula is as follows:

[0054] in, This refers to the relative distance between the light source and the vehicle, i.e., the relative distance between the light source and the vehicle. The maximum effective sensing distance set for the system, i.e., the preset sensing distance, when d ≥ hour, The value is 0.

[0055] Step A233: Calculate the height score based on the light source height, the preset headlight height, and the height threshold. It should be noted that the height score is used to evaluate how well the height of the light source matches the height of a typical vehicle headlight. When the deviation between the height of the light source and the preset headlight height is within the height threshold range, the height score is higher, indicating that the light source is more likely to be a vehicle headlight. When the deviation exceeds the height threshold, the height score decreases or even becomes 0, which can effectively eliminate high-altitude interference sources.

[0056] Understandably, the absolute value of the deviation between the light source height and the preset headlight height is calculated, and combined with a height threshold, a height score reflecting the reasonableness of the light source height is calculated according to preset rules. The height score calculation formula is as follows:

[0057] in, This refers to the height of the light source above the ground, i.e., the height of the light source. This is the preset value for typical vehicle headlight height, i.e., the preset vehicle headlight height; This is the height tolerance threshold, i.e., the height threshold.

[0058] Step A234: Calculate the horizontal deviation score based on the light source center offset and the deviation threshold. It should be noted that the horizontal deviation score is used to evaluate whether the horizontal position of the light source relative to the center line of the vehicle's lane is within the range of the vehicle's lights. When the offset of the light source center is less than or equal to the deviation threshold, the horizontal deviation score is higher, indicating that the light source is within the normal driving lane range. When the offset exceeds the threshold, the score decreases, excluding interfering light sources outside the lane.

[0059] Understandably, the absolute value of the light source center offset is calculated, combined with a deviation threshold, and a horizontal deviation score reflecting the reasonableness of the light source's horizontal position is calculated according to preset rules. The formula for calculating the horizontal deviation score is as follows:

[0060] in, This is the horizontal offset of the light source relative to the center line of the vehicle's lane, i.e., the offset of the light source center. This is the horizontal offset tolerance threshold, i.e., the deviation value threshold.

[0061] Step A235: Calculate the spatial rationality score based on the distance weight, the height weight, the horizontal deviation weight, the distance score, the height score, and the horizontal deviation score.

[0062] Understandably, the spatial rationality score is obtained by multiplying the distance score by its spatial rationality weight, the height score by its height weight, and the horizontal deviation score by its horizontal deviation weight, and then summing the products of these three. The formula for calculating the spatial rationality score is as follows:

[0063] in These are the distance weight, height weight, and horizontal deviation weight, respectively, and they satisfy the following conditions: ; , as well as These are the distance score, height score, and horizontal deviation score, respectively.

[0064] In one feasible implementation, step S20 may include steps B21 to B23: Step B21: Obtain the preset scoring coefficients; It should be noted that the preset scoring coefficient is a fixed coefficient set in advance. Its function is to map the vehicle category confidence score output by the semantic segmentation model to a specific score range. In this embodiment, the value of this coefficient must ensure that the semantic category score is within the range of [0,10], so as to provide a unified standard for the conversion of confidence score into quantifiable score.

[0065] Step B22: Input the light source image region and the light source coordinate information into the semantic segmentation model to obtain the vehicle category confidence score; It should be noted that the vehicle category confidence score is the probability value output by the semantic segmentation model after identifying the object category of the detected light source, indicating that the light source belongs to the vehicle category. Its value range is [0,1]. The closer the value is to 1, the higher the reliability of the model in judging that the light source is a vehicle. In this embodiment, the semantic segmentation model adopts a deep learning model such as a convolutional neural network.

[0066] It is understandable that by inputting the image region of the light source and the coordinate information of the light source into the semantic segmentation model, and after the model extracts features and makes category judgments, the confidence level of the vehicle category corresponding to the light source is obtained.

[0067] Step B23: Calculate the semantic category score based on the preset scoring coefficient and the vehicle category confidence level.

[0068] Understandably, multiplying the preset scoring coefficient by the vehicle category confidence level transforms the vehicle category confidence level from a probability interval of [0,1] to a semantic category score of [0,10], yielding the final semantic category score. The semantic category score calculation formula is as follows: = K ×

[0069] Where K is a preset scoring coefficient used to map the confidence level to the corresponding score range; Vehicle category confidence; semantic score .

[0070] Step S30: Input the current environment information into the scene recognition model to obtain the scene recognition score; It should be noted that the scene recognition model is used to determine the type of the current driving scene. The determination is based on GPS positioning information, vehicle speed, ambient light intensity and street light density in the current environment information, and it can accurately distinguish between highway scenes, urban scenes and rural scenes.

[0071] In addition, the scene recognition score is a fixed score assigned by the scene recognition model based on the determined scene type. In this embodiment, rural scenes correspond to 10 points, highway scenes correspond to 8 points, and urban scenes correspond to 2 points, which are used to reflect the differences in lighting requirements under different scenes.

[0072] Understandably, the current environment information is input into the scene recognition model, and the model determines the scene type according to preset rules and outputs the corresponding scene recognition score.

[0073] In one feasible implementation, step S30 may include steps S31 to S34: Step S31: Obtain positioning information, current vehicle speed, first vehicle speed threshold, light intensity threshold, preset first density, second vehicle speed threshold, and preset second density, and determine the driving road conditions based on the positioning information, wherein the first vehicle speed threshold is greater than the second vehicle speed threshold, and the preset first density is greater than the preset second density; It should be noted that location information is data used to determine the current geographical location of a vehicle. It is usually obtained through the Global Positioning System (GPS) and can accurately reflect whether the vehicle is driving on highways, urban roads, or rural roads, providing a location basis for subsequent judgment of road conditions.

[0074] In addition, the current vehicle speed is the real-time speed data of the vehicle, which can be collected by the vehicle's speed sensor. This data is one of the key indicators to distinguish high-speed scenes from other scenes and directly affects the scene recognition results.

[0075] Furthermore, the first vehicle speed threshold is a pre-set vehicle speed standard for determining high-speed scenarios, and in this embodiment, the threshold is set to 80 kilometers per hour; the second vehicle speed threshold is a pre-set vehicle speed standard for determining urban scenarios, and in this embodiment, the threshold is set to 60 kilometers per hour, and the first vehicle speed threshold is greater than the second vehicle speed threshold.

[0076] Furthermore, the light intensity threshold is a pre-set critical value used to distinguish the degree of lightness or darkness in the environment. When the ambient light intensity is higher than the threshold, it indicates that the ambient lighting conditions are good, and when it is lower than the threshold, it indicates that the ambient lighting conditions are poor. It is an important light environment indicator for scene recognition.

[0077] It should also be noted that the preset first density is a pre-set street light density standard used to determine urban scenes, representing the street light distribution density in well-lit areas; the preset second density is a pre-set street light density standard used to determine rural scenes, representing the street light distribution density in sparsely lit areas, and the preset first density is greater than the preset second density.

[0078] Driving conditions are determined based on the location information to identify the type of road the vehicle is currently traveling on. For example, the location information can be used to determine whether the vehicle is on a highway, an urban main road, or a rural road, providing a road attribute basis for scene recognition.

[0079] Step S32: Determine the ambient light intensity and street light density based on the current environmental information; It should be noted that ambient light intensity is the data on the light intensity of the current environment around the vehicle, which can be collected by the light sensor on the vehicle. This data directly reflects the ambient lighting conditions and is the core basis for judging the brightness characteristics of the scene.

[0080] Additionally, street light density refers to the number of street lights per unit area of ​​the road segment currently in which vehicles are traveling. It can be calculated by analyzing the light source image area or by combining street light distribution information in map data. It can reflect the density of lighting facilities on the road segment and is a key feature that distinguishes urban scenes from rural scenes.

[0081] Step S33: Identify the current scene based on the current vehicle speed, the first vehicle speed threshold, the light intensity threshold, the preset first density, the second vehicle speed threshold, the preset second density, the ambient light intensity, and the street light density; It should be noted that the current scenario is a driving environment type determined by a comprehensive assessment of road conditions, current vehicle speed, ambient light intensity, and street light density. It mainly includes three categories: highway scenarios, urban scenarios, and rural scenarios. Different scenarios correspond to different lighting requirements and risk characteristics.

[0082] Wherein, when the driving condition is a highway and the current vehicle speed is greater than the first vehicle speed threshold, the current scene is determined to be an urban scene; When the ambient light intensity is greater than the light intensity threshold, the street light density is greater than or equal to a preset first density, and the current vehicle speed is greater than the second vehicle speed threshold, the current scene is determined to be an urban scene. When the ambient light intensity is less than the light intensity threshold and the street light density is less than or equal to a preset second density, the current scene is determined to be a rural scene.

[0083] Understandably, if the location information shows that the driving conditions are highway and the current vehicle speed is consistently higher than the first vehicle speed threshold, it is determined to be a highway scene; if the ambient light intensity is higher than the light intensity threshold, the street light density is greater than the preset first density, and the current vehicle speed is lower than the second vehicle speed threshold, it is determined to be an urban scene; if the ambient light intensity is lower than the light intensity threshold and the street light density is less than the preset second density, it is determined to be a rural scene.

[0084] Step S34: Input the current scene into the scene recognition model to obtain the scene recognition score.

[0085] It should be noted that the scene recognition score is a fixed score output by the scene recognition model based on the current scene type. In this embodiment, if the current scene is a rural scene, the score is 10 points; if it is a highway scene, the score is 8 points; and if it is an urban scene, the score is 2 points. This score directly reflects the priority of light demand under different scenes.

[0086] Understandably, the current scene is input into the scene recognition model, and the model outputs the corresponding scene recognition score according to the preset scene-score correspondence rules.

[0087] Step S40: Calculate the target fusion score based on the spatial rationality score, the semantic category score, and the scene recognition score; It should be noted that the target fusion score is the final score calculated by combining the spatial rationality score, semantic category score, and scene recognition score. The calculation process must follow the preset weight rules, that is, the weight corresponding to the semantic category score is greater than the weight corresponding to the spatial rationality score, the weight corresponding to the spatial rationality score is greater than the weight corresponding to the scene recognition score, and the sum of the weights of the three is 1.

[0088] Understandably, the spatial rationality score, semantic category score, and scene recognition score are weighted and summed according to preset weight coefficients to calculate the target fusion score.

[0089] In one feasible implementation, step S40 may include steps S41-S42: Step S41: Obtain spatial rationality weight, semantic category weight, and scene recognition weight; It should be noted that the spatial rationality weight is a pre-set coefficient used to measure the importance of the spatial rationality score in the target fusion score. Its value is determined based on the impact of spatial dimension judgment on the overall light source discrimination and is one of the key parameters for multi-dimensional score fusion.

[0090] Additionally, the semantic category weight is a pre-set coefficient used to measure the importance of the semantic category score in the target fusion score. In this embodiment, the value of this weight is greater than the spatial rationality weight because the object category judgment has a higher priority in determining whether the light source is a vehicle light.

[0091] Furthermore, the scene recognition weight is a pre-set coefficient used to measure the importance of the scene recognition score in the target fusion score. The value of this weight is less than the spatial rationality weight, and the sum of the spatial rationality weight, semantic category weight, and scene recognition weight is 1, ensuring the standardization of the fusion calculation.

[0092] Understandably, preset spatial rationality weights, semantic category weights, and scene recognition weights are extracted from the pre-configured parameter storage module to prepare parameters for the subsequent calculation of target fusion scores.

[0093] Step S42: Calculate the target fusion score based on the spatial rationality weight, the semantic category weight, the scene recognition weight, the spatial rationality score, the semantic category score, and the scene recognition score.

[0094] Understandably, the spatial rationality score is multiplied by its weight, the semantic category score by its weight, and the scene recognition score by its weight. These three products are then summed to obtain the final target fusion score. The formula for calculating the target fusion score is as follows:

[0095] Where the weight coefficients satisfy ,and ; , as well as These are the spatial rationality score, semantic category score, and scene recognition score, respectively.

[0096] Step S50: Switch between high and low beam headlights based on the target fusion score.

[0097] Understandably, the target fusion score is compared with a preset threshold. If the score is lower than the first score threshold, the high beam is maintained. If the score is higher than another threshold, the high beam is blocked or switched to low beam. If the score is between the thresholds, the score change trend is tracked before switching.

[0098] This embodiment provides a method for switching between high and low beam headlights in a vehicle. By acquiring the image area of ​​the light source in front of the vehicle, the coordinate information of the light source, and the current environmental information, and using spatial segmentation model, semantic segmentation model, and scene recognition model to analyze and score this information, it solves the technical problem in the prior art where the high and low beam headlight control system cannot accurately identify the real vehicle light source under different driving environments, leading to misoperation. This achieves the beneficial effects of improving the accuracy and reliability of the high and low beam headlight control system and optimizing the driving experience and safety.

[0099] Based on the first embodiment of this application, in the second embodiment of this application, the content that is the same as or similar to that in the first embodiment described above can be referred to the above description, and will not be repeated hereafter. Based on this, please refer to... Figure 2 The method for switching between high and low beam headlights of the vehicle includes steps S51 to S53 in step S50: Step S51: Obtain the first score threshold, the second score threshold, and the change stability threshold; It should be noted that the first score threshold is a pre-set critical score used to initially determine whether a light source is an interference source. When the target fusion score is lower than this threshold, the light source is usually determined to be an interference source, and there is no need to trigger light switching. It is an important standard for filtering low-priority interference.

[0100] Additionally, the second score threshold is a pre-set critical score used to determine if the light source is a real vehicle light. This threshold is greater than the first score threshold. When the target fusion score is higher than this threshold, the light source can be directly determined to be a vehicle light that needs to be responded to, triggering the light switching operation.

[0101] Furthermore, the change stability threshold is a pre-set critical value used to determine whether the score change trend has reached a stable threshold. When the score change trend exceeds this threshold, it indicates that the score change has continuity and stability. The light switch can be triggered based on this trend to avoid misoperation due to temporary score fluctuations.

[0102] Step S52: When the target fusion score is greater than the first score threshold and less than the second score threshold, determine the score change trend of the target fusion score; It should be noted that the score change trend refers to the direction and magnitude of the target fusion score change over a period of time, such as the score continuously rising, continuously falling, or remaining stable. It is obtained by continuously collecting multiple sets of target fusion scores and analyzing their change patterns, and is used to determine whether the light source attributes (whether it is a vehicle light) have undergone stable changes.

[0103] Understandably, when the target fusion score is greater than the first score threshold and less than the second score threshold, multiple sets of target fusion scores are continuously acquired, and their changing patterns are analyzed to determine the score change trend of the target fusion score.

[0104] Furthermore, when the target fusion score is less than the first score threshold, the light source corresponding to the target fusion score is indeed an interfering light source, and the light source is ignored, while the high beam is maintained.

[0105] Step S53: When the score change trend is greater than the change stability threshold, or the target fusion score is greater than the second score threshold, switch between high and low beam headlights.

[0106] Understandably, when the score change trend is greater than the change stability threshold, it indicates that the score change is stable and the switching condition has been met, or when the target fusion score is greater than the second score threshold, it indicates that the light source is clearly a real vehicle light, and the high beam switching operation is performed, such as switching from high beam to low beam or blocking the high beam.

[0107] This embodiment provides a method for switching between high and low beam headlights in a vehicle. By introducing a change stability threshold when the target fusion score is between the first and second score thresholds, the stability of the score change trend is judged, and a decision is made on whether to switch between high and low beam headlights accordingly. This solves the problem of misjudgment and misoperation caused by score fluctuations under boundary conditions, and achieves the beneficial effect of improving the decision-making accuracy of the high and low beam headlight control system and avoiding unnecessary headlight switching, thereby optimizing driving safety and comfort.

[0108] For example, to help understand the implementation process of the vehicle high / low beam headlight switching method obtained by combining this embodiment with the above embodiment one, please refer to... Figure 3 , Figure 3A simplified flowchart illustrating a method for switching between high and low beam headlights in a vehicle is provided, specifically: The process begins with data acquisition and consists of three parallel model scoring processes: spatial model scoring, semantic segmentation model scoring, and scene recognition model scoring. The spatial model score calculates the spatial rationality score of the light source; the semantic segmentation model score identifies the object category of the light source and calculates its semantic score; and the scene recognition model score determines the current driving scenario type and assigns a basic scene score. The outputs of these three scoring models are combined by the fusion decision module, and the final fusion score is obtained through a weighted summation. The fusion decision score is used to execute decisions. If the final score is less than 3 points, it is determined to be an interference source, and the light source is ignored while maintaining high beam. If the score is greater than 8 points, it is determined to be a real vehicle, triggering high beam blocking or switching. When the final score is between high and low thresholds, the system continuously tracks the score change trend of the light source. If the trend stabilizes and crosses the threshold, a change in the lighting state is triggered. The structural function of this flowchart is to improve the accuracy and reliability of the adaptive high beam system through multi-model fusion. Combined with the technical solutions mentioned in the technical disclosure, this flowchart demonstrates how the use of high and low beams is dynamically adjusted through the comprehensive evaluation of the spatial segmentation model, semantic segmentation model, and scene recognition model to adapt to different driving environments and needs.

[0109] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the method of switching between high and low beam headlights for the vehicle in this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0110] This application also provides a high / low beam switching device for a vehicle, please refer to... Figure 4 The vehicle's high / low beam switching device includes: The information acquisition module 10 is used to acquire the current vehicle's light source image area, light source coordinate information, and current environmental information; The scoring calculation module 20 is used to calculate the spatial rationality score based on the light source image region and the light source coordinate information, and input the light source image region and the light source coordinate information into the semantic segmentation model to obtain the semantic category score; The scoring calculation module 20 is also used to input the current environment information into the scene recognition model to obtain a scene recognition score; The scoring calculation module 20 is also used to calculate the target fusion score based on the spatial rationality score, the semantic category score, and the scene recognition score; The high / low beam switching module 30 is used to switch between high and low beams based on the target fusion score.

[0111] The vehicle high / low beam switching device provided in this application, employing the vehicle high / low beam switching method described in the above embodiments, can solve the technical problem of difficulty in distinguishing between actual vehicle lights and high-position ambient light sources under diverse nighttime light source conditions, thus preventing false triggering of high / low beams. Compared with the prior art, the beneficial effects of the vehicle high / low beam switching device provided in this application are the same as those of the vehicle high / low beam switching method provided in the above embodiments, and other technical features in the vehicle high / low beam switching device are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0112] In one embodiment, the scoring calculation module 20 is further configured to obtain a preset sensing distance, a preset headlight height, a height threshold, and a deviation threshold; determine the relative distance of the light source, the height of the light source, and the center offset of the light source based on the light source image area and the light source coordinate information; and calculate a spatial rationality score based on the preset sensing distance, the preset headlight height, the height threshold, the deviation threshold, the relative distance of the light source, the height of the light source, and the center offset of the light source.

[0113] In one embodiment, the scoring calculation module 20 is further configured to acquire distance weight, height weight, and horizontal deviation weight; calculate a distance score based on the relative distance of the light source and the preset perception distance; calculate a height score based on the light source height, the preset headlight height, and the height threshold; calculate a horizontal deviation score based on the light source center offset and the deviation value threshold; and calculate a spatial rationality score based on the distance weight, the height weight, the horizontal deviation weight, the distance score, the height score, and the horizontal deviation score.

[0114] In one embodiment, the score calculation module 20 is further configured to obtain a preset scoring coefficient; input the light source image region and the light source coordinate information into a semantic segmentation model to obtain a vehicle category confidence score; and calculate a semantic category score based on the preset scoring coefficient and the vehicle category confidence score.

[0115] In one embodiment, the scoring calculation module 20 is further configured to acquire positioning information, current vehicle speed, a first vehicle speed threshold, a light intensity threshold, a preset first density, a second vehicle speed threshold, and a preset second density; determine driving conditions based on the positioning information, wherein the first vehicle speed threshold is greater than the second vehicle speed threshold, and the preset first density is greater than the preset second density; determine ambient light intensity and street light density based on the current environment information; identify the current scene based on the current vehicle speed, the first vehicle speed threshold, the light intensity threshold, the preset first density, the second vehicle speed threshold, the preset second density, the ambient light intensity, and the street light density; and input the current scene into a scene recognition model to obtain a scene recognition score.

[0116] In one embodiment, the score calculation module 20 is further configured to obtain spatial rationality weight, semantic category weight, and scene recognition weight; and calculate the target fusion score based on the spatial rationality weight, the semantic category weight, the scene recognition weight, the spatial rationality score, the semantic category score, and the scene recognition score.

[0117] In one embodiment, the high / low beam switching module 30 is further configured to acquire a first score threshold, a second score threshold, and a change stability threshold; determine the score change trend of the target fusion score when the target fusion score is greater than the first score threshold and less than the second score threshold; and perform high / low beam switching when the score change trend is greater than the change stability threshold or the target fusion score is greater than the second score threshold.

[0118] This application provides a high / low beam switching device for a vehicle, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the high / low beam switching method for the vehicle described in Embodiment 1 above.

[0119] The following is for reference. Figure 5 This document illustrates a structural schematic diagram of a vehicle high / low beam switching device suitable for implementing embodiments of this application. The vehicle high / low beam switching device in embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital radio receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The high / low beam headlight switching device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0120] like Figure 5As shown, the vehicle's high / low beam headlight switching device may include a processing unit 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in ROM (Read Only Memory) 1002 or a program loaded from storage device 1003 into RAM (Random Access Memory) 1004. RAM 1004 also stores various programs and data required for the operation of the vehicle's high / low beam headlight switching device. The processing unit 1001, ROM 1002, and RAM 1004 are interconnected via bus 1005. Input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to I / O interface 1006: input devices 1007 including, for example, touchscreens, touchpads, keyboards, mice, image sensors, microphones, accelerometers, gyroscopes, etc.; output devices 1008 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 1003 including, for example, magnetic tapes, hard disks, etc.; and communication devices 1009. Communication device 1009 allows the vehicle's high / low beam switching device to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows a vehicle's high / low beam switching device with various systems, it should be understood that it is not required to implement or possess all the systems shown. More or fewer systems may be implemented or possessed alternatively.

[0121] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0122] The vehicle high / low beam switching device provided in this application, employing the vehicle high / low beam switching method described in the above embodiments, solves the technical problem of difficulty in distinguishing between actual vehicle lights and high-position ambient light sources under diverse nighttime light source conditions, thus preventing false triggering of high / low beams. Compared with the prior art, the beneficial effects of the vehicle high / low beam switching device provided in this application are the same as those of the vehicle high / low beam switching method provided in the above embodiments, and other technical features of this vehicle high / low beam switching device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0123] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0124] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0125] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to execute the high / low beam switching method for a vehicle in the above embodiments.

[0126] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, RAM (Random Access Memory), ROM (Read Only Memory), Erasable Programmable Read Only Memory (EPROM), optical fiber, CD-ROM (CD-Read Only Memory), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, system, or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0127] The aforementioned computer-readable storage medium may be included in the vehicle's high / low beam switching device; or it may exist independently and not installed in the vehicle's high / low beam switching device.

[0128] The aforementioned computer-readable storage medium carries one or more programs that, when executed by a vehicle's high / low beam switching device, cause the vehicle's high / low beam switching device to: acquire the current vehicle's light source image region, light source coordinate information, and current environment information; calculate a spatial rationality score based on the light source image region and the light source coordinate information, and input the light source image region and the light source coordinate information into a semantic segmentation model to obtain a semantic category score; input the current environment information into a scene recognition model to obtain a scene recognition score; calculate a target fusion score based on the spatial rationality score, the semantic category score, and the scene recognition score; and perform high / low beam switching based on the target fusion score.

[0129] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including LAN (Local Area Network) or WAN (Wide Area Network)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0130] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0131] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0132] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the high / low beam switching method of the aforementioned vehicle. This solves the technical problem of difficulty in distinguishing between actual vehicle lights and high-position ambient light sources under diverse nighttime light source conditions, leading to false triggering of high / low beams. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as those of the high / low beam switching method of the vehicle provided in the above embodiments, and will not be repeated here.

[0133] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the vehicle high / low beam headlight switching method described above.

[0134] The computer program product provided in this application can solve the technical problem of difficulty in distinguishing between real vehicle lights and high-position ambient light sources under diverse nighttime light source conditions, leading to false triggering of high and low beam headlights. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the vehicle high and low beam headlight switching method provided in the above embodiments, and will not be repeated here.

[0135] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. A method for switching between high and low beam headlights in a vehicle, characterized in that, The method includes: Obtain the current vehicle's light source image area, light source coordinate information, and current environment information; The spatial rationality score is calculated based on the light source image region and the light source coordinate information, and the light source image region and the light source coordinate information are input into the semantic segmentation model to obtain the semantic category score; The current environment information is input into the scene recognition model to obtain the scene recognition score; The target fusion score is calculated based on the spatial rationality score, the semantic category score, and the scene recognition score. The high and low beam headlights are switched based on the target fusion score.

2. The method as described in claim 1, characterized in that, The steps for calculating the spatial rationality score based on the light source image region and the light source coordinate information include: Obtain preset sensing distance, preset headlight height, height threshold, and deviation threshold; The relative distance to the light source, the height of the light source, and the offset of the center of the light source are determined based on the light source image area and the light source coordinate information. A spatial rationality score is calculated based on the preset sensing distance, the preset headlight height, the height threshold, the deviation threshold, the relative distance of the light source, the height of the light source, and the offset of the light source center.

3. The method as described in claim 2, characterized in that, The step of calculating the spatial rationality score based on the preset sensing distance, the preset headlight height, the height threshold, the deviation threshold, the relative distance of the light source, the height of the light source, and the center offset of the light source includes: Obtain the distance weight, height weight, and horizontal deviation weight; A distance score is calculated based on the relative distance to the light source and the preset sensing distance. A height score is calculated based on the light source height, the preset headlight height, and the height threshold. Calculate the horizontal deviation score based on the light source center offset and the deviation threshold. The spatial rationality score is calculated based on the distance weight, the height weight, the horizontal deviation weight, the distance score, the height score, and the horizontal deviation score.

4. The method as described in claim 1, characterized in that, The steps of inputting the light source image region and the light source coordinate information into the semantic segmentation model to obtain the semantic category score include: Obtain the preset rating coefficient; The light source image region and the light source coordinate information are input into the semantic segmentation model to obtain the vehicle category confidence score. The semantic category score is calculated based on the preset scoring coefficient and the vehicle category confidence level.

5. The method as described in claim 1, characterized in that, The step of inputting the current environment information into the scene recognition model to obtain the scene recognition score includes: The system acquires location information, current vehicle speed, first vehicle speed threshold, light intensity threshold, preset first density, second vehicle speed threshold, and preset second density, and determines the road conditions based on the location information, wherein the first vehicle speed threshold is greater than the second vehicle speed threshold, and the preset first density is greater than the preset second density. Determine the ambient light intensity and street light density based on the current environmental information; The current scene is identified based on the current vehicle speed, the first vehicle speed threshold, the light intensity threshold, the preset first density, the second vehicle speed threshold, the preset second density, the ambient light intensity, and the street light density. The current scene is input into the scene recognition model to obtain a scene recognition score.

6. The method as described in claim 1, characterized in that, The step of calculating the target fusion score based on the spatial rationality score, the semantic category score, and the scene recognition score includes: Obtain spatial rationality weights, semantic category weights, and scene recognition weights; The target fusion score is calculated based on the spatial rationality weight, the semantic category weight, the scene recognition weight, the spatial rationality score, the semantic category score, and the scene recognition score.

7. The method as described in claim 1, characterized in that, The step of switching between high and low beam headlights based on the target fusion score includes: Obtain the first score threshold, the second score threshold, and the change stability threshold; When the target fusion score is greater than the first score threshold and less than the second score threshold, the score change trend of the target fusion score is determined; When the score change trend is greater than the change stability threshold, or when the target fusion score is greater than the second score threshold, the high beam / low beam switching is performed.

8. A high / low beam switching device for a vehicle, characterized in that, The device includes: The information acquisition module is used to acquire the current vehicle's light source image area, light source coordinate information, and current environmental information; The scoring calculation module is used to calculate the spatial rationality score based on the light source image region and the light source coordinate information, and input the light source image region and the light source coordinate information into the semantic segmentation model to obtain the semantic category score; The scoring calculation module is also used to input the current environment information into the scene recognition model to obtain a scene recognition score; The scoring calculation module is also used to calculate the target fusion score based on the spatial rationality score, the semantic category score, and the scene recognition score; The high / low beam switching module is used to switch between high and low beams based on the target fusion score.

9. A high / low beam switching device for a vehicle, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the high / low beam switching method for a vehicle as described in any one of claims 1 to 7.

10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the high beam / low beam switching method for a vehicle as described in any one of claims 1 to 7.