Temperature control method and system for intelligent glasses
By collecting and processing humidity and temperature data from smart glasses, the lens temperature is dynamically adjusted, solving the problems of insufficient fog removal speed and unstable visual clarity in existing technologies, and realizing real-time, dynamic adjustment of lens temperature and stable energy consumption.
Patent Information
- Application Number
- CN202610062425.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-18
- Publication Date
- 2026-02-24
AI Technical Summary
Existing smart glasses struggle to achieve real-time, dynamic adjustment of lens temperature in environments with varying temperatures and humidity, resulting in insufficient fog removal speed and poor visual clarity stability.
By collecting humidity and temperature values from smart glasses, outlier values are removed and formatted, the characteristics of humidity and temperature changes are extracted, fogging risk is assessed, and comprehensive calculations are performed in conjunction with historical environmental data to generate temperature adjustment commands, enabling real-time monitoring and cyclical adjustment of the lens surface condition.
It achieves precise control of lens temperature, improves fog removal speed, stabilizes visual clarity, and solves the problems of slow response and unstable energy consumption of traditional adjustment methods.
Smart Images

Figure CN121560100A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of temperature control technology, and in particular to a temperature control method and system for smart glasses. Background Technology
[0002] Currently, smart glasses are increasingly used in sports, outdoor work, navigation assistance and other scenarios. In environments with changing temperature and humidity, effective adjustment of lens temperature is of great significance for maintaining clear vision and improving wearing comfort. Frequent fluctuations in ambient humidity and different activity intensities of wearers place higher demands on the real-time performance and adaptability of temperature adjustment.
[0003] In existing technologies, temperature control in smart glasses typically relies on a heating element driven by a fixed power source or simple temperature-triggered switching logic. It uses basic data acquisition and control to read temperature and humidity data, and passively adjusts the temperature according to preset thresholds. However, existing technologies struggle to cope with rapid fluctuations in ambient temperature and humidity. Threshold-based adjustments cannot predict the risk of fogging in advance, potentially leading to heating delays or insufficient adjustment, resulting in temporary lens blurring. Furthermore, they cannot combine historical environmental data with the current state for comprehensive judgment, thus failing to dynamically adjust according to the wearer's actual usage scenario and achieving precise temperature control.
[0004] Therefore, existing technologies have problems in lens temperature regulation, such as insufficient speed of lens fogging elimination and poor stability of visual clarity due to difficulty in adapting to real-time environmental changes. Summary of the Invention
[0005] This invention provides a temperature control method and system for smart glasses to solve the problems of insufficient fogging elimination speed and poor visual clarity stability caused by the inability of existing technologies to adapt to real-time environmental changes.
[0006] In a first aspect, the present invention provides a temperature control method for smart glasses, comprising: The humidity and temperature values of the smart glasses are collected, and outlier values are removed and the data format is sorted to obtain an environmental dataset. Based on the environmental dataset, the variation features of the humidity and temperature values are extracted and classified to obtain dynamic correlation features; Based on the dynamic correlation features, environmental change trend data are extracted and fog risk is determined to obtain risk assessment results. Based on the risk assessment results, preset historical environmental data is extracted to supplement the environmental dataset, and the current temperature information is integrated to obtain the target temperature adjustment value; A temperature adjustment command is generated based on the target temperature adjustment value, and an adjustment response signal is obtained; Based on the adjustment response signal, the surface state of the lens is monitored and the dynamic correlation feature is updated to obtain the adjustment parameters for temperature control; Based on the aforementioned adjustment parameters, new environmental data is continuously collected and cyclically adjusted to obtain the final temperature control output.
[0007] In one optional implementation, the process of collecting humidity and temperature values from the smart glasses, removing outliers, and formatting the data to obtain an environmental dataset includes: Collect the current humidity and temperature values of the smart glasses and record the corresponding time markers to obtain the raw environmental data; The original environmental data is compared and verified according to the preset humidity threshold range and the preset temperature threshold range, and abnormal data is removed to obtain filtered environmental data. The filtered environment data is standardized in terms of units and fields to obtain formatted environment data; The formatted environment data is then subjected to integrity verification and structural integration to obtain the environment dataset.
[0008] In one optional implementation, the step of extracting and classifying the variation features of the humidity and temperature values based on the environmental dataset to obtain dynamic correlation features includes: Humidity and temperature data sequences are extracted from the environmental dataset to obtain environmental change data. The environmental change data is processed in chronological order and its numerical stationarity is verified to obtain a standardized change sequence. Humidity and temperature change features are extracted from the standardized change sequence to obtain a set of change features; The set of changing features is subjected to category judgment and correlation analysis to obtain dynamic correlation features.
[0009] In one optional implementation, the step of extracting environmental change trend data based on the dynamic correlation features and determining fog risk to obtain a risk assessment result includes: Based on the dynamic correlation features, humidity and temperature change trends are extracted to obtain environmental change trend data; The environmental change trend data is compared with the preset fog generation conditions to obtain fog triggering indicators; Based on the fog triggering indicators and the current environmental conditions, the risk level is determined to obtain fog risk data; The results of the fog risk data are summarized to obtain the risk assessment results.
[0010] In one optional implementation, the step of extracting preset historical environmental data to supplement the environmental dataset based on the risk assessment results and fusing it with current temperature information to obtain the target temperature adjustment value includes: Based on the risk assessment results, humidity and temperature records are extracted from preset historical environmental data to obtain supplementary environmental data; The supplementary environmental data is sequence-aligned and segment-filtered with the environmental dataset to obtain filtered environmental data. The environmental data selected is compared with the current temperature information to obtain environmental state parameters. The temperature deviation is calculated based on the environmental condition parameters to obtain the target temperature adjustment value.
[0011] In one optional implementation, the step of generating a temperature adjustment command based on the target temperature adjustment value and obtaining an adjustment response signal includes: Based on the target temperature adjustment value, the command generation parameters are extracted to obtain the command adjustment parameters; Logical operations and segment mappings are performed on the instruction adjustment parameters to obtain instruction configuration data; A temperature regulation instruction is constructed based on the instruction configuration data, the temperature regulation instruction is executed and execution feedback is obtained to obtain a regulation response signal.
[0012] In one optional implementation, the step of monitoring the lens surface state and updating the dynamic correlation feature based on the adjustment response signal to obtain the temperature control adjustment parameters includes: Based on the adjustment response signal, the clarity and humidity adhesion of the lens surface are monitored to obtain lens status data; The lens state data is combined with the dynamic correlation features to make a correlation judgment, and feature update data is obtained; The dynamic correlation features are updated based on the feature update data to obtain the temperature control adjustment parameters.
[0013] In one optional implementation, the step of continuously collecting new environmental data based on the adjustment parameters and performing cyclical adjustments to obtain the final temperature control output includes: Based on the aforementioned adjustment parameters, new humidity and temperature data are collected to obtain real-time environmental data; Based on the real-time environmental data and the adjustment parameters, a temperature adjustment judgment is made to obtain adjustment execution data; The temperature control result is updated based on the adjustment execution data to obtain the final temperature control output.
[0014] In a second aspect, the present invention provides a temperature control system for smart glasses, comprising: The environmental data acquisition module is used to collect humidity and temperature values from the smart glasses, remove outliers, and format the data to obtain an environmental dataset. The change feature extraction module is used to extract and classify the change features of the humidity value and the temperature value based on the environmental dataset to obtain dynamic correlation features; The trend risk assessment module is used to extract environmental change trend data based on the dynamic correlation features and assess fog risk to obtain risk assessment results. The supplementary data fusion module is used to extract preset historical environmental data to supplement the environmental dataset based on the risk assessment results, and fuse the current temperature information to obtain the target temperature adjustment value; The adjustment command generation module is used to generate a temperature adjustment command based on the target temperature adjustment value and obtain an adjustment response signal. The feature update module is used to monitor the surface state of the lens according to the adjustment response signal and update the dynamic correlation feature to obtain the adjustment parameters for temperature control. The cyclic adjustment module is used to continuously collect new environmental data based on the adjustment parameters and perform cyclic adjustment to obtain the final temperature control output.
[0015] Thirdly, the present invention also provides an electronic device, including a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein the processor executes the computer program to implement the temperature control method for smart glasses described in any of the above claims.
[0016] Fourthly, the present invention also provides a computer-readable storage medium comprising a stored computer program, wherein, when the computer program is executed, it controls the device containing the computer-readable storage medium to perform the temperature control method for smart glasses described in any one of the preceding claims.
[0017] Compared with the prior art, the present invention has the following beneficial effects: (1) This invention improves the quality of environmental data by collecting the humidity and temperature values of smart glasses and removing outliers and formatting them. It further extracts the characteristics of humidity and temperature changes and classifies them, which can accurately reflect the influence of environmental fluctuations on lens temperature. This solves the problem that traditional temperature control methods rely on single-point temperature judgment and cannot obtain continuous change trends, resulting in adjustment lag. (2) Based on dynamic correlation features, this invention extracts environmental change trends and judges fog risk. After supplementing environmental information from preset historical environmental data and combining it with the current temperature, it performs comprehensive calculations. It can identify fog formation conditions in advance and generate target temperature adjustment values, which solves the problem that the existing technology lacks predictive ability and cannot intervene in advance, resulting in lenses being prone to temporary blurring. (3) The present invention generates temperature adjustment commands based on the target temperature adjustment value and updates the dynamic correlation features of the lens surface state to realize rapid closed-loop adjustment of temperature adjustment commands. It continuously collects new environmental data based on the adjustment parameters for cyclic adjustment, which can stably maintain the lens clarity and solves the problems of untimely response, unstable energy consumption and insufficient clarity maintenance of traditional temperature adjustment. Attached Figure Description
[0018] Figure 1 This is a schematic flowchart of a temperature control method for smart glasses provided in the first embodiment of the present invention; Figure 2 This is a schematic diagram of the temperature control system structure for smart glasses provided in the second embodiment of the present invention. Detailed Implementation
[0019] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0020] Reference Figure 1 The first embodiment of the present invention provides a temperature control method for smart glasses, comprising the following steps: S1: Collect humidity and temperature values from the smart glasses, remove outliers, and format the data to obtain an environmental dataset. S2, extract and classify the change features of the humidity value and the temperature value based on the environmental dataset to obtain dynamic correlation features; S3, Based on the dynamic correlation features, extract environmental change trend data and determine fog risk to obtain risk assessment results; S4. Based on the risk assessment results, extract preset historical environmental data to supplement the environmental dataset, and integrate the current temperature information to obtain the target temperature adjustment value; S5, generate a temperature adjustment command based on the target temperature adjustment value, and obtain an adjustment response signal; S6, monitor the surface state of the lens according to the adjustment response signal and update the dynamic correlation feature to obtain the adjustment parameters for temperature control; S7. Based on the adjustment parameters, new environmental data is continuously collected and cyclically adjusted to obtain the final temperature control output.
[0021] In step S1, the humidity and temperature values of the smart glasses are collected, and outlier values are removed and formatted to obtain an environmental dataset, including: S11: Collect the current humidity and temperature values of the smart glasses and record the corresponding time markers to obtain the raw environmental data; S12, compare and verify the original environmental data according to the preset humidity threshold range and the preset temperature threshold range, remove abnormal data, and obtain filtered environmental data. S13, unify the units and organize the fields of the filtered environment data to obtain formatted environment data; S14, perform integrity verification and structure integration on the formatted environment data to obtain the environment dataset.
[0022] In step S11, the current humidity and temperature values of the smart glasses are collected and the corresponding time markers are recorded to obtain the raw environmental data.
[0023] It should be noted that the humidity and temperature values are collected by a humidity sensor integrated inside the temples of the smart glasses. Humidity is expressed in RH, and temperature in °C. The sampling interval is set to 1 second because real-time changes in humidity and temperature are generally slow and continuous. A sampling frequency of one second can fully capture the trend of environmental changes while avoiding data redundancy and increased device power consumption caused by excessively high sampling frequencies, thus achieving a balance between sampling accuracy and power consumption control. Each sampling session records the current time as a timestamp. The time, humidity value, temperature value, and sensor status are combined to form a raw environmental data record. The normal humidity range is 20-90 RH, and the normal temperature range is -10-50 °C. Data outside the above ranges or with abnormal sensor status are marked as abnormal items to be processed to avoid affecting subsequent feature extraction and trend analysis.
[0024] For example, during a data collection process, three consecutive raw environmental data records were recorded as follows: 14:02:01, humidity 45RH, temperature 22℃, normal status; 14:02:02, humidity 47RH, temperature 23℃, normal status; 14:02:03, humidity 15RH, temperature 21℃, normal status. Since 15RH is lower than the preset normal humidity range lower limit of 20RH, the third data record was marked as an abnormal item and not included in subsequent feature extraction and dynamic correlation analysis.
[0025] In step S12, the original environmental data is compared and verified according to the preset humidity threshold range and the preset temperature threshold range, and abnormal data is removed to obtain filtered environmental data.
[0026] It should be noted that the comparison test refers to comparing the humidity and temperature values in the original environmental data with the normal ranges set by the system. The normal humidity range is 20-90% RH, and the normal temperature range is -10-50℃. If the humidity or temperature value of a record exceeds the corresponding range, or if the sensor status shows abnormalities, such as unstable signal or reading failure, the record is judged as abnormal data and discarded. By filtering out invalid data, the data used to extract humidity and temperature change characteristics can be kept stable and continuous, thereby improving the accuracy of subsequent trend analysis and fog risk assessment.
[0027] For example, three consecutive raw environmental data records were recorded as follows: 14:02:01, 45RH, 22℃, normal; 14:02:02, 47RH, 23℃, normal; 14:02:03, 15RH, 21℃, normal. The 15RH reading is below the preset lower limit of the normal humidity range (20RH), therefore the third data point was identified as abnormal and removed. The remaining two data points meet the requirements for normal humidity and temperature and can be used as filtered environmental data for subsequent feature extraction and trend analysis.
[0028] In step S13, the units of the filtered environment data are standardized and the fields are organized to obtain formatted environment data.
[0029] It's important to note that field organization refers to structuring the filtered environmental data according to the fixed structure required for subsequent system analysis. Each data entry is arranged sequentially according to four fields: collection time, humidity value, temperature value, and status, ensuring data structure consistency. During the organization process, each field is checked. If a data entry is missing a field, such as the status field, it is supplemented by the status field of the previous valid record. If the time format is inconsistent, it is uniformly adjusted to hour, minute, and second format. The purpose of field organization is to create a standardized data structure, enabling formatted environmental data to directly participate in the extraction of humidity and temperature change characteristics, thereby improving the accuracy and stability of subsequent trend calculations.
[0030] For example, consider two environmental data records: 14:02:01, 45RH, 22℃, Normal, and 14:02:02, 47RH, 23℃, Normal. During field processing, the two data records are rearranged according to the field order of collection time, humidity value, temperature value, and status, ensuring consistent time format, resulting in 14:02:01, 45RH, 22℃, Normal and 14:02:02, 47RH, 23℃, Normal. If the original record in the second data record lacks a status field, the status "Normal" from the previous record is used as a filler field during processing, ensuring consistent field structure between the two data records and making them usable for subsequent extraction and analysis of change features.
[0031] In step S14, the formatted environment data is subjected to integrity verification and structural integration to obtain an environment dataset.
[0032] It's important to note that integrity verification involves checking whether each record in the formatted environmental data meets the requirements for dataset construction. This includes verifying the continuity of the time field, the validity of humidity and temperature values, and the normal status of the status field. If a record's time stamp is found to be discontinuous, the missing time is calculated based on the collection interval and a blank record is added. If humidity or temperature values are missing, they are filled in using values from adjacent valid records, ensuring data continuity over time. Structure integration involves rearranging the integrity-verified data in chronological order, combining all records into a continuous data sequence with a unified structure to form an environmental dataset directly usable for feature extraction. Through integrity verification and structure integration, the data input to subsequent feature extraction steps is ensured to be both continuous and complete, improving the reliability of the analysis results.
[0033] For example, the formatted environment data contains three records: 14:02:01, 45RH, 22℃, normal; 14:02:02, 47RH, 23℃, normal; 14:02:04, 48RH, 23℃, normal. Because the third record is earlier than its predecessor and lacks data corresponding to 14:02:03, during integrity verification, a blank record for 14:02:03 is added based on a 1-second acquisition interval. The humidity and temperature data from the previous valid record are then used to complete the data, resulting in 14:02:03, 47RH, 23℃, normal. The four data points were then structurally integrated in chronological order to form the following data sets: 14:02:01, 45RH, 22℃, normal; 14:02:02, 47RH, 23℃, normal; 14:02:03, 47RH, 23℃, normal; 14:02:04, 48RH, 23℃, normal, thus forming a complete environmental dataset.
[0034] In step S2, the variation features of the humidity and temperature values are extracted from the environmental dataset and classified to obtain dynamic correlation features, including: S21, extract humidity data sequence and temperature data sequence from the environmental dataset to obtain environmental change data; S22, The environmental change data is sorted out in time order and the numerical stationarity is checked to obtain a standardized change sequence; S23, extract humidity change features and temperature change features based on the standardized change sequence to obtain a set of change features; S24, perform category judgment and correlation analysis on the set of changing features to obtain dynamic correlation features.
[0035] In step S21, humidity data sequences and temperature data sequences are extracted from the environmental dataset to obtain environmental change data.
[0036] It's important to note that the humidity and temperature data sequences are extracted separately from the environmental dataset, where humidity and temperature values are arranged chronologically. These are then used to create two independent time-series datasets for subsequent trend analysis. The extraction process begins by reading the collection time field from the environmental dataset, using the chronological order as the sequence baseline. Humidity values at the corresponding times are then added to the humidity data sequence, and temperature values are added to the temperature data sequence, ensuring a one-to-one correspondence between the two sequences over time. To prevent data jitter or abnormal padding from interfering with sequence analysis, the extraction process simultaneously checks the validity of humidity and temperature values. If a record is a padding record or its status field displays an anomaly, it is replaced with the value of the previous valid record to maintain sequence continuity and stability. The generated environmental change data contains two structurally consistent sequences that can be directly used for feature extraction and trend analysis.
[0037] For example, the four records in the environmental dataset are: 14:02:01, 45RH, 22℃, normal; 14:02:02, 47RH, 23℃, normal; 14:02:03, 47RH, 23℃, normal; 14:02:04, 48RH, 23℃, normal. When extracting the humidity data sequence, we obtain 45RH, 47RH, 47RH, 48RH in chronological order; when extracting the temperature data sequence, we obtain 22℃, 23℃, 23℃, 23℃ in chronological order. Both sequences maintain a one-to-one match with the acquisition time and can be directly used as environmental change data input for the next step of change feature extraction processing.
[0038] In step S22, the environmental change data is sorted out in time order and its numerical stationarity is checked to obtain a standardized change sequence.
[0039] It should be noted that time-series sorting refers to checking whether the humidity and temperature data sequences are arranged chronologically based on the acquisition time field. If misalignment or inaccurate data order is found, the sequences are reordered according to the acquisition time to ensure temporal consistency. Numerical stationarity verification identifies abrupt changes in the sequences, such as large jumps in humidity or temperature within adjacent acquisition intervals, exceeding the normal range of environmental change. Such data is considered non-stationary. To ensure the continuity of subsequent feature extraction, non-stationary data are replaced with the average of adjacent valid records, maintaining reasonable continuity in the sequence's fluctuation range. After time-series sorting and numerical stationarity verification, both the humidity and temperature sequences possess continuous, stationary structures suitable for trend analysis, forming standardized change sequences.
[0040] For example, the humidity sequence of environmental change data is 45RH, 47RH, 60RH, 48RH, corresponding to times 14:02:01, 14:02:02, 14:02:03, and 14:02:04. The 60RH value jumps sharply within one second without accompanying temperature changes and is therefore judged as non-stationary. During the verification process, the 60RH value is replaced with the average of 47RH and 48RH, resulting in an adjusted humidity sequence of 45RH, 47RH, 47RH, 48RH. The temperature sequence remains at 22℃, 23℃, 23℃, 23℃. Both sequences ultimately meet the requirements of temporal continuity and numerical stationarity and can be used as standardized change sequences for the next step of feature extraction.
[0041] In step S23, humidity change features and temperature change features are extracted based on the standardized change sequence to obtain a set of change features.
[0042] It should be noted that the extraction of humidity and temperature change features is based on continuous data of standardized change sequences. Feature content is formed by analyzing the differences between adjacent records, the direction of the upward or downward trend, and the magnitude of the change. Humidity change features reflect the upward or downward trend of humidity over a short period, while temperature change features reflect the slow change of temperature over time. The feature extraction process first calculates the difference between two adjacent data points to obtain the magnitude of the change, and then determines the direction of change based on the sign of the difference; for example, a positive value represents an upward trend, and a negative value represents a downward trend. Subsequently, humidity and temperature change trend features are generated based on the difference distribution of the entire sequence, enabling the data to describe the overall change pattern of the environment over time. After extraction, the humidity and temperature change features are summarized into a change feature set, providing input for subsequent classification and judgment.
[0043] For example, the humidity data in the standardized change sequence are 45RH, 47RH, 47RH, and 48RH, corresponding to temperature data of 22℃, 23℃, 23℃, and 23℃. The humidity differences between the four time points are +2, +0, and +1, respectively, indicating that the humidity generally shows a gradual upward trend, and the humidity change feature can be extracted as a stable increase. The temperature data differences are +1, +0, and +0, with smaller fluctuations and overall stability, and the temperature change feature can be extracted as a slight increase or basically stable. Finally, the humidity change features and temperature change features are combined to obtain a change feature set for the next step of feature classification and association analysis.
[0044] In step S24, the set of changing features is subjected to category judgment and correlation analysis to obtain dynamic correlation features.
[0045] It's important to note that category judgment refers to classifying and identifying a set of features based on the direction, magnitude, and frequency of changes in humidity and temperature. For example, when humidity shows an upward trend and a large magnitude of change, it can be classified as a rapidly increasing humidity category; when temperature changes are small and the trend is stable, it can be classified as a stable temperature category. The purpose of category judgment is to distinguish different change patterns, providing a foundation for establishing relationships between features. Correlation analysis compares the relationship between humidity and temperature changes over the same time period, such as determining whether they change synchronously, whether they influence each other, or whether they deviate from each other. If humidity increases rapidly while temperature decreases slightly or remains stable, the correlation may be high, indicating that the environment has the characteristic of increasing humidity but insignificant temperature changes. By performing category judgment and correlation analysis on the set of changing features, dynamic correlation features reflecting the dynamic change patterns of the environment can be obtained, which can be used for subsequent trend judgment and fog risk assessment.
[0046] For example, in the set of change features, humidity change is characterized by a steady increase, while temperature change is characterized by a relatively stable trend. Based on the change trends, humidity change is classified as increasing, and temperature change is classified as stable. Subsequent correlation analysis reveals that the increasing humidity trend is not accompanied by a significant increase in temperature, indicating a weak correlation between the two. Combining the category judgment and the change relationship analysis yields a dynamic correlation feature, indicating that the current environment exhibits a pattern of gradually increasing humidity and stable temperature, which can be used in subsequent fog risk assessment steps.
[0047] In step S3, environmental change trend data is extracted based on the dynamic correlation features, and fog risk is determined to obtain risk assessment results, including: S31, extract the humidity change trend and temperature change trend based on the dynamic correlation features to obtain environmental change trend data; S32, compare the environmental change trend data with the preset fog generation conditions to obtain fog triggering indicators; S33, Based on the fog triggering index and the current environmental status, the risk level is determined to obtain fog risk data; S34, Summarize the fog risk data to obtain the risk assessment results.
[0048] In step S31, humidity change trends and temperature change trends are extracted based on the dynamic correlation features to obtain environmental change trend data.
[0049] It should be noted that the extraction of humidity and temperature change trends is based on the collected humidity and temperature data time series. A single valid change is determined by the magnitude and direction of change between adjacent sampling points. Then, continuous changes are statistically analyzed within a preset time window to form an overall trend result. The humidity and temperature changes between two adjacent samples are the difference between the current value and the value at the previous sampling time. The magnitude of the change is determined by the absolute value; a valid change is defined as an absolute value of humidity change greater than or equal to 1 RH or an absolute value of temperature change greater than or equal to 0.5℃.
[0050] The above thresholds were obtained by statistical analysis of long-term historical sampling data from multiple batches of smart glasses in typical usage environments (such as sports and outdoors), ensuring that the thresholds match the wearing scenarios of the smart glasses and are used to distinguish between fluctuations in the sensor itself and changes in the actual environment.
[0051] Trend determination uses a 10-second time window. With a 1-second sampling interval, each time window contains 10 sampling points. If eight or more valid changes in the same direction occur within the same time window, that direction is considered the current variable's trend. If fewer than eight valid changes occur, but more than five occur in the same direction, it's considered a weak trend. If fewer than five occur, historical data or a default determination indicates a stable trend. Positive valid changes indicate an upward trend in humidity, while negative changes indicate a downward trend. Temperature trend determination prioritizes stable conditions. If the absolute value of temperature change at all sampling points is less than 0.2℃, it's directly considered a stable trend. Otherwise, the direction of valid changes (change ≥ 0.5℃) is checked, and the trend direction is determined according to the number of valid changes (consistent with humidity). If there are sampling points with changes between 0.2℃ and 0.5℃, but the number of valid changes is insufficient, it's defaulted to a stable trend. These rules categorize short-term discrete changes into three trends: upward, downward, or stable, providing environmental trend data for subsequent fog formation condition determination.
[0052] For example, if humidity data is collected ten times consecutively at one-second intervals within a ten-second time window, namely 60RH, 61RH, 62RH, 63RH, 63RH, 64RH, 65RH, 66RH, 67RH, and 68RH, and the vast majority of adjacent humidity changes are positive with an absolute value greater than or equal to 1RH, while the temperature data remains within the range of 23℃ to 23.1℃ within the same time window, and the absolute value of adjacent temperature changes is less than 0.2℃, then the humidity change trend is determined to be an upward trend, and the temperature change trend is a stable trend. The resulting environmental change trend data is a combination of increasing humidity and stable temperature.
[0053] In step S32, the environmental change trend data is compared with the preset fog generation conditions to obtain fog triggering indicators.
[0054] It should be noted that the preset fog formation conditions are comparison benchmarks set based on common lens fog formation mechanisms. These include several key conditions such as whether the rate of humidity increase exceeds a preset threshold, whether the temperature change remains within a preset low-change range, and whether the humidity increase trend and the temperature stability trend occur simultaneously. The comparison process involves matching the humidity and temperature change trends in the environmental change trend data item by item with the above preset conditions. The degree of trend satisfaction is determined by judging the trend direction, change magnitude, and synchronicity. When the environmental change trend data meets some or all of the preset conditions, the fog trigger index will increase proportionally to quantify whether the current environment is close to a fog formation state, providing a basis for risk level assessment.
[0055] For example, environmental change trend data shows that humidity is rising continuously while temperature remains stable, which partially matches the preset conditions of rapid increase in humidity and constant temperature. Therefore, the fog trigger index is judged to be moderately high, indicating that there is a certain possibility of fog formation in the current environment.
[0056] In step S33, the risk level is determined based on the fog triggering index and the current environmental state to obtain fog risk data.
[0057] It should be noted that the risk level assessment comprehensively considers factors such as the strength of fog triggering indicators, whether the current humidity value is in the high humidity range, and the proximity of the current temperature to the dew point. The dew point temperature is estimated based on the current temperature and relative humidity using an empirical conversion formula. The proximity is represented by the absolute value of the difference between the current temperature and the dew point temperature; the smaller the difference, the closer to condensation conditions. The system classifies fog risk into three levels: low risk, medium risk, and high risk. Low risk is defined as a low triggering indicator with humidity between 40-60% RH or a temperature difference greater than 5°C between the current temperature and the dew point. Medium risk is defined as a medium triggering indicator with humidity between 60-80% RH or a temperature difference between the current temperature and the dew point between 3-5°C. High risk is defined as a high triggering indicator with humidity above 80% RH or a temperature difference between the current temperature and the dew point less than 3°C. The assessment results, consisting of risk levels and corresponding parameters, form fog risk data to reflect the potential risk level of fog under the current environment.
[0058] For example, if the current humidity is 85%RH and the temperature is 23℃, the calculated dew point temperature is approximately 20℃. The difference between the current temperature and the dew point temperature is 3℃. Meanwhile, the fog triggering index is moderately high. Based on the conditions that the humidity is in the high humidity range and the temperature is close to the dew point, the risk level can be determined as moderately high risk. The generated fog risk data indicates that there is a greater possibility of fog condensation during this period.
[0059] In step S34, the fog risk data is summarized to obtain the risk assessment results.
[0060] It should be noted that the results summary involves unifying the risk level, trigger indicators, and trend analysis results to form the final risk assessment output. During the summary process, it is checked whether the risk level aligns with the trend direction, confirming the absence of deviations due to data dispersion, and integrating the trigger indicators with the risk level to ensure that the final result reflects the current magnitude and direction of fog risk, providing reliable input for subsequent environmental data supplementation and temperature adjustment steps.
[0061] For example, if the fog risk data is medium risk, the trigger indicator is medium to high risk, and the trend data shows that the humidity is continuously rising and the temperature is stable, when the three pieces of information are consistent, the final risk assessment result can be medium to high risk, indicating that there is a strong possibility of fog formation on the lens and further temperature adjustment is required.
[0062] In step S4, based on the risk assessment results, preset historical environmental data is extracted to supplement the environmental dataset, and current temperature information is fused to obtain the target temperature adjustment value, including: S41, Based on the risk assessment results, extract humidity and temperature records from the preset historical environmental data to obtain supplementary environmental data; S42, perform sequence alignment and segment filtering on the supplementary environmental data and the environmental dataset to obtain filtered environmental data; S43, The screened environmental data is compared with the current temperature information to obtain environmental state parameters; S44, calculate the temperature deviation based on the environmental state parameters to obtain the target temperature adjustment value.
[0063] In step S41, humidity and temperature records are extracted from preset historical environmental data based on the risk assessment results to obtain supplementary environmental data.
[0064] It should be noted that the extraction of humidity and temperature records is based on the risk level, humidity change trend, and temperature change trend in the risk assessment results. Specifically, historical data segments with the same or adjacent risk levels as the current risk level are retrieved from the preset historical environmental data, while also meeting the condition that the humidity change trend direction is consistent. Consistent trend direction means that within the same time window, the proportion of sampling points with the same effective change sign exceeds 70%, and the maximum number of consecutive identical signs is not less than 5 (positive signs indicate an upward trend, and negative signs indicate a downward trend). In this case, the trend direction is determined to be consistent with the direction of that sign.
[0065] Temperature fluctuations must fall within a preset allowable range, determined through historical sample statistics. The criterion is that the absolute value of temperature changes at adjacent sampling points does not exceed 0.3℃. Simultaneously, the overall temperature fluctuation range serves as a supplementary verification indicator. By clearly defining these matching conditions, data segments highly consistent with the current environmental trend characteristics are selected from historical humidity and temperature records. These segments serve as supplementary environmental data, providing accurate references for subsequent improvements to the environmental dataset.
[0066] For example, if the current humidity trend is upward, the proportion of sampling points with the same effective change sign in the most recent 10-second window is 90%, the maximum number of consecutive identical signs is 9, the absolute value of the temperature change of adjacent sampling points does not exceed 0.3℃, and the temperature value is within the range of 23.0℃ to 23.2℃, then data segments with the same or adjacent risk level from historical environmental data, based on the same time window (10 seconds) and sampling interval (1 second), and which simultaneously satisfy the conditions of continuously rising humidity and absolute value of temperature change not exceeding 0.3℃, are selected as supplementary environmental data.
[0067] In step S42, the supplementary environmental data is sequence aligned and segment filtered with the environmental dataset to obtain filtered environmental data.
[0068] It should be noted that sequence alignment refers to concatenating the supplementary environmental data with the existing environmental dataset in chronological order and checking the temporal continuity of the two data segments. If temporal discontinuities exist, the missing time points are filled in using linear interpolation based on the collection interval. This involves calculating the data at intermediate time points proportionally to the humidity and temperature values of the preceding and following records, ensuring the filled-in data maintains consistency with the original collection trend. Segment filtering involves selecting segments with high consistency from the aligned sequence based on the current environmental change trend. The filtering rules are as follows: if the humidity change direction is the same as the current trend and the temperature change amplitude is less than a preset low change threshold (e.g., 1℃), it is considered a small deviation; if the humidity change direction is opposite, the temperature change amplitude is greater than the preset threshold, or the change curve shows a significant abrupt change in a short period, it is considered a large deviation and is removed. The filtered environmental data meets the requirements in terms of trend consistency and temporal continuity and can be used for subsequent comprehensive comparative analysis.
[0069] For example, the latest record in the current environmental dataset is 14:02:02, 47RH, 23℃, normal. Supplementary environmental data are 14:01:00, 44RH, 22℃, normal, and 14:01:01, 46RH, 22℃, normal. After sequence alignment, arranged in chronological order, the data is: 14:01:00, 44RH, 22℃; 14:01:01, 46RH, 22℃; 14:02:01, 45RH, 22℃; 14:02:02, 47RH, 23℃. After segment filtering, only segments with a clear upward trend in humidity and small temperature changes are retained as filtered environmental data. Their trends are consistent with the current environmental trend and can be used for subsequent comparison processing.
[0070] In step S43, the screened environmental data is compared with the current temperature information to obtain environmental state parameters.
[0071] It should be noted that the comprehensive comparison quantitatively analyzes the humidity and temperature values in the screened environmental data in conjunction with the current temperature information. By calculating the consistency of humidity and temperature variation amplitudes and trends, it reflects the degree of similarity between the screened environmental data and the current environmental changes. The humidity variation amplitude is calculated using absolute difference. The absolute value of the difference between the mean humidity of the screened environmental data and the current humidity value is divided by a preset humidity range width to obtain the normalized deviation. For example, if the preset humidity range is 20RH to 90RH with a range width of 70RH, a smaller difference indicates that the humidity is closer to the current environment. The temperature variation amplitude is calculated in the same way, dividing the temperature difference by the preset temperature stability range width to obtain the normalized temperature deviation, which characterizes the degree of temperature matching.
[0072] Furthermore, trend consistency is calculated by statistically analyzing the proportion of positive and negative signs of humidity and temperature changes within a continuous sampling period. For example, if four out of five changes show consistency, the consistency score is 0.8. Finally, the humidity deviation, temperature deviation, and consistency score are weighted and summed according to preset weights. These preset weights are determined based on historical data regression analysis; for example, humidity deviation has a weight of 0.4, temperature deviation has a weight of 0.4, and consistency score has a weight of 0.2. This yields environmental state parameters that represent the strength and stability of current environmental changes.
[0073] For example, the selected environmental data includes 14:02:01, 45RH, 22℃, normal, and 14:02:02, 47RH, 23℃, normal, with current humidity at 47RH and current temperature at 23℃. The average humidity is 46RH, and the humidity difference is 1RH (the absolute difference between the current humidity of 47RH and the average humidity of 46RH), which, after normalization, is 1 / 70≈0.0143. The average temperature is 22.5℃, and the temperature difference is 0.5℃ (the absolute difference between the current temperature of 23℃ and the average temperature of 22.5℃). The preset temperature stability interval width is 10℃, which, after normalization, is 0.5 / 10=0.05. The trend direction is consistent in four out of five changes, with a consistency score of 0.8. The weighted calculation yields the environmental state parameter as 0.4×0.0143+0.4×0.05+0.2×0.8=0.18572, indicating that the intensity of environmental change is moderate and the trend is stable.
[0074] In step S44, the temperature deviation is calculated based on the environmental state parameters to obtain the target temperature adjustment value.
[0075] It should be noted that the temperature deviation calculation combines the humidity change trend in environmental state parameters with the current temperature information and the predicted dew point temperature for comprehensive analysis. This analysis is used to estimate the temperature compensation required to suppress fog formation. The predicted dew point temperature is obtained based on the empirical conversion relationship between temperature and humidity. The difference between the current temperature and the predicted dew point temperature is recorded as the temperature difference. When the temperature difference is less than a preset threshold, such as 3°C, and the environmental state parameters indicate a continuous upward trend in humidity, it is determined that the current environment is approaching the fog formation range, and temperature compensation is required.
[0076] The dew point temperature is calculated using the Magnus formula, taking into account the current temperature and humidity.
[0077] It's worth noting that the compensation range is determined based on the thermal capacity characteristics of the smart glasses lenses and anti-fog experimental data. A 1℃ compensation corresponds to the optimal anti-fog effect at a humidity increase rate of 5RH / minute. When the temperature difference is within 3℃ and the humidity maintains an upward trend, the compensation range can be set to 1℃. When the temperature difference is greater than or equal to 3℃ or the humidity change shows no significant upward trend, the compensation range can be set to 0℃, indicating no additional heating is needed. Compensation is required when the temperature difference is less than 3℃. When the temperature difference is equal to 3℃, compensation is required if the humidity trend is moderate or stronger. The target temperature adjustment value calculated using the above rules is used to generate subsequent temperature adjustment commands, making the adjustment process more closely match actual anti-fog needs.
[0078] For example, if the environmental conditions are that the humidity is continuously rising and the temperature is basically stable, the current temperature is 23℃ and the current humidity is 85%RH, the dew point temperature is expected to be 20.5℃ according to the Magnus formula, and the temperature difference between the two is 3℃. This meets the condition that the temperature difference is no more than 3℃ and the humidity is on an upward trend. According to the compensation rules, a temperature increase compensation of 1℃ is required. The final target temperature adjustment value is 1℃ higher than 23℃.
[0079] In step S5, a temperature adjustment command is generated based on the target temperature adjustment value, and an adjustment response signal is obtained, including: S51, extract the instruction generation parameters based on the target temperature adjustment value to obtain the instruction adjustment parameters; S52, perform logical operations and segment mapping on the instruction adjustment parameters to obtain instruction configuration data; S53, construct a temperature adjustment instruction based on the instruction configuration data, execute the temperature adjustment instruction and obtain execution feedback to obtain an adjustment response signal.
[0080] In step S51, instruction generation parameters are extracted based on the target temperature adjustment value to obtain instruction adjustment parameters.
[0081] It should be noted that extracting command generation parameters refers to decomposing the target temperature adjustment value into specific parameters that can be used for command calculation, including temperature adjustment direction parameters and temperature adjustment magnitude parameters. The temperature adjustment direction is determined based on whether the target temperature adjustment value is higher or lower than the current temperature. For example, if the adjustment value is higher than the current temperature, the adjustment direction is to increase the temperature; otherwise, it is to decrease it. The temperature adjustment magnitude is determined based on the difference between the target temperature adjustment value and the current temperature to ensure that the adjustment process avoids over-adjustment while maintaining a timely response to the risk of fog. The resulting adjustment parameters serve as the basic input for constructing the temperature adjustment command.
[0082] For example, if the current temperature is 23℃ and the target temperature adjustment value is 24℃, then the extracted temperature adjustment direction is to increase the temperature, and the temperature adjustment range is 1℃. These two items together constitute the adjustment parameters used to generate the instruction configuration for the next step.
[0083] In step S52, logical operations and segment mapping are performed on the instruction adjustment parameters to obtain instruction configuration data.
[0084] It should be noted that the logical operation jointly determines the heating demand level based on the temperature adjustment range ΔT in the instruction adjustment parameters and the trend consistency score reflected by the environmental state parameters. The rules for determining the heating demand level are as follows: Level 1 heating segment: determined when ΔT ≤ 1℃ and trend consistency score < 0.6; Level 2 heating segment (medium demand): determined when either of the following conditions is met: 1℃ < ΔT ≤ 2℃ and trend consistency score < 0.8, or ΔT ≤ 2℃ and 0.6 ≤ trend consistency score < 0.8; Level 3 heating segment: determined when either of the following conditions is met: ΔT > 2℃ or trend consistency score ≥ 0.8. This rule ensures that any combination (ΔT, trend consistency score) has one and only one corresponding heating segment.
[0085] Segment mapping maps the aforementioned temperature rise requirement levels to preset combinations of power output levels and execution durations. Level 1 temperature rise segments correspond to low power output and longer execution durations, Level 2 segments to medium power output and medium execution durations, and Level 3 segments to high power output and shorter execution durations. The instruction configuration data obtained from logical operations and segment mapping includes the target segment number, corresponding power output level, and execution duration, which is used to subsequently construct temperature regulation instructions.
[0086] For example, if the temperature adjustment range given in the instruction adjustment parameters is a 1.5℃ increase, and the environmental status parameters show a continuous upward trend in humidity with a trend consistency score of 0.7, then according to the above rules, this is determined to be a medium temperature increase requirement, corresponding to the second-level temperature increase segment. The segment mapping result is to select the second-level power output level and set the execution time to 40000ms. The generated instruction configuration data record is as follows: target segment number is 2, corresponding to power output level 1, i.e., medium power, execution time is 40000ms, which serves as the basis for subsequently generating temperature adjustment instructions and driving the temperature control execution unit.
[0087] In step S53, a temperature regulation instruction is constructed according to the instruction configuration data, the temperature regulation instruction is executed and execution feedback is obtained to obtain a regulation response signal.
[0088] It should be noted that the temperature adjustment command is generated by creating a fixed-format control message based on the command configuration data. The control message consists of a power level field, an execution time field, and an adjustment mode field. The power level field is a 1-byte unsigned integer, with values of 0, 1, 2, and 3 representing off, low power, medium power, and high power, respectively. The execution time field is a 2-byte unsigned integer in milliseconds (ms). The adjustment mode field is a 1-byte unsigned integer, with a value of 1 indicating heating mode and 2 indicating constant temperature mode. The temperature control execution module executes the adjustment action according to the message and returns the actual power, actual execution time, and execution status flag. Successful execution is determined by the difference between the actual power and the set power not exceeding 5%, the actual execution time not less than 95% of the set execution time, and the execution status flag being "normal." If any condition is not met, the execution is considered a failure, and the corresponding deviation data is recorded in the adjustment response signal for subsequent lens status monitoring and dynamic feature updates.
[0089] For example, continuing from the previous example, the instruction configuration data sets the power level to 2, the execution time to 40000ms, and the adjustment mode to 1. The constructed temperature adjustment instruction sequentially includes the power level value 1, the execution time 40000ms, and the mode field value 1. After execution, the temperature control execution module returns that the actual power is 98% of the set power, the actual execution time is 2950ms, and the execution status is marked as normal. Since the power deviation is 2% and does not exceed 5%, the execution time completion rate is 98% and higher than 95%, and the status is normal, the adjustment response signal is recorded as successful execution, and the 2% power deviation and 98% execution time completion rate are saved as input data for subsequent steps.
[0090] In step S6, the surface state of the lens is monitored and the dynamic correlation feature is updated based on the adjustment response signal to obtain the adjustment parameters for temperature control, including: S61, monitor the clarity and humidity adhesion of the lens surface according to the adjustment response signal to obtain lens status data; S62, perform association judgment on the lens state data in conjunction with the dynamic association features to obtain feature update data; S63, Update the dynamic correlation feature according to the feature update data to obtain the temperature control adjustment parameters.
[0091] In step S61, the clarity and humidity adhesion of the lens surface are monitored according to the adjustment response signal to obtain lens status data.
[0092] It should be noted that monitoring lens surface clarity and humidity adhesion refers to collecting and quantifying the lens surface condition within a preset detection time window after temperature adjustment. For example, the detection time window is set to 5 seconds, with a sampling interval of 1 second. Clarity monitoring uses the smart glasses' built-in imaging component to acquire 1280x720 resolution environmental images. After converting them to grayscale, a 3x3 pixel window is used to calculate the average grayscale difference between adjacent pixels. Simultaneously, the Sobel operator is used to count the number of edge contours. The two are weighted and summed with a grayscale difference weight of 0.6 and an edge weight of 0.4, mapped to a clarity score of 0–100. The threshold of 70 is set based on 100 sets of sample experiments; a score ≥70 indicates a lens imaging pass rate exceeding 95%.
[0093] Humidity adhesion is assessed by reading the local humidity value near the lens using a humidity sensor around the lens and comparing it to a preset local humidity threshold. The local humidity threshold is set to 70 RH, which aligns with the normal ambient humidity range of 20–90 RH set in step S12, but is used specifically to determine whether the humidity near the lens is too high. A high degree of humidity adhesion is determined when the local humidity is consistently above 70 RH for three consecutive tests, and the sharpness score decreases by at least 10 points cumulatively from the initial value within the same detection window. The monitored lens status data includes the detection time, sharpness score, and the humidity adhesion level determined according to the above rules, used to subsequently assess whether the adjustment effect meets expectations.
[0094] For example, a certain adjustment response signal indicates that after the heating action was completed, the image sharpness scores collected at 14:03:01, 14:03:02, and 14:03:03 were 82, 76, and 71 respectively, corresponding to local humidity readings of 72RH, 73RH, and 75RH. Since the local humidity was not lower than 70RH in all three measurements, and the sharpness score dropped from 82 to 71, a cumulative decrease of 11 points, exceeding the 10-point threshold, it was determined that the humidity adhesion level was high in this measurement. The lens status data was recorded at time 14:03:03, with a sharpness score of 71, indicating a high humidity adhesion level, and was used as input data for subsequent dynamic feature update steps.
[0095] In step S62, the lens state data is combined with the dynamic correlation features to make a correlation judgment, and feature update data is obtained.
[0096] It should be noted that the correlation judgment compares the changes in lens clarity score and humidity adhesion level in the lens status data with the humidity and temperature change trends in the dynamic correlation features to determine the degree of matching between the lens status and the environmental trend. The correlation judgment is performed in units of two consecutive detection cycles (1 second per cycle). If the cumulative decrease in clarity score is ≥5 points and the humidity adhesion level increases, the trend is considered consistent. If the clarity score remains above 70, the humidity adhesion level remains low, and the dynamic correlation features show a slight increase or stabilization in humidity, it is judged as a trend maintenance type. If the cumulative decrease exceeds 10 points over two consecutive cycles and the humidity adhesion level increases, and the dynamic correlation features show a rapid increase in humidity, it is judged as a trend enhancement type. The feature update data consists of trend type and trend strength, which directly correspond to the adjustment direction and adjustment magnitude of the adjustment parameters in the next step.
[0097] For example, if the lens status data shows that the clarity score drops from 86 to 80 in two detection cycles, a decrease of 6 points, and the humidity adhesion level rises from low to medium, and the dynamic correlation characteristics show that the humidity rises while the temperature remains stable, then it is determined to be a trend maintenance type, and the trend intensity is recorded as medium, which is used for subsequent adjustment parameter updates.
[0098] In step S63, the dynamic correlation feature is updated according to the feature update data to obtain the temperature control adjustment parameters.
[0099] It should be noted that the dynamic correlation feature update is based on the trend type and trend intensity in the feature update data, and the humidity trend direction and trend intensity level are quantitatively adjusted. The trend direction fine-tuning adopts the cumulative judgment method of the change sign of adjacent detection cycles. The sign value of the humidity change in the most recent 3 detection cycles is calculated. When the proportion of positive signs exceeds 2, it is adjusted to increase; when the proportion of negative signs exceeds 2, it is adjusted to decrease; and the rest are recorded as stable.
[0100] The trend intensity level is determined by the cumulative humidity change, taking the sum of the absolute values of humidity changes over the most recent three periods. The trend intensity level is divided into three levels: low, medium, and high, with thresholds of 0–5RH, 5–10RH, and greater than 10RH, respectively. The preset range of 5RH is based on experimental data statistics; cumulative humidity changes exceeding 5RH significantly impact lens clarity and are therefore used as the dividing line between strong and weak trends. The updated dynamic correlation feature consists of both trend direction and trend intensity level, mapped to temperature control adjustment parameters. The trend direction corresponds to the direction of temperature rise and fall, and the trend intensity level corresponds to the temperature adjustment range, ensuring consistency between the temperature control strategy and environmental changes.
[0101] For example, the feature update data needs to adjust the trend. Since the humidity changes in the last three cycles were 2RH, 1RH, and 3RH (all positive), the trend direction is adjusted to upward, and the cumulative change of 6RH corresponds to a moderate intensity level. The updated dynamic correlation feature shows that the humidity is rising while the temperature is stable. The corresponding temperature control adjustment parameters will continue to use the original slight heating strategy for the next cycle adjustment.
[0102] In step S7, new environmental data is continuously collected based on the adjustment parameters for cyclical adjustment to obtain the final temperature control output, including: S71, Based on the adjustment parameters, new humidity and temperature data are collected to obtain real-time environmental data; S72, Based on the real-time environmental data and the adjustment parameters, a temperature adjustment judgment is made to obtain adjustment execution data; S73, update the temperature control result according to the adjustment execution data to obtain the final temperature control output.
[0103] In step S71, new humidity and temperature data are collected based on the adjustment parameters to obtain real-time environmental data.
[0104] It should be noted that the acquisition frequency of real-time environmental data is jointly determined by the adjustment parameters and the rate of change in the current environment. The adjustment parameters provide the current temperature adjustment direction and trend strength, which are used to set the basic acquisition frequency. The basic acquisition frequency is determined by the trend strength level; when the trend strength is low, medium, and high, 3 seconds, 2 seconds, and 1 second are used as the basic acquisition intervals, respectively. Rapid changes in humidity trigger dynamic adjustments to the acquisition interval. The criterion for judging a rapid increase in humidity is whether the difference between two adjacent humidity data exceeds 5 RH. When the humidity change exceeds 5 RH, the acquisition interval is temporarily adjusted to 1 second to capture sudden environmental changes; when the humidity change does not exceed 5 RH, it reverts to the basic acquisition interval determined by the trend strength. This dual mechanism ensures that the acquisition frequency remains consistent with the adjustment parameters while also updating data promptly when rapid environmental changes occur. Real-time environmental data consists of a time field, humidity value, temperature value, and status field, forming a continuous sequence with the previous round of data, providing input for the next temperature adjustment judgment.
[0105] For example, the trend intensity level of the adjustment parameter is set to low, and the basic sampling interval is 3 seconds. The first detection of humidity change is 2RH (not exceeding 5RH), and the interval is maintained at 3 seconds; the next detection of change reaches 6RH (exceeding 5RH), and the interval is temporarily adjusted to 1 second; subsequent detections of change decrease to 3RH (≤5RH), and the interval is restored to the basic interval of 3 seconds.
[0106] In step S72, temperature adjustment is determined based on the real-time environmental data and the adjustment parameters to obtain adjustment execution data.
[0107] It should be noted that temperature regulation judgment is based on the normalized rate of change of humidity and temperature changes in real-time environmental data to assess whether the current regulation strategy has achieved the target set by the regulation parameters. The rate of change of humidity is normalized by dividing the difference between two consecutive humidity values by a uniform reference interval of 1 second, so that the rate judgment is not affected by changes in the collection interval. A rate of change of humidity greater than 3RH per second is considered a rapid increase, and a rate of change less than 1RH per second is considered a slowing trend. Whether the regulation effect has achieved the expected result is judged based on the target rise / fall magnitude and target rate range in the regulation parameters. For example, the target is to raise the temperature by 1°C and reduce the rate of change of humidity to below 1RH per second. When real-time environmental data shows that the normalized rate of change of humidity has dropped to below 1RH per second and the direction of temperature change is consistent with the regulation parameters, regulation execution data for the maintenance strategy is generated. When the rate of change of humidity remains above 3RH per second or the temperature has not reached the target magnitude, regulation execution data for the enhancement strategy is generated to increase the regulation intensity. When the rate of change of humidity is below 1RH per second and the temperature has exceeded the target magnitude, for example, a temperature rise exceeding the target of 1°C, regulation execution data for the weakening strategy is generated to reduce the regulation intensity. When the humidity stabilizes within the normal range and the temperature change meets the preset stability conditions, such as the temperature change not exceeding 0.1℃ for two consecutive cycles, the adjustment execution data for the termination strategy is generated, and the adjustment action is stopped.
[0108] For example, if the real-time environmental data is 46RH, 23℃ and 48RH, 24℃, with a 2-second interval between two consecutive data collections, then the normalized humidity change rate is 1RH per second, and the temperature rises from 23℃ to 24℃. The adjustment parameters require a 1℃ temperature increase and a humidity rate reduced to below 1RH per second. It is determined that the humidity rate has slowed down and the temperature has reached the target, meeting expectations. Therefore, the adjustment execution data is a maintenance strategy, used to maintain the current adjustment intensity before proceeding to the next step.
[0109] In step S73, the temperature control result is updated according to the adjustment execution data to obtain the final temperature control output.
[0110] It should be noted that the temperature control results are updated based on the adjustment effect, temperature change, and humidity normalization rate of change reflected in the adjustment execution data, and the current temperature adjustment state is determined according to preset state transition rules. These preset state transition rules are based on a joint determination of temperature change and humidity normalization rate of change, and are executed in the following priority order: Enhanced state: triggered when humidity change rate > 3RH / s and absolute temperature change < 50% of the target amplitude; Completed state: triggered when absolute temperature change ≥ target amplitude and humidity change rate ≤ 1RH / s; Continued state: triggered if all triggering conditions for the enhanced and completed states are not met, but the absolute temperature change < target amplitude or humidity change rate > 1RH / s. After any state is triggered, at least one detection cycle (1 second) must be maintained to ensure state stability. The target amplitude is the absolute value of the target temperature adjustment value obtained in step S44; when the target temperature is within a range, the midpoint is taken as the target amplitude.
[0111] The criteria for determining whether the adjustment is complete are: the temperature change reaches the target range set by the adjustment parameters, such as a 1°C increase or decrease, and the normalized rate of change of humidity is within a stable range, such as below 1 RH per second. When the adjustment execution data simultaneously meets both of these conditions, the temperature control result is updated to the adjustment complete state. If the temperature change does not reach the target range or the rate of change of humidity is still above the stable range, the temperature control result is updated to the continue adjustment state, indicating that the current adjustment strategy needs to be maintained or strengthened. The final temperature control output adopts a structured record format, consisting of an adjustment status field, a trend direction field, and a cycle flag field. The adjustment status field indicates whether the current temperature adjustment is complete, the trend direction field records the temperature control direction, such as increasing, decreasing, or maintaining, and the cycle flag field indicates whether to continue the cycle adjustment in the next round, serving as the input basis for the next cycle.
[0112] For example, if the adjustment execution data shows that after adopting the heating strategy, the temperature rises from 23°C to 24°C, and the humidity change rate decreases from 3RH per second to below 1RH per second, meeting the target temperature increase of 1°C and the stable rate condition, then the temperature control result is updated to the adjustment completion status. The final temperature control output records the adjustment status as complete, the trend direction as heating, and the cycle marker as terminated, indicating that no further heating is needed, and serves as the basis for the next round of judgment.
[0113] In summary, this invention discloses a temperature control method for smart glasses. Through a multi-layered closed-loop control mechanism involving continuous acquisition and filtering of environmental temperature and humidity data, extraction of change features and dynamic correlation analysis, judgment of fogging risk trends and fusion with historical data, generation of temperature adjustment commands, and updating of lens status feedback, this invention achieves proactive adaptation of lens temperature to various environments and early intervention against fogging risks. This effectively improves the lens's ability to maintain clarity and its wearing stability, providing reliable technical support for real-time temperature control and anti-fog control of smart glasses in complex environments.
[0114] Reference Figure 2 The second embodiment of the present invention provides a temperature control system for smart glasses, comprising: The environmental data acquisition module is used to collect humidity and temperature values from the smart glasses, remove outliers, and format the data to obtain an environmental dataset. The change feature extraction module is used to extract and classify the change features of the humidity value and the temperature value based on the environmental dataset to obtain dynamic correlation features; The trend risk assessment module is used to extract environmental change trend data based on the dynamic correlation features and assess fog risk to obtain risk assessment results. The supplementary data fusion module is used to extract preset historical environmental data to supplement the environmental dataset based on the risk assessment results, and fuse the current temperature information to obtain the target temperature adjustment value; The adjustment command generation module is used to generate a temperature adjustment command based on the target temperature adjustment value and obtain an adjustment response signal. The feature update module is used to monitor the surface state of the lens according to the adjustment response signal and update the dynamic correlation feature to obtain the adjustment parameters for temperature control. The cyclic adjustment module is used to continuously collect new environmental data based on the adjustment parameters and perform cyclic adjustment to obtain the final temperature control output.
[0115] It should be noted that the temperature control system for smart glasses provided in this embodiment of the invention is used to execute all the process steps of the temperature control method for smart glasses in the above embodiment. The working principles and beneficial effects of the two are one-to-one, so they will not be described again.
[0116] This invention also provides an electronic device. The electronic device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, such as a temperature control program for smart glasses. When the processor executes the computer program, it implements the steps described in the various embodiments of the temperature control methods for smart glasses, for example... Figure 1The step S11 shown. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the above-described device embodiments, such as the environmental data acquisition module.
[0117] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the electronic device.
[0118] The electronic device may be a desktop computer, laptop, handheld computer, or smart tablet, etc. The electronic device may include, but is not limited to, a processor and memory. Those skilled in the art will understand that the above components are merely examples of electronic devices and do not constitute a limitation on the electronic device. It may include more or fewer components than described above, or combine certain components, or different components. For example, the electronic device may also include input / output devices, network access devices, buses, etc.
[0119] The processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the electronic device, connecting all parts of the electronic device via various interfaces and lines.
[0120] The memory can be used to store the computer programs and / or modules. The processor implements various functions of the electronic device by running or executing the computer programs and / or modules stored in the memory and by calling data stored in the memory. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, phonebook, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.
[0121] Wherein, if the modules / units integrated in the electronic device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0122] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0123] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the scope of protection of the present invention. In particular, it should be noted that any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention for those skilled in the art.
Claims
1. A temperature control method for smart glasses, characterized in that, include: The humidity and temperature values of the smart glasses are collected, and outlier values are removed and the data format is sorted to obtain an environmental dataset. Based on the environmental dataset, the variation features of the humidity and temperature values are extracted and classified to obtain dynamic correlation features; Based on the dynamic correlation features, environmental change trend data are extracted and fog risk is determined to obtain risk assessment results. Based on the risk assessment results, preset historical environmental data is extracted to supplement the environmental dataset, and the current temperature information is integrated to obtain the target temperature adjustment value; A temperature adjustment command is generated based on the target temperature adjustment value, and an adjustment response signal is obtained; Based on the adjustment response signal, the surface state of the lens is monitored and the dynamic correlation feature is updated to obtain the adjustment parameters for temperature control; Based on the aforementioned adjustment parameters, new environmental data is continuously collected and cyclically adjusted to obtain the final temperature control output.
2. The temperature control method for smart glasses according to claim 1, characterized in that, The process involves collecting humidity and temperature values from the smart glasses, removing outliers, and formatting the data to obtain an environmental dataset, including: Collect the current humidity and temperature values of the smart glasses and record the corresponding time markers to obtain the raw environmental data; The original environmental data is compared and verified according to the preset humidity threshold range and the preset temperature threshold range, and abnormal data is removed to obtain filtered environmental data. The filtered environment data is standardized in terms of units and fields to obtain formatted environment data; The formatted environment data is then subjected to integrity verification and structural integration to obtain the environment dataset.
3. The temperature control method for smart glasses according to claim 1, characterized in that, The step of extracting and classifying the variation features of the humidity and temperature values based on the environmental dataset to obtain dynamic correlation features includes: Humidity and temperature data sequences are extracted from the environmental dataset to obtain environmental change data. The environmental change data is processed in chronological order and its numerical stationarity is verified to obtain a standardized change sequence. Humidity and temperature change features are extracted from the standardized change sequence to obtain a set of change features; The set of changing features is subjected to category judgment and correlation analysis to obtain dynamic correlation features.
4. The temperature control method for smart glasses according to claim 1, characterized in that, The step of extracting environmental change trend data based on the dynamic correlation features and determining fog risk to obtain risk assessment results includes: Based on the dynamic correlation features, humidity and temperature change trends are extracted to obtain environmental change trend data; The environmental change trend data is compared with the preset fog generation conditions to obtain fog triggering indicators; Based on the fog triggering indicators and the current environmental conditions, the risk level is determined to obtain fog risk data; The results of the fog risk data are summarized to obtain the risk assessment results.
5. The temperature control method for smart glasses according to claim 1, characterized in that, The step of extracting preset historical environmental data to supplement the environmental dataset based on the risk assessment results, and integrating current temperature information to obtain the target temperature adjustment value, includes: Based on the risk assessment results, humidity and temperature records are extracted from preset historical environmental data to obtain supplementary environmental data; The supplementary environmental data is sequence-aligned and segment-filtered with the environmental dataset to obtain filtered environmental data. The environmental data selected is compared with the current temperature information to obtain environmental state parameters. The temperature deviation is calculated based on the environmental condition parameters to obtain the target temperature adjustment value.
6. The temperature control method for smart glasses according to claim 1, characterized in that, The step of generating a temperature adjustment command based on the target temperature adjustment value and obtaining an adjustment response signal includes: Based on the target temperature adjustment value, the command generation parameters are extracted to obtain the command adjustment parameters; Logical operations and segment mappings are performed on the instruction adjustment parameters to obtain instruction configuration data; A temperature regulation instruction is constructed based on the instruction configuration data, the temperature regulation instruction is executed and execution feedback is obtained to obtain a regulation response signal.
7. The temperature control method for smart glasses according to claim 1, characterized in that, The step of monitoring the lens surface state and updating the dynamic correlation features based on the adjustment response signal to obtain the temperature control adjustment parameters includes: Based on the adjustment response signal, the clarity and humidity adhesion of the lens surface are monitored to obtain lens status data; The lens state data is combined with the dynamic correlation features to make a correlation judgment, and feature update data is obtained; The dynamic correlation features are updated based on the feature update data to obtain the temperature control adjustment parameters.
8. The temperature control method for smart glasses according to claim 1, characterized in that, The process of continuously collecting new environmental data based on the adjustment parameters and performing cyclic adjustments to obtain the final temperature control output includes: Based on the aforementioned adjustment parameters, new humidity and temperature data are collected to obtain real-time environmental data; Based on the real-time environmental data and the adjustment parameters, a temperature adjustment judgment is made to obtain adjustment execution data; The temperature control result is updated based on the adjustment execution data to obtain the final temperature control output.
9. A temperature control system for smart glasses, characterized in that, include: The environmental data acquisition module is used to collect humidity and temperature values from the smart glasses, remove outliers, and format the data to obtain an environmental dataset. The change feature extraction module is used to extract and classify the change features of the humidity value and the temperature value based on the environmental dataset to obtain dynamic correlation features; The trend risk assessment module is used to extract environmental change trend data based on the dynamic correlation features and assess fog risk to obtain risk assessment results. The supplementary data fusion module is used to extract preset historical environmental data to supplement the environmental dataset based on the risk assessment results, and fuse the current temperature information to obtain the target temperature adjustment value; The adjustment command generation module is used to generate a temperature adjustment command based on the target temperature adjustment value and obtain an adjustment response signal. The feature update module is used to monitor the surface state of the lens according to the adjustment response signal and update the dynamic correlation feature to obtain the adjustment parameters for temperature control. The cyclic adjustment module is used to continuously collect new environmental data based on the adjustment parameters and perform cyclic adjustment to obtain the final temperature control output.
Citation Information
Patent Citations
Wet room mirror control method and device and storage medium
CN115614876A
Automobile rearview mirror heating intelligent control system and method thereof
CN116788155A
Water mist pollution identification and treatment method suitable for lenses
CN118032038A
Intelligent glasses and temperature control method thereof
CN118795959A
Defogging method and device, intelligent glasses and storage medium
CN121174312A