Method and system for processing and transmitting color temperature data of optical sensor and medium

By acquiring and processing light intensity and color temperature data, the problem of traditional light sensors being unable to provide color temperature information has been solved, enabling the device to achieve advanced environmental perception and adaptive capabilities under complex lighting conditions.

CN121723079APending Publication Date: 2026-03-24SHENZHEN JOYAR TECH (GRP) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511864882.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-11
Publication Date
2026-03-24

AI Technical Summary

Technical Problem

Traditional light sensors only output light intensity values ​​and cannot provide color temperature information, which limits the application of automatic color temperature adjustment, color reproduction and environmental perception optimization, resulting in poor device adaptability under complex lighting conditions.

Method used

The SPC module acquires light intensity and real-time color temperature data, which are then preprocessed and transmitted to the HAL module for parsing. This data is then combined with upper-layer application feature data for analysis, enabling unified processing and transmission of multi-channel light sensing data.

Benefits of technology

It improves the device's environmental awareness and adaptability, supports automatic color temperature adjustment and color reproduction, and enhances its adaptability under complex lighting conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121723079A_ABST
    Figure CN121723079A_ABST
Patent Text Reader

Abstract

The invention provides a light sensor color temperature data processing and transmission method and system and a medium. The method comprises the steps of obtaining light intensity record data and real-time color temperature data through an SPC module, performing preprocessing to obtain standard color temperature perception record data, transmitting the standard color temperature perception record data to an HAL module through a Kernel module, performing data receiving and data analysis processing to obtain a light intensity standard value and color temperature component standard data, and according to scene application feature data of an upper layer application, obtaining a color temperature component standard value; analyzing and processing by combining the light intensity standard value and the color temperature component standard data to obtain a corresponding scene adjustment strategy; according to the application, the light intensity record data and the real-time color temperature data are acquired at the same time, and the three layers of complete transmission links are adapted to the upper application, so that the environment perception and adaptive capability is improved, and the processing and transmission of the color temperature data of the light sensor are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of optical sensor data processing technology, and more specifically, to a method, system, and medium for processing and transmitting color temperature data from an optical sensor. Background Technology

[0002] In mobile devices or embedded systems, light sensors are used to detect ambient light intensity. Traditional technologies typically output only a single light intensity value, such as the LUX value. For example, in the MTK platform, the default SENSOR_TYPE_LIGHT only transmits one light sensor data, which cannot provide multi-channel light information related to color temperature, nor can it obtain ambient color temperature information. This limits its application in scenarios such as automatic color temperature adjustment, color reproduction, and eye protection mode. It also cannot distinguish different spectral components, such as R, G, and B components, resulting in poor device adaptability under complex lighting conditions. Furthermore, upper-layer applications cannot perform advanced image processing or environmental perception optimization based on multispectral data. Therefore, a new method for processing and transmitting light sensor color temperature data is urgently needed.

[0003] Effective technical solutions are urgently needed to address the above problems. Summary of the Invention

[0004] The purpose of this application is to provide a method, system, and medium for processing and transmitting color temperature data from a light sensor. By simultaneously acquiring light intensity recording data and real-time color temperature data, and adapting to upper-layer applications through a three-layer complete transmission link, the system can improve environmental perception and adaptive capabilities, thereby realizing the processing and transmission of color temperature data from a light sensor.

[0005] In a first aspect, this application provides a method for processing and transmitting color temperature data from a light sensor, including the following steps: The light intensity recording data and real-time color temperature data are acquired through the SPC module and preprocessed to obtain standard color temperature perception recording data. The standard color temperature sensing and recording data is transmitted to the HAL module via the Kernel module; The HAL module is used to receive and parse data to obtain standard values ​​of light intensity and standard data of color temperature components. The application scenario feature data of the upper layer application is obtained and analyzed in combination with the standard values ​​of light intensity and color temperature components to obtain the corresponding scenario adjustment strategy.

[0006] Optionally, in the method for processing and transmitting color temperature data of a light sensor described in this application, the step of acquiring light intensity recording data and real-time color temperature data through an SPC module and performing preprocessing to obtain standard color temperature sensing recording data includes: Light intensity recording data and real-time color temperature data are obtained through the SPC module. The real-time color temperature data includes R channel color temperature component data, G channel color temperature component data and B channel color temperature component data. The light intensity recording data, R-channel color temperature component data, G-channel color temperature component data, and B-channel color temperature component data are preprocessed by data verification and format conversion to obtain standard color temperature perception recording data.

[0007] Optionally, in the method for processing and transmitting color temperature data of the optical sensor described in this application, before transmitting the standard color temperature sensing and recording data to the HAL module via the Kernel module, the method further includes: The first data check bit of the standard color temperature perception recording data is read through the Kernel module; If the verification fails, an early warning response will be output; If the verification is successful, the data sequence number of the standard color temperature perception record data is obtained and queried; If the data sequence number already exists, an early warning response is output; if the data sequence number does not exist, normal reception is performed, and the second data check bit is obtained through analysis. The first data check bit is compared with the second data check bit. If they are the same, the standard color temperature sensing record data is transmitted to the HAL module; otherwise, an early warning response is output.

[0008] Optionally, in the method for processing and transmitting color temperature data of a light sensor described in this application, the step of receiving and parsing data through a HAL module to obtain standard values ​​of light intensity and standard data of color temperature components includes: The HAL module receives data and performs data separation and extraction processing to obtain standard values ​​of light intensity and standard data of color temperature components. The color temperature component standard data includes R channel color temperature component standard data, G channel color temperature component standard data and B channel color temperature component standard data.

[0009] Optionally, in the method for processing and transmitting color temperature data of the optical sensor described in this application, the step of acquiring scene application feature data of the upper-layer application and analyzing and processing it in conjunction with the standard value of light intensity and the standard data of color temperature components to obtain the corresponding scene adjustment strategy includes: Obtain scenario application feature data from upper-layer applications, including automatic color temperature adjustment feature data or color reproduction feature data; The corresponding scene adjustment strategy is obtained by analyzing and processing the automatic color temperature adjustment feature data or color reproduction feature data in combination with the light intensity standard value and color temperature component standard data.

[0010] Optionally, in the method for processing and transmitting color temperature data of the light sensor described in this application, the step of analyzing and processing the automatic color temperature adjustment feature data or color reproduction feature data in conjunction with the light intensity standard value and color temperature component standard data to obtain a corresponding scene adjustment strategy includes: If the data is for automatic color temperature adjustment, the standard data of the R channel color temperature component, the standard data of the G channel color temperature component, and the standard data of the B channel color temperature component are normalized and analyzed to obtain the absolute color temperature data of the environment. By mapping and analyzing the absolute color temperature data of the environment with the preset target color temperature data of the screen, an automatic color temperature adjustment strategy is obtained. If it is color reproduction feature data, then the standard data of the G channel color temperature component is compared with the standard data of the R channel color temperature component and the standard data of the B channel color temperature component to obtain the GR channel color temperature ratio and GB channel color temperature ratio. The color temperature ratios of the GR channel and GB channel are compared with preset channel color temperature thresholds, and a color reproduction adjustment strategy is obtained based on the threshold comparison results.

[0011] Secondly, this application provides a system for processing and transmitting color temperature data from a light sensor, the system comprising: The SPC module includes a transceiver unit and a translate unit. The transceiver unit is used to receive light intensity recording data and real-time color temperature data collected by the light sensor, and the translate unit is used to perform data preprocessing on the light intensity recording data and real-time color temperature data. The Kernel module is used to transmit standard color temperature sensing and recording data to the HAL module. The HAL module is used to perform data parsing and processing on standard color temperature sensing and recording data.

[0012] Optionally, in the light sensor color temperature data processing and transmission system described in the application, the system further includes: a memory and a processor, wherein the memory includes a program for a light sensor color temperature data processing and transmission method, and when the program for the light sensor color temperature data processing and transmission method is executed by the processor, it implements the following steps: The light intensity recording data and real-time color temperature data are acquired through the SPC module and preprocessed to obtain standard color temperature perception recording data. The standard color temperature sensing and recording data is transmitted to the HAL module via the Kernel module; The HAL module is used to receive and parse data to obtain standard values ​​of light intensity and standard data of color temperature components. The application scenario feature data of the upper layer application is obtained and analyzed in combination with the standard values ​​of light intensity and color temperature components to obtain the corresponding scenario adjustment strategy.

[0013] Optionally, in the light sensor color temperature data processing and transmission system described in this application, the step of acquiring light intensity recording data and real-time color temperature data through the SPC module and performing preprocessing to obtain standard color temperature sensing recording data includes: Light intensity recording data and real-time color temperature data are obtained through the SPC module. The real-time color temperature data includes R channel color temperature component data, G channel color temperature component data and B channel color temperature component data. The light intensity recording data, R-channel color temperature component data, G-channel color temperature component data, and B-channel color temperature component data are preprocessed by data verification and format conversion to obtain standard color temperature perception recording data.

[0014] Thirdly, this application also provides a computer-readable storage medium storing a method program for processing and transmitting color temperature data of a light sensor. When the method program for processing and transmitting color temperature data of a light sensor is executed by a processor, it implements the steps of the method for processing and transmitting color temperature data of a light sensor as described in any of the above claims.

[0015] As can be seen from the above, the method, system and medium for processing and transmitting color temperature data of a light sensor provided in this application improve the environmental perception and adaptive capabilities by simultaneously acquiring light intensity recording data and real-time color temperature data, and adapting to upper-layer applications through a three-layer complete transmission link, thereby realizing the processing and transmission of color temperature data of a light sensor.

[0016] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description or may be learned by practicing embodiments of this application. The objectives and other advantages of this application may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings. Attached Figure Description

[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments of this application will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0018] Figure 1 A flowchart illustrating a method for processing and transmitting color temperature data from a light sensor, provided in an embodiment of this application; Figure 2A high-level flowchart of a method for processing and transmitting color temperature data of a light sensor provided in an embodiment of this application; Figure 3 This is a system flowchart of a light sensor color temperature data processing and transmission system provided in an embodiment of this application. Detailed Implementation

[0019] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0020] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, the terms "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0021] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a method for processing and transmitting color temperature data from a light sensor, as described in some embodiments of this application. This method is used in terminal devices, such as computers and mobile phones. The method includes the following steps: S11. Obtain light intensity recording data and real-time color temperature data through the SPC module, and perform preprocessing to obtain standard color temperature perception recording data; S12. The standard color temperature sensing and recording data is transmitted to the HAL module via the Kernel module; S13. Data reception and parsing are performed through the HAL module to obtain standard values ​​of light intensity and standard data of color temperature components. S14. Obtain the scene application feature data of the upper layer application, and analyze and process it in combination with the light intensity standard value and color temperature component standard data to obtain the corresponding scene adjustment strategy.

[0022] It should be noted that a mechanism for acquiring and transmitting R, G, and B three-channel color temperature data has been added to the light sensor data stream. Through the complete data transmission path from the SCP module to the HAL module, unified processing and reporting of multi-channel light sensing data can be achieved. Upper-layer applications can acquire color temperature data synchronously without changing the original light sensing monitoring interface, thereby improving environmental perception and adaptive capabilities.

[0023] According to an embodiment of the present invention, the step of acquiring light intensity recording data and real-time color temperature data through an SPC module, and performing preprocessing to obtain standard color temperature perception recording data includes: Light intensity recording data and real-time color temperature data are obtained through the SPC module. The real-time color temperature data includes R channel color temperature component data, G channel color temperature component data and B channel color temperature component data. The light intensity recording data, R-channel color temperature component data, G-channel color temperature component data, and B-channel color temperature component data are preprocessed by data verification and format conversion to obtain standard color temperature perception recording data.

[0024] It should be noted that the raw data is acquired through the transceiver unit of the SPC module, and then the data is verified and converted through the translate unit. The light intensity is unified to LUX units to resolve the differences in the raw outputs of different sensors, such as ADC values ​​and millilux. The R-channel color temperature component data, G-channel color temperature component data, and B-channel color temperature component data are converted into standard values ​​of 0-255 to resolve the differences in the raw outputs of different sensors, which are voltage values, percentages, or hexadecimal values, thereby obtaining standard color temperature sensing and recording data.

[0025] According to an embodiment of the present invention, the step of transmitting the standard color temperature sensing recording data to the HAL module via the Kernel module further includes: The first data check bit of the standard color temperature perception recording data is read through the Kernel module; If the verification fails, an early warning response will be output; If the verification is successful, the data sequence number of the standard color temperature perception record data is obtained and queried; If the data sequence number already exists, an early warning response is output; if the data sequence number does not exist, normal reception is performed, and the second data check bit is obtained through analysis. The first data check bit is compared with the second data check bit. If they are the same, the standard color temperature sensing record data is transmitted to the HAL module; otherwise, an early warning response is output.

[0026] It should be noted that, in order to ensure the accuracy and integrity of data transmission, before transmission after receiving, the first data check bit is obtained, which is a 16-bit digital fingerprint generated for the data by an algorithm, and is verified to ensure that the data has not been tampered with. After the verification is passed, the data sequence number is obtained to check whether it already exists, so as to avoid receiving the same data packet. The data sequence number is the sequence number added to each data during the standardization process. Before transmitting the data to the HAL module, the second data check bit of the data packet is recalculated and compared with the first data check bit to ensure that it has not been tampered with during storage.

[0027] According to an embodiment of the present invention, the step of receiving and parsing data through a HAL module to obtain standard values ​​of light intensity and standard data of color temperature components includes: The HAL module receives data and performs data separation and extraction processing to obtain standard values ​​of light intensity and standard data of color temperature components. The color temperature component standard data includes R channel color temperature component standard data, G channel color temperature component standard data and B channel color temperature component standard data.

[0028] It should be noted that the received data is analyzed to determine the light intensity and three-channel color temperature, and then encapsulated into a format that can be directly called by upper-layer applications.

[0029] According to an embodiment of the present invention, the step of obtaining scene application feature data of the upper-layer application and analyzing and processing it in conjunction with the light intensity standard value and color temperature component standard data to obtain the corresponding scene adjustment strategy includes: Obtain scenario application feature data from upper-layer applications, including automatic color temperature adjustment feature data or color reproduction feature data; The corresponding scene adjustment strategy is obtained by analyzing and processing the automatic color temperature adjustment feature data or color reproduction feature data in combination with the light intensity standard value and color temperature component standard data.

[0030] It should be noted that different scene adjustment strategies are matched for different application scenarios, and automatic color temperature adjustment feature data or color reproduction feature data are represented by different identifiers.

[0031] According to an embodiment of the present invention, the step of analyzing and processing the automatic color temperature adjustment feature data or color reproduction feature data in conjunction with the light intensity standard value and color temperature component standard data to obtain a corresponding scene adjustment strategy includes: If the data is for automatic color temperature adjustment, the standard data of the R channel color temperature component, the standard data of the G channel color temperature component, and the standard data of the B channel color temperature component are normalized and analyzed to obtain the absolute color temperature data of the environment. By mapping and analyzing the absolute color temperature data of the environment with the preset target color temperature data of the screen, an automatic color temperature adjustment strategy is obtained. If it is color reproduction feature data, then the standard data of the G channel color temperature component is compared with the standard data of the R channel color temperature component and the standard data of the B channel color temperature component to obtain the GR channel color temperature ratio and GB channel color temperature ratio. The color temperature ratios of the GR channel and GB channel are compared with preset channel color temperature thresholds, and a color reproduction adjustment strategy is obtained based on the threshold comparison results.

[0032] It should be noted that for automatic color temperature adjustment scenarios, firstly, the standard data of the R-channel, G-channel, and B-channel color temperature components are normalized. Then, based on the ratio of the R-channel to G-channel color temperature components and the ratio of the G-channel to B-channel color temperature components, threshold comparisons are performed to determine whether it is warm light, cool light, or neutral light. Finally, the absolute color temperature of the environment is determined using a preset RGB-to-color temperature formula. The preset RGB-to-color temperature formula for warm light is 2000 + (1 - r n The formula for converting RGB to color temperature for cool light presets is 5500 + b × 2500. n ×4500, the neutral light preset RGB to color temperature formula is 4500+[g n -(r n +b n [(2) / 2]×1000, r n b n g n These are the normalized values ​​for the standard data of the R channel color temperature component, the B channel color temperature component, and the G channel color temperature component, respectively. Table 1 shows an example of the mapping rules between ambient absolute color temperature data and preset screen target color temperature data. Table 1

[0033] This mapping rule example can be dynamically configured; For color reproduction scenarios, first, determine the color temperature ratios of the GR channel and GB channel. The GR channel color temperature ratio is the ratio of the standard data of the G channel color temperature component to the standard data of the R channel color temperature component, and the GB channel color temperature ratio is the ratio of the standard data of the G channel color temperature component to the standard data of the B channel color temperature component. Then, compare these ratios with the corresponding thresholds to determine the color reproduction adjustment strategy, i.e., perform white balance gain. For example, for ideal neutral white, R:G:B is 1:1:1. If the standard data of the R channel color temperature component is 200, the standard data of the G channel color temperature component is 180, and the standard data of the B channel color temperature component is 150, then the GR channel color temperature ratio is 0.9, the GB channel color temperature ratio is 1.2, the preset channel color temperature threshold is 1, and the corresponding color reproduction adjustment strategy is to increase the brightness of the B channel and decrease the brightness of the R channel.

[0034] Please refer to Figure 2 , Figure 2 This is a high-level flowchart of a method for processing and transmitting color temperature data of a light sensor, as described in some embodiments of this application.

[0035] Please refer to Figure 3 , Figure 3 This is a system diagram of a light sensor color temperature data processing and transmission system according to some embodiments of this application.

[0036] Secondly, the present invention also discloses a system 3 for processing and transmitting color temperature data from a light sensor, comprising: SPC module 31 includes a transceiver unit 311 and a translate unit 312. The transceiver unit is used to receive light intensity recording data and real-time color temperature data collected by the light sensor, and the translate unit is used to perform data preprocessing on the light intensity recording data and real-time color temperature data. Kernel module 32 is used to transmit standard color temperature sensing and recording data to the HAL module; HAL module 33 is used for data parsing and processing of standard color temperature perception recording data.

[0037] It should be noted that the unified processing and transmission of multi-channel optical sensing data is achieved through the complete data transmission path of the SCP module, Kernel module, and HAL module.

[0038] According to an embodiment of the present invention, the system for processing and transmitting color temperature data of a light sensor further includes a memory and a processor. The memory includes a program for processing and transmitting color temperature data of a light sensor. When the program for processing and transmitting color temperature data of a light sensor is executed by the processor, it performs the following steps: The light intensity recording data and real-time color temperature data are acquired through the SPC module and preprocessed to obtain standard color temperature perception recording data. The standard color temperature sensing and recording data is transmitted to the HAL module via the Kernel module; The HAL module is used to receive and parse data to obtain standard values ​​of light intensity and standard data of color temperature components. The application scenario feature data of the upper layer application is obtained and analyzed in combination with the standard values ​​of light intensity and color temperature components to obtain the corresponding scenario adjustment strategy.

[0039] It should be noted that a mechanism for acquiring and transmitting R, G, and B three-channel color temperature data has been added to the light sensor data stream. Through the complete data transmission path from the SCP module to the HAL module, unified processing and reporting of multi-channel light sensing data can be achieved. Upper-layer applications can acquire color temperature data synchronously without changing the original light sensing monitoring interface, thereby improving environmental perception and adaptive capabilities.

[0040] According to an embodiment of the present invention, the step of acquiring light intensity recording data and real-time color temperature data through an SPC module, and performing preprocessing to obtain standard color temperature perception recording data includes: Light intensity recording data and real-time color temperature data are obtained through the SPC module. The real-time color temperature data includes R channel color temperature component data, G channel color temperature component data and B channel color temperature component data. The light intensity recording data, R-channel color temperature component data, G-channel color temperature component data, and B-channel color temperature component data are preprocessed by data verification and format conversion to obtain standard color temperature perception recording data.

[0041] It should be noted that the raw data is acquired through the transceiver unit of the SPC module, and then the data is verified and converted through the translate unit. The light intensity is unified to LUX units to resolve the differences in the raw outputs of different sensors, such as ADC values ​​and millilux. The R-channel color temperature component data, G-channel color temperature component data, and B-channel color temperature component data are converted into standard values ​​of 0-255 to resolve the differences in the raw outputs of different sensors, which are voltage values, percentages, or hexadecimal values, thereby obtaining standard color temperature sensing and recording data.

[0042] According to an embodiment of the present invention, the step of transmitting the standard color temperature sensing recording data to the HAL module via the Kernel module further includes: The first data check bit of the standard color temperature perception recording data is read through the Kernel module; If the verification fails, an early warning response will be output; If the verification is successful, the data sequence number of the standard color temperature perception record data is obtained and queried; If the data sequence number already exists, an early warning response is output; if the data sequence number does not exist, normal reception is performed, and the second data check bit is obtained through analysis. The first data check bit is compared with the second data check bit. If they are the same, the standard color temperature sensing record data is transmitted to the HAL module; otherwise, an early warning response is output.

[0043] It should be noted that, in order to ensure the accuracy and integrity of data transmission, before transmission after receiving, the first data check bit is obtained, which is a 16-bit digital fingerprint generated for the data by an algorithm, and is verified to ensure that the data has not been tampered with. After the verification is passed, the data sequence number is obtained to check whether it already exists, so as to avoid receiving the same data packet. The data sequence number is the sequence number added to each data during the standardization process. Before transmitting the data to the HAL module, the second data check bit of the data packet is recalculated and compared with the first data check bit to ensure that it has not been tampered with during storage.

[0044] According to an embodiment of the present invention, the step of receiving and parsing data through a HAL module to obtain standard values ​​of light intensity and standard data of color temperature components includes: The HAL module receives data and performs data separation and extraction processing to obtain standard values ​​of light intensity and standard data of color temperature components. The color temperature component standard data includes R channel color temperature component standard data, G channel color temperature component standard data and B channel color temperature component standard data.

[0045] It should be noted that the received data is analyzed to determine the light intensity and three-channel color temperature, and then encapsulated into a format that can be directly called by upper-layer applications.

[0046] According to an embodiment of the present invention, the step of obtaining scene application feature data of the upper-layer application and analyzing and processing it in conjunction with the light intensity standard value and color temperature component standard data to obtain the corresponding scene adjustment strategy includes: Obtain scenario application feature data from upper-layer applications, including automatic color temperature adjustment feature data or color reproduction feature data; The corresponding scene adjustment strategy is obtained by analyzing and processing the automatic color temperature adjustment feature data or color reproduction feature data in combination with the light intensity standard value and color temperature component standard data.

[0047] It should be noted that different scene adjustment strategies are matched for different application scenarios, and automatic color temperature adjustment feature data or color reproduction feature data are represented by different identifiers.

[0048] According to an embodiment of the present invention, the step of analyzing and processing the automatic color temperature adjustment feature data or color reproduction feature data in conjunction with the light intensity standard value and color temperature component standard data to obtain a corresponding scene adjustment strategy includes: If the data is for automatic color temperature adjustment, the standard data of the R channel color temperature component, the standard data of the G channel color temperature component, and the standard data of the B channel color temperature component are normalized and analyzed to obtain the absolute color temperature data of the environment. By mapping and analyzing the absolute color temperature data of the environment with the preset target color temperature data of the screen, an automatic color temperature adjustment strategy is obtained. If it is color reproduction feature data, then the standard data of the G channel color temperature component is compared with the standard data of the R channel color temperature component and the standard data of the B channel color temperature component to obtain the GR channel color temperature ratio and GB channel color temperature ratio. The color temperature ratios of the GR channel and GB channel are compared with preset channel color temperature thresholds, and a color reproduction adjustment strategy is obtained based on the threshold comparison results.

[0049] It should be noted that for automatic color temperature adjustment scenarios, firstly, the standard data of the R-channel, G-channel, and B-channel color temperature components are normalized. Then, based on the ratio of the R-channel to G-channel color temperature components and the ratio of the G-channel to B-channel color temperature components, threshold comparisons are performed to determine whether it is warm light, cool light, or neutral light. Finally, the absolute color temperature of the environment is determined using a preset RGB-to-color temperature formula. The preset RGB-to-color temperature formula for warm light is 2000 + (1 - r n The formula for converting RGB to color temperature for cool light presets is 5500 + b × 2500. n ×4500, the neutral light preset RGB to color temperature formula is 4500+[g n -(r n +b n [(2) / 2]×1000, r n b n g n These are the normalized values ​​of the standard data of the R channel color temperature component, the standard data of the B channel color temperature component, and the standard data of the G channel color temperature component, respectively. An example of the mapping rule between the ambient absolute color temperature data and the preset screen target color temperature data is shown in Table 1. This mapping rule example can be dynamically configured. For color reproduction scenarios, first, determine the color temperature ratios of the GR channel and GB channel. The GR channel color temperature ratio is the ratio of the standard data of the G channel color temperature component to the standard data of the R channel color temperature component, and the GB channel color temperature ratio is the ratio of the standard data of the G channel color temperature component to the standard data of the B channel color temperature component. Then, compare these ratios with the corresponding thresholds to determine the color reproduction adjustment strategy, i.e., perform white balance gain. For example, for ideal neutral white, R:G:B is 1:1:1. If the standard data of the R channel color temperature component is 200, the standard data of the G channel color temperature component is 180, and the standard data of the B channel color temperature component is 150, then the GR channel color temperature ratio is 0.9, the GB channel color temperature ratio is 1.2, the preset channel color temperature threshold is 1, and the corresponding color reproduction adjustment strategy is to increase the brightness of the B channel and decrease the brightness of the R channel.

[0050] A third aspect of the present invention provides a readable storage medium storing a method program for processing and transmitting color temperature data of a light sensor. When the method program for processing and transmitting color temperature data of a light sensor is executed by a processor, it implements the steps of the method for processing and transmitting color temperature data of a light sensor as described in any of the preceding claims.

[0051] This invention discloses a method, system, and medium for processing and transmitting color temperature data from a light sensor. By simultaneously acquiring light intensity recording data and real-time color temperature data, and adapting a three-layer complete transmission link to upper-layer applications, it improves environmental perception and adaptive capabilities, thereby realizing the processing and transmission of color temperature data from a light sensor.

[0052] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0053] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units. They may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0054] In addition, in the various embodiments of the present invention, each functional unit can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0055] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0056] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.

Claims

1. A method for processing and transmitting color temperature data of a light sensor, characterized in that, The method comprises the following steps: obtaining light intensity record data and real-time color temperature data through an SPC module, and performing preprocessing to obtain standard color temperature perception record data; transmitting the standard color temperature perception record data to a HAL module through a Kernel module; performing data receiving and data analysis processing through the HAL module to obtain light intensity standard values and color temperature component standard data; obtaining scene application characteristic data of an upper-layer application, and performing analysis processing in combination with the light intensity standard values and the color temperature component standard data to obtain corresponding scene adjustment strategies.

2. The method of claim 1, wherein the color temperature data is transmitted to the display device in a form of a color temperature value. The step of obtaining light intensity record data and real-time color temperature data through an SPC module, and performing preprocessing to obtain standard color temperature perception record data comprises the following steps: obtaining light intensity record data and real-time color temperature data through an SPC module, wherein the real-time color temperature data comprises R-channel color temperature component data, G-channel color temperature component data and B-channel color temperature component data; performing data check and format conversion preprocessing on the light intensity record data, the R-channel color temperature component data, the G-channel color temperature component data and the B-channel color temperature component data to obtain standard color temperature perception record data.

3. The method of claim 1, wherein the color temperature data is transmitted to the display device in a form of a color temperature value. The step of transmitting the standard color temperature perception record data to a HAL module through a Kernel module further comprises the following steps: reading a first data check bit of the standard color temperature perception record data through a Kernel module; if the check fails, outputting a warning response; if the check succeeds, obtaining a data serial number of the standard color temperature perception record data, and performing query; if the data serial number already exists, outputting a warning response, and if the data serial number does not exist, normally receiving and analyzing to obtain a second data check bit; comparing the first data check bit with the second data check bit, if they are the same, transmitting the standard color temperature perception record data to a HAL module, otherwise, outputting a warning response.

4. The method of claim 3, wherein the color temperature data is transmitted to the display device in a form of a color temperature value. The step of performing data receiving and data analysis processing through a HAL module to obtain light intensity standard values and color temperature component standard data comprises the following steps: performing data receiving through a HAL module, and performing data separation and extraction processing to obtain light intensity standard values and color temperature component standard data; The color temperature component standard data comprises R-channel color temperature component standard data, G-channel color temperature component standard data and B-channel color temperature component standard data.

5. The method of claim 1, wherein the color temperature data is transmitted to the display device in a form of a color temperature value. The step of obtaining scene application characteristic data of an upper-layer application, and performing analysis processing in combination with the light intensity standard values and the color temperature component standard data to obtain corresponding scene adjustment strategies comprises the following steps: obtaining scene application characteristic data of an upper-layer application, wherein the scene application characteristic data comprises automatic color temperature adjustment characteristic data or color restoration characteristic data; performing analysis processing in combination with the light intensity standard values and the color temperature component standard data according to the automatic color temperature adjustment characteristic data or the color restoration characteristic data to obtain corresponding scene adjustment strategies.

6. The method of claim 5, wherein the color temperature data is transmitted to the display device. The step of performing analysis processing in combination with the light intensity standard values and the color temperature component standard data according to the automatic color temperature adjustment characteristic data or the color restoration characteristic data to obtain corresponding scene adjustment strategies comprises the following steps: If the automatic color temperature adjustment feature data, the R channel color temperature component standard data, the G channel color temperature component standard data and the B channel color temperature component standard data are normalized and analyzed to obtain the environmental absolute color temperature data; The environmental absolute color temperature data is mapped and analyzed with the preset screen target color temperature data to obtain the automatic color temperature adjustment strategy; If the color restoration feature data, the G channel color temperature component standard data is compared with the R channel color temperature component standard data and the B channel color temperature component standard data respectively to obtain the GR channel color temperature ratio and the GB channel color temperature ratio; The GR channel color temperature ratio and the GB channel color temperature ratio are compared with the preset channel color temperature threshold respectively, and the color restoration adjustment strategy is obtained according to the threshold comparison result.

7. A light sensor color temperature data processing and transmission system, which implements the light sensor color temperature data processing and transmission method according to claims 1-6, characterized in that, It comprises: The SPC module comprises a transceiver unit and a translate unit, wherein the transceiver unit is used to receive the light intensity record data and real-time color temperature data collected by the light sensor, and the translate unit is used to pre-process the light intensity record data and real-time color temperature data; The Kernel module is used to transmit the standard color temperature perception record data to the HAL module; The HAL module is used to analyze and process the standard color temperature perception record data.

8. A system for processing and transmitting color temperature data of a light sensor, characterized in that It also comprises a memory and a processor, wherein the memory comprises a program of the light sensor color temperature data processing and transmission method, and the program of the light sensor color temperature data processing and transmission method is executed by the processor to implement the following steps: The light intensity record data and real-time color temperature data are obtained by the SPC module and pre-processed to obtain the standard color temperature perception record data; The standard color temperature perception record data is transmitted to the HAL module by the Kernel module; The light intensity standard value and the color temperature component standard data are obtained by the HAL module through data receiving and data analysis processing; The scene application feature data of the upper layer application is obtained, and the light intensity standard value and the color temperature component standard data are analyzed to obtain the corresponding scene adjustment strategy.

9. The system for processing and transmitting color temperature data of a light sensor according to claim 8, characterized in that, The light intensity record data and real-time color temperature data are obtained by the SPC module and pre-processed to obtain the standard color temperature perception record data, comprising: The light intensity record data and real-time color temperature data are obtained by the SPC module, and the real-time color temperature data comprises R channel color temperature component data, G channel color temperature component data and B channel color temperature component data; The light intensity record data, R channel color temperature component data, G channel color temperature component data and B channel color temperature component data are data-verified and format-converted for pre-processing to obtain the standard color temperature perception record data.

10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores the program of the light sensor color temperature data processing and transmission method, and the program of the light sensor color temperature data processing and transmission method is executed by the processor to implement the steps of the light sensor color temperature data processing and transmission method according to any one of claims 1 to 6.