Intelligent spectrum tuning code scanning auxiliary lighting method, system and equipment and medium

By monitoring the ambient light and QR code location in real time, and dynamically adjusting the spectral combination of RGBW LED arrays, the problem of poor QR code scanning effect of LED fill light equipment in complex lighting environments is solved, and efficient and energy-saving code scanning assistive lighting is achieved.

CN120264524AInactive Publication Date: 2025-07-04ZHONGKE ZHIBO TECH (GUANGZHOU) CO LTD
View PDF 0 Cites 5 Cited by

Patent Information

Application Number
CN202510434310.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-08
Publication Date
2025-07-04
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing LED fill-up lighting equipment is difficult to adapt to the complex and changeable outdoor lighting environment, resulting in poor QR code scanning effect, especially when strong light is exposed directly, it is easy to cause QR code overexposed or insufficient contrast, reducing the recognition effect.

Method used

By monitoring the ambient light intensity, color temperature and light incident angle in real time, combining the spatial position relationship between the QR code and the device, dynamically adjusting the spectral combination of the RGBW LED array to achieve intelligent spectral tuning fill light and optimize the scanning environment.

Benefits of technology

It significantly improves the success rate and payment efficiency of QR code scanning, can maintain efficient scanning performance in complex lighting environments, and optimize energy consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120264524A_ABST
    Figure CN120264524A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent spectrum tuning, in particular to an intelligent spectrum tuning code scanning auxiliary lighting method, system and device and a medium. The method comprises the following steps: firstly, monitoring environment illumination intensity, color temperature and a light incident angle in real time through an illumination sensor, and meanwhile, detecting a spatial position relationship between a two-dimensional code and equipment by utilizing a distance sensor; the system performs intelligent analysis according to the real-time parameters, determines an optimal light supplementing strategy, and controls the RGBW LED array to output a corresponding spectrum combination; the system continuously monitors the scanning effect after light supplementation, and dynamically adjusts light supplementation parameters by evaluating the definition and contrast of the two-dimensional code until the optimal scanning state is reached; the environment illumination parameters and the spatial position parameters are combined for comprehensive analysis, and the RGBW LED array is adopted to realize adjustable spectrum output, so that the influence of the outdoor complex illumination environment on two-dimensional code scanning can be effectively overcome, and the payment efficiency is remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of intelligent spectral tuning, and particularly to an intelligent spectral tuning code scanning assisted lighting method, system, device and medium. Background Art

[0002] With the popularization of smart parking lots, QR code payment has become the main way for parking lot charging. Especially in outdoor parking lots, car owners complete the payment by scanning the QR code on the payment terminal. This unattended payment method greatly improves the operation efficiency of the parking lot and reduces the labor cost.

[0003] Currently, the payment terminals in outdoor parking lots generally use fixed-brightness LED light supplement boards as code scanning assisted lighting devices. By providing a constant background light source, this kind of light supplement board attempts to improve the imaging quality of the QR code and increase the scanning success rate.

[0004] However, due to the complex and changeable outdoor lighting conditions, the fixed-brightness LED light supplement effect is difficult to adapt to the lighting environment at different times and in different weather conditions. Especially when directly irradiated by strong light, the traditional light supplement board cannot dynamically adjust the spectral combination, which easily causes overexposure or insufficient contrast of the QR code and reduces the recognition effect; this situation needs to be further improved. Summary of the Invention

[0005] In order to solve the problem that the existing LED light supplement effect is difficult to adapt to the lighting environment at different times and in different weather conditions, this application provides an intelligent spectral tuning code scanning assisted lighting method, system, device and medium, and adopts the following technical solutions: In a first aspect, this application provides an intelligent spectral tuning code scanning assisted lighting method, which is characterized by including the following steps: Real-time monitor the environmental light intensity, color temperature and light incident angle to obtain environmental light parameter data; Detect the distance and angle relationship between the QR code and the device to obtain spatial position parameter data; According to the environmental light parameter data and the spatial position parameter data, conduct a lighting environment analysis to determine the lighting compensation strategy and light source configuration parameters for the QR code scanning area; Based on the light source configuration parameters, control the RGBW LED array to output the corresponding spectral combination to compensate the lighting of the QR code scanning area, and obtain the scanned environment after primary compensation; Real-time detect the clarity and contrast of the QR code in the scanned environment after primary compensation to obtain a scanning quality evaluation result; According to the scanning quality evaluation result, dynamically adjust the lighting compensation strategy and real-time optimize the light source configuration parameters until the preset scanning quality threshold requirement is met, and obtain the finally optimized QR code scanning environment.

[0006] By adopting the above technical solution, the present application first monitors the ambient light intensity, color temperature and light incident angle in real time through a light sensor, and at the same time uses a distance sensor to detect the spatial position relationship between the two-dimensional code and the device; the system performs intelligent analysis based on these real-time parameters, determines the optimal supplementary light strategy, and controls the RGBW LED array to output the corresponding spectral combination; the system continuously monitors the scanning effect after supplementary light, and dynamically adjusts the supplementary light parameters by evaluating the clarity and contrast of the two-dimensional code until the best scanning state is achieved; by combining the ambient light parameters and the spatial position parameters for comprehensive analysis and adopting the RGBW LED array to achieve adjustable spectral output, it can effectively overcome the influence of the complex outdoor lighting environment on the two-dimensional code scanning and significantly improve the payment efficiency.

[0007] Optionally, according to the ambient light parameter data and the spatial position parameter data, perform lighting environment analysis, which specifically includes the following steps: Based on the ambient light intensity and color temperature data, judge the current scene type to obtain the corresponding preset supplementary light mode parameters; Based on the preset supplementary light mode parameters and the distance and angle relationship between the two-dimensional code and the device, calculate the required basic supplementary light intensity value; Based on the basic supplementary light intensity value and the ambient light incident angle, determine the output power coefficient and projection angle parameter of each color LED; Based on the output power coefficient and projection angle parameter, calculate the initial working parameters of the RGBW LED array to obtain the brightness value and turn-on combination of each color LED.

[0008] By adopting the above technical solution, the present application first classifies the scene according to the ambient light intensity and color temperature data, and matches the most suitable basic parameters from the preset supplementary light mode library; combines the actual distance and angle relationship between the two-dimensional code and the device to correct and calculate the basic supplementary light intensity; on this basis, considering the incident angle of the ambient light, accurately calculates the output power coefficient and projection angle parameter required for each color LED; converts these parameters into the specific working parameters of the RGBW LED array, determines the brightness value and turn-on combination of each LED; introduces the spatial position factor into the supplementary light intensity calculation; realizes the accurate mapping conversion from environmental parameters to LED working parameters, can provide the optimal supplementary light effect for different scenes, and significantly improves the scanning success rate.

[0009] Optionally, the method further includes the following steps: Detect the change rate of the ambient light intensity to obtain the light mutation state parameter; Based on the light mutation state parameter, calculate the adjustment rate and amplitude of the supplementary light response to obtain the fast supplementary light adjustment parameter; Record the successful scanning environment parameters and the corresponding light source configuration parameters in the recent period, and establish a parameter optimization comparison table; Based on the parameter optimization comparison table, determine the light source configuration parameter combination of the most recent successful scenario; According to the light source configuration parameter combination and the current scanning success rate, calculate the dynamic switching period of the supplementary lighting strategy to obtain the update frequency of the supplementary lighting parameters.

[0010] By adopting the above technical solution, the present application first monitors the change rate of the ambient light intensity in real time. When a sudden change in light is detected, it immediately calculates the required supplementary lighting adjustment rate and amplitude to achieve a quick response. The system continuously records the environmental parameters and the corresponding light source configuration parameters during successful scanning, and establishes a parameter optimization comparison table. When a sudden change in light occurs, the system can quickly match the successful parameter combination of a similar scenario from the comparison table to achieve a quick switch of the supplementary lighting parameters. More importantly, the system dynamically adjusts the parameter update frequency according to the current scanning success rate, avoiding over-adjustment while ensuring the response speed. The present application introduces a sudden change in light state detection mechanism, establishes a parameter optimization comparison table based on historical successful experience, realizes the intelligent dynamic adjustment of the supplementary lighting parameters, can timely adjust the supplementary lighting strategy when a sudden change in light occurs, and significantly improves the continuity and reliability of code scanning.

[0011] Optionally, dynamically adjust the light compensation strategy according to the scanning quality evaluation result, which specifically includes the following steps: Collect the two-dimensional code image data, calculate the overall brightness value and the contrast value to obtain the image quality parameters; Based on the comparison between the image quality parameters and the preset minimum recognition threshold, determine the supplementary lighting adjustment requirement; According to the supplementary lighting adjustment requirement, calculate the output power compensation value of the white light LED; Based on the output power compensation value and the ambient color temperature parameters, determine the output ratio coefficient of the RGB LED to obtain the final supplementary lighting parameters.

[0012] By adopting the above technical solution, the present application first collects the real-time image of the two-dimensional code, and obtains objective image quality parameters by calculating the overall brightness value and the contrast value. Subsequently, these parameters are compared with the preset minimum recognition threshold to accurately judge whether the current supplementary lighting is sufficient and the direction and amplitude of the adjustment required. The system preferentially adjusts the output power of the white light LED to ensure the basic lighting requirements. Finally, in combination with the ambient color temperature parameters, the system accurately calculates the output ratio coefficient of the RGB LED to achieve the optimal spectral compensation effect. The image quality evaluation is introduced into the supplementary lighting adjustment process, the mapping relationship between the two-dimensional code image parameters and the LED supplementary lighting parameters is established, and the closed-loop control from quality evaluation to parameter adjustment is realized, significantly improving the recognition accuracy.

[0013] Optionally, according to the scanning quality evaluation result, dynamically adjusting the light compensation strategy further includes the following steps: According to the system response characteristics, calculate the minimum step value of fill light adjustment to obtain the adjustment accuracy parameter; Based on the adjustment accuracy parameter and the ambient light change rate, determine the sensitivity coefficient of fill light response; According to the sensitivity coefficient and the number of consecutive scanning failures, calculate the adjustment step value of the fill light parameter; Based on the adjustment step value and the historical success record, obtain the optimized fill light parameter combination.

[0014] By adopting the above technical solution, the present application first calculates the minimum controllable step of fill light adjustment according to the response characteristics of the hardware device to ensure that the adjustment accuracy is within the controllable range of the system; by analyzing the change rate of the ambient light, the system dynamically determines the sensitivity coefficient of fill light response to achieve a fast response to environmental changes; the system will dynamically adjust the change step of the fill light parameter according to the number of consecutive scanning failures, appropriately increasing the adjustment amplitude when the scanning continuously fails, and using a smaller adjustment step for fine adjustment when approaching the optimal state; finally, referring to the historical success record to ensure the correctness of the adjustment direction; realizing the dynamic mapping between the number of scanning failures and the adjustment step, being able to ensure the smoothness of adjustment while guaranteeing the response speed, and significantly improving the stability of the fill light effect.

[0015] Optionally, the method further includes the following steps: According to the ambient light conditions, calculate the energy consumption values of each LED combination scheme to obtain the optimal combination scheme; Based on the optimal combination scheme and the scanning state, determine the LED dynamic power control parameter; According to the power control parameter and the device motion state, calculate the system refresh period; Based on the refresh period and the battery power level, determine the maximum output power limit of the LED.

[0016] By adopting the above technical solution, the present application first analyzes the feasible LED combination schemes under the current ambient light conditions, and finds out the combination scheme with the optimal energy consumption while ensuring the code scanning effect by calculating the energy consumption values of each scheme; the system will dynamically adjust the power control parameter of the LED according to the real-time scanning state, avoiding unnecessary energy consumption while ensuring the code scanning quality; at the same time, the system will consider the device motion state and reasonably calculate the system refresh period to avoid excessive parameter adjustment; finally, according to the current battery power level, set the maximum output power limit of the LED to realize the intelligent control of energy consumption; in the battery-powered auxiliary lighting device, it not only ensures the code scanning effect, but also significantly extends the battery life of the device and improves the overall operation efficiency.

[0017] In a second aspect, the present application provides an intelligent spectral tuning code scanning assisted lighting system, including: An ambient light parameter data acquisition module, configured to monitor the ambient light intensity, color temperature, and light incident angle in real time, and obtain ambient light parameter data; A spatial position parameter data acquisition module, configured to detect the distance and angular relationship between the two-dimensional code and the device, and obtain spatial position parameter data; A lighting environment analysis module, configured to perform lighting environment analysis based on the ambient light parameter data and the spatial position parameter data according to a preset ambient perception algorithm, and determine a lighting compensation strategy and light source configuration parameters for the two-dimensional code scanning area; A primary lighting compensation module, configured to control the RGBW LED array to output a corresponding spectral combination based on the light source configuration parameters, perform lighting compensation on the two-dimensional code scanning area, and obtain a scanned environment after primary compensation; A scanning quality evaluation module, configured to detect the clarity and contrast of the two-dimensional code in the scanned environment after primary compensation in real time, and obtain a scanning quality evaluation result; A compensation dynamic adjustment module, configured to dynamically adjust the lighting compensation strategy according to the scanning quality evaluation result, and optimize the light source configuration parameters in real time until the preset scanning quality threshold requirement is met, and obtain an ultimately optimized two-dimensional code scanning environment.

[0018] In a third aspect, the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the steps of the above-mentioned intelligent spectral tuning code scanning assisted lighting method are implemented.

[0019] In a fourth aspect, the present application provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned intelligent spectral tuning code scanning assisted lighting method are implemented.

[0020] In summary, the present application includes at least one of the following beneficial technical effects: 1. The present application first monitors the ambient light intensity, color temperature, and light incident angle in real time through a light sensor, and at the same time uses a distance sensor to detect the spatial position relationship between the two-dimensional code and the device; the system performs intelligent analysis based on these real-time parameters, determines the optimal light compensation strategy, and controls the RGBW LED array to output the corresponding spectral combination; the system continuously monitors the scanning effect after light compensation, and dynamically adjusts the light compensation parameters by evaluating the clarity and contrast of the two-dimensional code until the best scanning state is reached; by combining the ambient light parameter and the spatial position parameter for comprehensive analysis and using the RGBW LED array to achieve adjustable spectral output, it can effectively overcome the influence of complex outdoor lighting environments on two-dimensional code scanning and significantly improve the payment efficiency. 2. The present application first classifies the scene according to the ambient light intensity and color temperature data, and matches the most suitable basic parameters from the preset fill light mode library; combines the actual distance and angle relationship between the QR code and the device to correct and calculate the basic fill light intensity; on this basis, considering the incident angle of the ambient light, accurately calculates the output power coefficient and projection angle parameters required for each color LED; converts these parameters into the specific working parameters of the RGBW LED array, determines the brightness value and on combination of each LED; introduces the spatial position factor into the fill light intensity calculation; realizes the accurate mapping conversion from environmental parameters to LED working parameters, can provide the optimal fill light effect for different scenes, and significantly improves the QR code scanning success rate; 3. The present application first monitors the change rate of the ambient light intensity in real time. When a sudden change in light is detected, it immediately calculates the required fill light adjustment rate and amplitude to achieve a fast response; the system continuously records the environmental parameters and the corresponding light source configuration parameters when the scanning is successful, and establishes a parameter optimization comparison table; when a sudden change in light occurs, the system can quickly match the successful parameter combination of a similar scene from the comparison table to achieve a fast switch of the fill light parameters; more importantly, the system dynamically adjusts the parameter update frequency according to the current scanning success rate, avoiding over-adjustment while ensuring the response speed; the present application introduces a sudden change in light state detection mechanism and establishes a parameter optimization comparison table based on historical successful experience; realizes the intelligent dynamic adjustment of the fill light parameters; can timely adjust the fill light strategy when a sudden change in light occurs, and significantly improves the continuity and reliability of QR code scanning. Description of the Drawings

[0021] Figure 1 is a schematic flowchart of an intelligent spectral tuning QR code scanning assisted lighting method according to an embodiment of the present application; Figure 2 is a schematic flowchart of step S130 in an intelligent spectral tuning QR code scanning assisted lighting method according to an embodiment of the present application; Figure 3 is a schematic flowchart of obtaining the fill light parameter update frequency in an intelligent spectral tuning QR code scanning assisted lighting method according to an embodiment of the present application; Figure 4 is a schematic flowchart of step S160 in an intelligent spectral tuning QR code scanning assisted lighting method according to an embodiment of the present application Figure 1 ; Figure 5 is a schematic flowchart of step S160 in an intelligent spectral tuning QR code scanning assisted lighting method according to an embodiment of the present application Figure 2 ; Figure 6 is a schematic flowchart of determining the maximum output power limit value of the LED in an intelligent spectral tuning QR code scanning assisted lighting method according to an embodiment of the present application; Figure 7It is a schematic diagram of the modules of an intelligent spectral tuning code scanning assisted lighting system according to an embodiment of the present application; Figure 8 It is an internal structure diagram of an electronic device according to an embodiment of the present application. Specific embodiments

[0022] The terms used in the following embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the present application. As used in the specification and appended claims of the present application, the singular forms "a", "an", "the", "above-mentioned", "said", and "this" are also intended to include the plural forms, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in the present application refers to any or all possible combinations including one or more of the listed items.

[0023] Hereinafter, the terms "first" and "second" are only used for descriptive purposes, and cannot be construed as implying or suggesting relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, unless otherwise specified, the meaning of "a plurality" is two or more.

[0024] The following further describes the embodiments of the present application in detail with reference to the accompanying drawings of the specification.

[0025] In a first aspect, the present application provides an intelligent spectral tuning code scanning assisted lighting method. Referring to Figure 1 , the method includes the following steps: S110. Real-time monitor the environmental light intensity, color temperature, and light incident angle to obtain environmental light parameter data.

[0026] In this embodiment, the environmental light intensity refers to the luminous flux per unit area, the color temperature refers to the color of the light emitted by the light source, the light incident angle refers to the angle between the environmental light and the two-dimensional code plane, and the environmental light parameter data includes the real-time measurement values of these three dimensions.

[0027] Specifically, in this embodiment, a photosensitive sensor array is used to collect the environmental light intensity in real time, a spectral analyzer is used to measure the color temperature, and a light angle sensor is used to detect the incident angle. The system collects data every 100 ms and establishes an environmental light parameter lookup table, classifying the lighting characteristics at different times into typical scenarios such as "sunny day sunlight", "cloudy day diffuse", and "night street lamp". For example, when the detected light intensity is between 50000 - 100000 lux, the color temperature is between 5500 - 6500 K, and the incident angle is close to vertical, it can be determined as a sunny noon scenario.

[0028] S120. Detect the distance and angular relationship between the QR code and the device to obtain spatial position parameter data.

[0029] In this embodiment, the distance refers to the vertical distance from the center of the QR code plane to the optical system of the scanning device, in millimeters (mm); the angular relationship includes the horizontal deflection angle and the pitch angle, both expressed in degrees (°). The spatial position parameter data is used to describe the relative spatial position relationship between the scanning device and the QR code.

[0030] Specifically, in this embodiment, an infrared ranging sensor is used to measure the distance, and angle data is obtained through the gyroscope built in the device. The system establishes a distance-angle compensation table and presets basic light compensation parameters according to different combinations of distance and angle.

[0031] S130. Based on the environmental light parameter data and the spatial position parameter data, perform a light environment analysis to determine the light compensation strategy and light source configuration parameters for the QR code scanning area.

[0032] In this embodiment, the light compensation strategy refers to the light supplement scheme selected according to the environmental conditions, including the light supplement intensity level, the color temperature adjustment direction, and the light projection angle; the light source configuration parameters include specific parameters such as the on combination of each LED, the power coefficient, and the projection angle.

[0033] Specifically, in this embodiment, the basic light compensation scheme is determined by looking up the preset scenario-strategy mapping table. This mapping table is summarized from a large amount of experimental data and does not require complex model calculations. The system compares the environmental parameters with the preset thresholds to directly obtain the corresponding light source configuration parameters.

[0034] S140. Based on the light source configuration parameters, control the RGBW LED array to output the corresponding spectral combination to perform light compensation on the QR code scanning area, obtaining the scanning environment after the initial compensation.

[0035] In this embodiment, the RGBW LED array refers to a light source matrix composed of red, green, and blue LEDs and white LEDs arranged in a specific pattern; the spectral combination refers to the brightness ratio of different color LEDs, used to achieve a specific lighting effect; the scanning environment after the initial compensation refers to the scene light state after the first round of light adjustment.

[0036] Specifically, in this embodiment, a 4×4 RGBW LED matrix layout is adopted, and the brightness output of each LED is controlled by a PWM signal. The system establishes a basic spectral ratio table, which contains the LED brightness combinations in common scenarios.

[0037] S150. Real-time detect the clarity and contrast of the QR code in the scanning environment after the initial compensation to obtain the scanning quality evaluation result.

[0038] In this embodiment, clarity refers to the sharpness of the edges of the QR code image, which is represented by the image gradient value; contrast refers to the degree of brightness difference between the bright and dark areas of the image, which is represented by the gray level difference between adjacent pixel points; the scanning quality evaluation result includes the quantization indexes in these two dimensions.

[0039] Specifically, this embodiment uses a simple image processing algorithm to evaluate the scanning quality. The system calculates the average gradient value of the image as the clarity index and obtains the contrast value by using the local contrast calculation formula.

[0040] S160. According to the scanning quality evaluation result, dynamically adjust the light compensation strategy and optimize the light source configuration parameters in real time until the preset scanning quality threshold requirement is met, and obtain the finally optimized QR code scanning environment.

[0041] In this embodiment, dynamic adjustment means automatically correcting the light filling parameters according to the real-time evaluation result; the preset scanning quality threshold refers to the lowest acceptable clarity and contrast standards predefined by the system; the finally optimized scanning environment refers to the final light state after all adjustments are completed.

[0042] Specifically, this embodiment adopts a feedback adjustment mechanism. The system queries the preset adjustment step table for parameter correction according to the difference between the current scanning quality and the preset threshold. When it is detected that the clarity is insufficient, the system will gradually increase the output power of the white LED according to the strategy of "small step - evaluation - readjustment"; when the contrast is low, the ratio of the RGB LED will be adjusted accordingly. The adjustment process uses a fixed step size progression until the preset quality requirement is met or the system limit is reached.

[0043] In one embodiment, referring to Figure 2 , in step 130, according to the environmental light parameter data and the spatial position parameter data, perform light environment analysis, which specifically includes the following steps: S131. According to the environmental light intensity and color temperature data, judge the current scene type and obtain the corresponding preset light filling mode parameters.

[0044] In this embodiment, the scene type refers to the classification characteristics of the current environmental light conditions, such as different situations of natural light, artificial lighting, etc.; the preset light filling mode parameters include the recommended light filling strategy and reference parameters, which are used to guide the subsequent specific parameter calculation.

[0045] Specifically, this embodiment establishes a two-dimensional scene mapping table to map the combination of light intensity and color temperature to the predefined scene types. The system divides the light intensity into three levels: high (>50000 lux), medium (5000 - 50000 lux), and low (<5000 lux), and divides the color temperature into three intervals: warm color (<3500 K), neutral (3500 - 5500 K), and cold color (>5500 K).

[0046] S132. Calculate the required basic fill light intensity value based on the preset fill light mode parameters and the distance and angle relationship between the QR code and the device.

[0047] In this embodiment, the basic fill light intensity value refers to the reference value of the light intensity that needs to be supplemented under standard conditions, and this value needs to be corrected according to the spatial position relationship. The calculation of the basic fill light intensity needs to consider the recommended value of the preset fill light mode and the actual spatial attenuation factor.

[0048] Specifically, this embodiment uses the distance attenuation formula to calculate the basic fill light intensity. The system first obtains the standard fill light intensity reference value from the preset mode, and then performs attenuation calculation according to the inverse square law based on the actual distance. At the same time, an angle compensation coefficient table is established. When the scanning angle deviates from the vertical direction, the compensation coefficient is obtained by looking up the table for correction.

[0049] S133. Determine the output power coefficient and projection angle parameter of each color LED according to the basic fill light intensity value and the incident angle of the ambient light.

[0050] In this embodiment, the output power coefficient refers to the percentage value of each color LED relative to its maximum power; the projection angle parameter includes the emission angle and projection direction of the LED light, which are used to optimize the lighting uniformity.

[0051] Specifically, this embodiment establishes a parameter conversion table to convert the fill light intensity requirement into specific power configuration parameters. The system queries the preset angle compensation strategy table according to the incident angle of the ambient light to determine the best projection angle of the LED. For example, when the ambient light is incident at 45 degrees from the right, the system will appropriately increase the output power of the left LED array (such as increasing by 20%) and adjust its projection angle to deflect 15 degrees to the right to achieve better fill light uniformity.

[0052] S134. Calculate the initial working parameters of the RGBW LED array based on the output power coefficient and the projection angle parameter, and obtain the brightness value and activation combination of each color LED.

[0053] In this embodiment, the initial working parameters refer to the set of configuration values when the RGBW LED array starts to work; the brightness value refers to the actual output brightness level of each LED; the activation combination specifies which LEDs need to be activated and their combination methods.

[0054] Specifically, this embodiment adopts a parameter mapping mechanism to convert the power coefficient and the projection angle into specific LED control parameters. The system establishes a basic RGBW ratio table and selects a suitable color combination according to different scenario requirements.

[0055] In one embodiment, refer to Figure 3, the method further includes the following steps: S310. Detect the change rate of the ambient light intensity to obtain a light mutation state parameter.

[0056] In this embodiment, the change rate of the ambient light intensity refers to the change amount of the light intensity per unit time; the light mutation state parameter is used to characterize the severity of the ambient light change, including information in two dimensions of the change speed and the duration.

[0057] Specifically, this embodiment uses a sliding window method to detect the light change. The system collects light data every 10 ms, maintains a data window of 300 ms, and obtains the change rate by calculating the difference between adjacent sampling points within the window.

[0058] S320. Calculate the adjustment rate and amplitude of the supplementary light response according to the light mutation state parameter to obtain a fast supplementary light adjustment parameter.

[0059] In this embodiment, the adjustment rate of the supplementary light response refers to the frequency at which the system adjusts the supplementary light parameters; the adjustment amplitude refers to the parameter change amount of each adjustment.

[0060] Specifically, this embodiment establishes a basic response strategy table and selects a corresponding adjustment scheme according to the degree of light mutation. The system divides the adjustment rate into three levels: fast, normal, and slow, and divides the adjustment amplitude into three levels: large, medium, and small.

[0061] S330. Record the successfully scanned environmental parameters and the corresponding light source configuration parameters in the recent period of time, and establish a parameter optimization comparison table.

[0062] In this embodiment, the successfully scanned environmental parameters refer to the various environmental indicators at the time of successful scanning; the light source configuration parameters refer to the LED working parameters in the corresponding scenario; the parameter optimization comparison table records the parameter combinations of successful cases and is used to guide subsequent parameter optimization.

[0063] Specifically, this embodiment uses a circular buffer structure to store the parameter records of multiple recent successful scans. Each record includes environmental parameters such as ambient light intensity, color temperature, and scanning distance, as well as the corresponding LED configuration parameters. The system classifies these records according to the scene similarity and establishes a fast retrieval table.

[0064] S340. Determine the light source configuration parameter combination of the most recent successful scenario based on the parameter optimization comparison table.

[0065] In this embodiment, the most recent successful scenario refers to the historical successful cases similar to the current environmental conditions; the light source configuration parameter combination refers to multiple groups of parameter schemes that may be applicable to the current scenario.

[0066] Specifically, this embodiment adopts a similarity matching algorithm. The system compares the current environmental parameters with the records in the parameter optimization comparison table and selects 3-5 configuration schemes with the highest similarity.

[0067] S350. Calculate the dynamic switching period of the fill light strategy based on the light source configuration parameter combination and the current scanning success rate, and obtain the update frequency of the fill light parameters.

[0068] In this embodiment, the scanning success rate refers to the proportion of the number of successfully recognized two-dimensional codes in the total number of scans per unit time; the dynamic switching period refers to the time interval for the system to adjust the fill light strategy; the update frequency of the fill light parameters determines the time rhythm for the system to adjust the fill light parameters.

[0069] Specifically, this embodiment establishes a basic frequency adjustment table and selects an appropriate update period according to the scanning success rate.

[0070] In one embodiment, referring to Figure 4 , in step S160, dynamically adjust the light compensation strategy according to the scanning quality evaluation result, which specifically includes the following steps: S161. Collect two-dimensional code image data, calculate the overall brightness value and the contrast value, and obtain the image quality parameters.

[0071] In this embodiment, the overall brightness value refers to the average gray level of the image, and the value range is 0-255; the contrast value refers to the brightness difference degree between the bright and dark areas of the image, usually represented by a value between 0 and 1; the image quality parameters are the comprehensive quantitative representation of these two-dimensional indicators.

[0072] Specifically, this embodiment calculates the image parameters in a block statistical manner. The system divides the two-dimensional code image into 3×3 grid areas and calculates the average brightness of each area respectively. The overall brightness is obtained by weighted average, where the weight of the central area of the two-dimensional code is 0.4 and the weight of the surrounding area is 0.6. The contrast calculation uses the difference statistical method of adjacent blocks. For example, when the brightness of the central area is 200 and the average brightness of the surrounding area is 100, the contrast value is calculated as 0.67. The system establishes a basic image parameter evaluation table for quickly judging the image quality level.

[0073] S162. Compare the image quality parameters with the preset minimum recognition threshold to determine the fill light adjustment requirements.

[0074] In this embodiment, the minimum recognition threshold refers to the minimum image quality standard required for the system to normally recognize the two-dimensional code; the fill light adjustment requirements include specific requirements for both brightness adjustment and contrast optimization, which are used to guide the subsequent adjustment of the fill light parameters.

[0075] S163. Calculate the output power compensation value of the white LED according to the fill light adjustment requirements.

[0076] In this embodiment, the output power compensation value refers to the specific value for adjusting the power of the white LED, which is used to provide supplementary basic lighting; the calculation of the compensation value needs to consider the current lighting deficiency degree and the system power limit.

[0077] Specifically, this embodiment uses a linear mapping table to determine the power compensation value. The system maps the compensation requirement to a specific power adjustment amount according to the brightness deficiency degree.

[0078] S164. Based on the output power compensation value and the ambient color temperature parameter, determine the output ratio coefficient of the RGB LED to obtain the final supplementary lighting parameter.

[0079] In this embodiment, the output ratio coefficient of the RGB LED refers to the power ratio parameter of the red, green, and blue LEDs; the final supplementary lighting parameter is a complete LED configuration scheme, including all working parameters of the white light and RGB light sources.

[0080] Specifically, this embodiment establishes a basic color temperature compensation table and determines the RGB ratio according to the ambient color temperature. The system converts the difference between the ambient color temperature and the target color temperature (usually 5500K) into the RGB adjustment requirement. For example, when the ambient color temperature is low (warm), the system increases the blue light ratio, and vice versa, it increases the red light ratio. The system directly obtains the preset ratio coefficient by looking up the table and forms a complete supplementary lighting scheme in combination with the white light compensation value.

[0081] In one embodiment, referring to Figure 5 , in step S160, dynamically adjusting the light compensation strategy according to the scanning quality evaluation result further includes the following steps: S165. Calculate the minimum step value of the supplementary lighting adjustment according to the system response characteristic to obtain the adjustment accuracy parameter.

[0082] In this embodiment, the system response characteristic refers to the response ability of the LED drive circuit to the control signal, including the minimum controllable PWM duty cycle and the stabilization time; the adjustment accuracy parameter includes two dimensions: the minimum brightness adjustment amount and the response delay.

[0083] Specifically, this embodiment adopts a simple stepped control method. The system uses 8-bit PWM control (duty cycle resolution of 1 / 256), divides the LED brightness into 32 grades, and each grade differs by 3.125% of the PWM duty cycle. Considering the non-linear characteristic of the LED luminous efficiency, 4-step fine adjustment is adopted in the low brightness range (<20%), 20-step adjustment is adopted in the medium brightness range (20%-80%), and 8-step coarse adjustment is adopted in the high brightness range (>80%). At the same time, to avoid flicker caused by frequent adjustment, the system sets the minimum interval between adjacent adjustments to 100ms.

[0084] S166. Determine the sensitivity coefficient of the supplementary light response based on the adjustment precision parameter and the ambient light change rate.

[0085] In this embodiment, the ambient light change rate mainly considers the typical light changes in the actual parking lot scenario.

[0086] Specifically, this embodiment adopts a three-gear control strategy. When a rapid change is detected (such as severe occlusion caused by a vehicle driving in), it directly switches to a preset emergency supplementary light scheme without continuous fine-tuning; in gradually changing scenarios such as sunrise and sunset, it adopts a conventional adjustment mode with detection every 300 ms; in stable light scenarios such as indoor parking lots, it adopts a slow mode with detection every 1 second. This grading control strategy avoids overly fine adjustment and improves system stability.

[0087] S167. Calculate the adjustment step value of the supplementary light parameter according to the sensitivity coefficient and the number of consecutive scanning failures.

[0088] In this embodiment, the adjustment of the supplementary light parameter mainly aims at typical failure situations in the parking lot payment scenario.

[0089] Specifically, this embodiment adopts a simple three-step adjustment strategy. When the first scan fails, the system keeps the current parameter and retries; when it fails twice in a row, the system switches to the preset "standard supplementary light scheme" (all LEDs on); if it still fails, it prompts the user to adjust the scanning distance or angle. This strategy avoids complex dynamic step calculation and is more in line with actual usage habits.

[0090] S168. Obtain an optimized supplementary light parameter combination based on the adjustment step value and the historical success record.

[0091] In this embodiment, the parameter optimization is mainly based on typical scenarios at different times in the parking lot.

[0092] Specifically, this embodiment presets three basic schemes: "day mode", "night mode" and "rainy mode". The system only records the time periods and corresponding schemes of the last 10 successful scans for optimizing the preset parameters at different times.

[0093] In one embodiment, referring to Figure 6 , the method further includes the following steps: S610. Calculate the energy consumption values of each LED combination scheme according to the ambient light conditions to obtain the optimal combination scheme.

[0094] In this embodiment, the LED combination scheme refers to the on / off combination and power configuration scheme of different color LEDs; the energy consumption value refers to the power consumption of each combination scheme per unit time; the optimal combination scheme refers to the LED configuration scheme with the lowest energy consumption on the premise of meeting the supplementary light requirements.

[0095] Specifically, this embodiment establishes a basic energy consumption comparison table to record the standard power consumption of different LED combinations. The system screens feasible combination schemes according to the lighting requirements and calculates the total power consumption of each scheme.

[0096] S620: Determine LED dynamic power control parameters based on the optimal combination solution and the scanning state.

[0097] In this embodiment, the scanning status includes operating indicators such as scanning frequency and success rate; the dynamic power control parameters are used to adjust the output power of the LED in real time, including the power upper limit and the adjustment period.

[0098] Specifically, this embodiment adopts a power scheduling strategy table. The system selects the corresponding power control scheme according to the scanning state, and divides the scanning frequency into three modes: high frequency (>2 times / second), medium frequency (1-2 times / second) and low frequency (<1 time / second). In the low-frequency scanning mode, the system adopts an intermittent fill light strategy, turning on the LED only when the scanning is triggered, and reducing the power to 20% or completely turning it off in the non-scanning state, thereby reducing the overall energy consumption.

[0099] S630: Calculate a system refresh cycle according to the power control parameter and the device motion state.

[0100] In this embodiment, the device motion state refers to the moving characteristics of the scanning device, including stillness, slow motion, and fast motion; the system refresh cycle determines the time interval for updating the fill light parameters.

[0101] Specifically, this embodiment uses a state determination table to determine the motion state of the device according to the acceleration sensor data. The system divides the motion amplitude into three levels: static, slow motion, and fast motion, corresponding to a longer refresh cycle (500ms), a medium cycle, and a short cycle, respectively. For example, in a fixed bracket scanning scenario (such as a parking lot entrance gate, a self-service payment machine, etc.), the device is in a static state (acceleration <0.1g), and the system uses a longer refresh cycle of 500ms, mainly to cope with the slow changes in natural light. In the scenario where the owner holds the code to pay, the device is in a slow motion state (acceleration 0.1-0.5g) because the user may be standing unsteadily or shaking slightly due to the cold weather, and the system uses a medium refresh cycle of 200ms. In windy or rainy weather scenarios, users tend to complete payment operations quickly, and the device moves violently (acceleration>0.5g). The system enables a fast refresh cycle of 100ms and frequently adjusts the fill light parameters to combat the effects of bad weather. For example, when encountering rainy weather, the user may hold an umbrella in one hand and scan the code with the other hand, causing the device to shake violently. At this time, the system will automatically switch to fast refresh mode to ensure that the parking code can still be accurately recognized even in an unstable state.

[0102] S640. Determine the maximum output power limit of the LED based on the refresh period and the battery power level.

[0103] In this embodiment, the battery power level refers to the percentage of the remaining current battery power; the maximum output power limit of the LED is used to control the highest power output of the LED to prevent the system from consuming excessive power.

[0104] Specifically, in the battery-powered auxiliary lighting device, this embodiment establishes a power management strategy table and dynamically adjusts the power upper limit according to the battery state. When the power drops to 25%, the system limits the maximum output power of the LED to 60% of the rated power and preferentially uses a supplementary lighting scheme with lower energy consumption. At the same time, the system appropriately extends the refresh period to further save power by reducing the supplementary lighting frequency.

[0105] It should be understood that the magnitudes of the sequence numbers of the steps in the above embodiments do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic and should not constitute any limitation to the implementation process of the embodiments of the present application.

[0106] In a second aspect, the present application provides an intelligent spectral tuning code scanning auxiliary lighting system. The intelligent spectral tuning code scanning auxiliary lighting system of the present application will be described below in combination with the above intelligent spectral tuning code scanning auxiliary lighting method.

[0107] Referring to Figure 7 , an intelligent spectral tuning code scanning auxiliary lighting system includes: An ambient light parameter data acquisition module, configured to monitor the ambient light intensity, color temperature, and light incident angle in real time to obtain ambient light parameter data; A spatial position parameter data acquisition module, configured to detect the distance and angular relationship between the two-dimensional code and the device to obtain spatial position parameter data; A lighting environment analysis module, configured to perform lighting environment analysis based on the ambient light parameter data and the spatial position parameter data according to a preset ambient perception algorithm to determine the lighting compensation strategy and light source configuration parameters for the two-dimensional code scanning area; A primary lighting compensation module, configured to control the RGBW LED array to output a corresponding spectral combination based on the light source configuration parameters to perform lighting compensation on the two-dimensional code scanning area to obtain a scanned environment after primary compensation; A scanning quality evaluation module, configured to detect the clarity and contrast of the two-dimensional code in the scanned environment after primary compensation in real time to obtain a scanning quality evaluation result; A compensation dynamic adjustment module, configured to dynamically adjust the lighting compensation strategy according to the scanning quality evaluation result and optimize the light source configuration parameters in real time until the preset scanning quality threshold requirement is met, and obtain a finally optimized two-dimensional code scanning environment.

[0108] In one embodiment, the present application provides an electronic device, which may be a server, and its internal structure diagram may be as shown in Figure 8 . The electronic device includes a processor, a memory, and a network interface connected through a system bus. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the electronic device is used to store data. The network interface of the electronic device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, it implements an intelligent spectral tuning barcode scanning assisted lighting method.

[0109] Those skilled in the art can understand that Figure 8 the structure shown in is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0110] In one embodiment, an electronic device is further provided, including a memory and a processor. A computer program is stored in the memory, and when the processor executes the computer program, the steps in the above method embodiments are implemented.

[0111] Those of ordinary skill in the art can understand that all or part of the processes of implementing the above method embodiments can be completed by instructing relevant hardware through a computer program. The above computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it may include the processes of the above method embodiments. Among them, any reference to a memory, storage, database, or other medium used in the various embodiments provided by the present application may include at least one of non-volatile and volatile memories. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0112] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereby. Therefore, all equivalent changes made according to the structure, shape, and principle of the present application shall be covered within the protection scope of the present application.

Claims

1. An intelligent spectral tuning and code scanning assisted lighting method, characterized in that, The method includes the following steps: Monitor the environmental light intensity, color temperature, and light incident angle in real time to obtain environmental light parameter data; Detect the distance and angular relationship between the QR code and the device to obtain spatial position parameter data; Based on the environmental light parameter data and the spatial position parameter data, perform a lighting environment analysis to determine the lighting compensation strategy and light source configuration parameters for the QR code scanning area; Based on the light source configuration parameters, control the RGBW LED array to output the corresponding spectral combination to perform lighting compensation on the QR code scanning area, obtaining a scanned environment after initial compensation; Detect the clarity and contrast of the QR code in the scanned environment after initial compensation in real time to obtain a scanning quality evaluation result; Based on the scanning quality evaluation result, dynamically adjust the lighting compensation strategy and optimize the light source configuration parameters in real time until the preset scanning quality threshold requirement is met, obtaining a finally optimized QR code scanning environment.

2. The intelligent spectral tuning code scanning assisted lighting method according to claim 1, wherein Based on the environmental light parameter data and the spatial position parameter data, perform a lighting environment analysis, which specifically includes the following steps: Based on the environmental light intensity and color temperature data, determine the current scene type to obtain the corresponding preset fill light mode parameters; Based on the preset fill light mode parameters and the distance and angular relationship between the QR code and the device, calculate the required basic fill light intensity value; Based on the basic fill light intensity value and the environmental light incident angle, determine the output power coefficient and projection angle parameters of each color LED; Based on the output power coefficient and projection angle parameters, calculate the initial working parameters of the RGBW LED array to obtain the brightness values and turn-on combinations of each color LED.

3. The intelligent spectral tuning code scanning assisted lighting method according to claim 1, wherein The method further includes the following steps: Detect the change rate of the environmental light intensity to obtain a lighting mutation state parameter; Based on the lighting mutation state parameter, calculate the adjustment rate and amplitude of the fill light response to obtain a fast fill light adjustment parameter; Record the successful scanning environment parameters and the corresponding light source configuration parameters in the recent period of time to establish a parameter optimization comparison table; Based on the parameter optimization comparison table, determine the light source configuration parameter combination of the most recent successful scene; Based on the light source configuration parameter combination and the current scanning success rate, calculate the dynamic switching period of the lighting compensation strategy to obtain the fill light parameter update frequency.

4. The intelligent spectral tuning code scanning assisted lighting method according to claim 1, wherein Dynamically adjust the lighting compensation strategy according to the scanning quality evaluation result, which specifically includes the following steps: Collect QR code image data, calculate the overall brightness value and contrast value to obtain image quality parameters; Based on the comparison between the image quality parameters and the preset minimum recognition threshold, determine the fill light adjustment requirement; Based on the fill light adjustment requirement, calculate the output power compensation value of the white LED; Based on the output power compensation value and the environmental color temperature parameters, determine the output ratio coefficient of the RGB LED to obtain the final fill light parameters.

5. The intelligent spectral tuning code scanning assisted lighting method according to claim 4, wherein, Dynamically adjusting the lighting compensation strategy according to the scanning quality evaluation result further includes the following steps: According to the system response characteristics, calculate the minimum step value of the fill light adjustment to obtain an adjustment accuracy parameter; Based on the adjustment accuracy parameter and the environmental light change rate, determine the sensitivity coefficient of the fill light response; Based on the sensitivity coefficient and the number of consecutive scanning failures, calculate the adjustment step value of the fill light parameters. Obtain an optimized supplementary lighting parameter combination based on the adjusted step value and historical success records.

6. The intelligent spectral tuning code scanning assisted lighting method according to claim 5, wherein, The method further includes the following steps: Calculate the energy consumption values of each LED combination scheme according to the ambient light conditions to obtain the optimal combination scheme; Determine the LED dynamic power control parameters based on the optimal combination scheme and the scanning state; Calculate the system refresh period according to the power control parameters and the device motion state; Determine the maximum output power limit of the LED based on the refresh period and the battery power level.

7. An intelligent spectral tuning code scanning assisted lighting system, characterized in that, Include: An ambient light parameter data acquisition module, configured to monitor the ambient light intensity, color temperature, and light incident angle in real time to obtain ambient light parameter data; A spatial position parameter data acquisition module, configured to detect the distance and angle relationship between the two-dimensional code and the device to obtain spatial position parameter data; A lighting environment analysis module, configured to perform lighting environment analysis based on the ambient light parameter data and the spatial position parameter data according to a preset ambient perception algorithm to determine the lighting compensation strategy and light source configuration parameters for the two-dimensional code scanning area; A primary lighting compensation module, configured to control the RGBW LED array to output a corresponding spectral combination based on the light source configuration parameters to perform lighting compensation on the two-dimensional code scanning area to obtain a scanned environment after primary compensation; A scanning quality evaluation module, configured to detect the clarity and contrast of the two-dimensional code in the scanned environment after primary compensation in real time to obtain a scanning quality evaluation result; A compensation dynamic adjustment module, configured to dynamically adjust the lighting compensation strategy according to the scanning quality evaluation result, and optimize the light source configuration parameters in real time until the preset scanning quality threshold requirement is met, and obtain a finally optimized two-dimensional code scanning environment.

8. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the intelligent spectral tuning code scanning assisted lighting method according to any one of claims 1-6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the intelligent spectral tuning code scanning assisted lighting method according to any one of claims 1-6.

Citation Information

Cited By

  • Five-channel LED dimming method and system based on gray level distribution

    CN120529451A

  • Two-dimensional code intelligent scanning method and system based on multi-mode perception

    CN121009909A

  • Variable two-dimensional code printing control method

    CN121448015A

  • Low-power-consumption self-adaptive code scanning method and device and storage medium

    CN121480537A

  • A low-power adaptive barcode scanning method, device, and storage medium

    CN121480537B