Method and apparatus for adjusting measurement signal, electronic device, and storage medium

CN122767792APending Publication Date: 2026-09-18GUANGDONG JIUZHI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611102751.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-23
Publication Date
2026-09-18

AI Technical Summary

Technical Problem

[0004]本申请的实施例提供了一种测量信号的调节方法及装置、电子设备、存储介质,以解决测量信号的调节效率和调节准确度较差的问题

Benefits of technology

[0018] In the technical solution provided by the embodiments of this application, on the one hand, by determining the current measurement scenario, the historical adjustment parameters corresponding to the current measurement scenario are directly reused, and the initial driving parameters of the light source module are directly determined based on the historical parameters. There is no need to start from scratch and explore step by step, skipping a large number of invalid parameter traversal steps, greatly shortening the driving parameter adaptation time, and significantly improving the adjustment efficiency of the measurement signal. On the other hand, by using the historical adjustment parameters corresponding to the current measurement scenario as the initial value, and then combining the sampled values ​​of the measurement signal in real time to perform closed-loop dynamic adjustment, it is possible to adapt to the current actual working conditions, individual differences and wearing status in real time, dynamically correct the driving parameter deviation, avoid the limitations of general fixed data, greatly improve the matching accuracy of the light source driving parameters under complex working conditions and extreme scenarios, thereby improving the adjustment accuracy of the measurement signal.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122767792A_ABST
    Figure CN122767792A_ABST
Patent Text Reader

Abstract

The embodiments of this application disclose a method, apparatus, electronic device, and storage medium for adjusting measurement signals. In this method, on the one hand, by determining the current measurement scenario, the historical adjustment parameters corresponding to the current measurement scenario are directly reused, and the initial driving parameters of the light source module are directly determined based on the historical parameters. This eliminates the need for step-by-step probing from scratch, skips a large number of invalid parameter traversal steps, significantly shortens the driving parameter adaptation time, and significantly improves the adjustment efficiency of the measurement signal. On the other hand, by using the historical adjustment parameters corresponding to the current measurement scenario as initial values ​​and combining them with the sampled values ​​of the real-time sampled measurement signal for closed-loop dynamic adjustment, it can adapt to the current actual working conditions, individual differences, and wearing status in real time, dynamically correct driving parameter deviations, avoid the limitations of general fixed data, and significantly improve the matching accuracy of light source driving parameters under complex working conditions and extreme scenarios, thereby improving the adjustment accuracy of the measurement signal.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information recommendation technology, and more specifically, to a method and apparatus for adjusting measurement signals, an electronic device, and a storage medium. Background Technology

[0002] Wearable devices typically detect physiological parameters by incorporating a light source module and a photodetector. The light source module emits detection light, and the photodetector receives the reflected signal, thus completing the sampling and analysis of the relevant measurement signal. However, the quality of the acquired measurement signal is highly dependent on the configuration of the light source module's driving parameters and is easily affected by various factors in the measurement scenario, such as the device's wearing status, individual user differences, and changes in environmental conditions. Therefore, it is necessary to adjust the driving parameters of the light source module to ensure that the measurement signal remains stable within the effective acquisition range.

[0003] In traditional implementations, driving parameter adjustment is often achieved through step-by-step trial and error or static lookup table methods. Step-by-step trial and error requires incrementally increasing or decreasing the light source driving parameters in fixed steps, necessitating a re-trial from default parameters each time the system starts, resulting in low signal adjustment efficiency. Static lookup table methods rely on offline mapping relationships to match driving parameters, depending on universally fixed data, which can easily lead to parameter mismatch issues under extreme conditions, resulting in poor signal adjustment accuracy. Therefore, a method that can guarantee both signal adjustment efficiency and accuracy is urgently needed. Summary of the Invention

[0004] The embodiments of this application provide a method and apparatus for regulating measurement signals, an electronic device, and a storage medium to solve the problems of poor regulation efficiency and accuracy of measurement signals.

[0005] According to one aspect of the embodiments of this application, a method for adjusting a measurement signal is provided, comprising: determining a current measurement scenario and obtaining historical adjustment parameters corresponding to the current measurement scenario; determining initial driving parameters of a light source module in a wearable device based on the historical adjustment parameters; driving the light source module based on the initial driving parameters and obtaining a measurement signal sampling value obtained by the wearable device through signal sampling; performing closed-loop adjustment of the driving parameters of the light source module based on the measurement signal sampling value to obtain a target adjustment parameter corresponding to the current measurement scenario, and driving the light source module based on the target adjustment parameter to make the measurement signal within a preset range.

[0006] In another exemplary embodiment, determining the initial driving parameters of the light source module in the wearable device based on the historical adjustment parameters includes: validating the historical adjustment parameters and obtaining a verification result; if the verification result indicates that the historical adjustment parameters are within a preset safety range, then using the historical condition parameters as the initial driving parameters; if the verification result indicates that the historical adjustment parameters are not within the preset safety range, then obtaining the default parameters corresponding to the current measurement scenario and using the default parameters as the initial driving parameters.

[0007] In another exemplary embodiment, the step of performing closed-loop adjustment of the driving parameters of the light source module based on the sampled values ​​of the measurement signal to obtain the target adjustment parameters corresponding to the current measurement scenario includes: determining the corresponding state of the closed-loop adjustment state machine based on the sampled values ​​of the measurement signal; if the corresponding state of the closed-loop adjustment state machine is an adjustment state, calculating the error between the average value of the measurement signal and the target value of the measurement signal; calculating the proportional term, integral term, and derivative term corresponding to the error, and performing output limiting and integral anti-saturation processing on the weighted sum of the three terms to obtain the driving parameter adjustment amount; superimposing the driving parameter adjustment amount with the input driving parameters of the closed-loop adjustment in the current cycle to obtain the output driving parameters of the closed-loop adjustment in the current cycle, and determining the target adjustment parameters corresponding to the current measurement scenario based on the output driving parameters.

[0008] In another exemplary embodiment, determining the corresponding state of the closed-loop regulating state machine based on the sampled values ​​of the measured signal includes: calculating the average value of the sampled values ​​of the measured signal to obtain the average value of the measured signal; if the average value of the measured signal is greater than or equal to a preset saturation threshold, then determining the corresponding state of the closed-loop regulating state machine as a saturation state; if the error between the average value of the measured signal and the target value of the measured signal is within a first preset range, and the average value of the measured signal satisfies a preset signal stability judgment condition, then determining the corresponding state of the closed-loop regulating state machine as a holding state; if the closed-loop regulating state machine is not in the saturation state or the holding state, and no parameter periodic oscillation is detected, then confirming the corresponding state of the closed-loop regulating state machine as an adjustment state.

[0009] In another exemplary embodiment, determining the target adjustment parameter corresponding to the current measurement scenario based on the output driving parameter includes: if the output driving parameter is the same as the input driving parameter, then the output driving parameter is used as the target adjustment parameter corresponding to the current measurement scenario; if the output driving parameter is different from the input driving parameter, then the output driving parameter is used as the input driving parameter for the closed-loop adjustment of the next cycle for the next cycle of closed-loop adjustment.

[0010] In another exemplary embodiment, the method further includes: if the corresponding state of the closed-loop regulation state machine is a saturation state, then the input driving parameter of the closed-loop regulation in this cycle is down-adjusted according to a preset ratio; and the down-adjusted driving parameter is used as the output driving parameter of the closed-loop regulation in this cycle.

[0011] In another exemplary embodiment, the method further includes: if the corresponding state of the closed-loop regulation state machine is a hold state, then performing a security detection on the sampled value of the measurement signal to obtain a security detection result; if the security detection result indicates that the sampled value of the measurement signal is not within a second preset range, then accumulating a timeout period; when the accumulated timeout period reaches a preset time threshold, and the sampled value of the measurement signal is not within a first preset range, then switching the hold state to a regulation state; wherein, the first preset range is smaller than the second preset range.

[0012] In another exemplary embodiment, the method further includes: if the corresponding state of the closed-loop adjustment state machine is an adjustment state, then performing parameter periodic oscillation detection based on the target driving parameters in the annular buffer to obtain an oscillation detection result; wherein the annular buffer stores the driving parameters of the light source module after each adjustment; if the oscillation detection result indicates that there is parameter periodic oscillation, then performing oscillation suppression processing to obtain the output driving parameters of the closed-loop adjustment in this cycle.

[0013] In another exemplary embodiment, the step of performing oscillation suppression processing to obtain the output driving parameter of the current cycle closed-loop adjustment if the oscillation detection result indicates the existence of parameter periodic oscillation includes: determining a safety driving parameter based on the driving parameter within a preset range in the annular buffer; if the safety driving parameter is not within the preset range, obtaining the default parameter corresponding to the current measurement scenario and using the default parameter as the output driving parameter of the current cycle closed-loop adjustment; if the safety driving parameter is within the preset range, using the safety driving parameter as the output driving parameter of the current cycle closed-loop adjustment.

[0014] In another exemplary embodiment, the method further includes updating the target adjustment parameter to a storage area in a preset storage unit corresponding to the current measurement scenario.

[0015] According to one aspect of the embodiments of this application, a measurement signal adjustment device is provided, comprising: a first acquisition module, a determination module, a second acquisition module, and a closed-loop adjustment module; wherein, the first acquisition module is configured to determine a current measurement scenario and acquire historical adjustment parameters corresponding to the current measurement scenario; the determination module is configured to determine initial driving parameters of a light source module in a wearable device based on the historical adjustment parameters; the second acquisition module is configured to drive the light source module based on the initial driving parameters and acquire measurement signal sampling values ​​obtained by signal sampling by the wearable device; the closed-loop adjustment module is configured to perform closed-loop adjustment of the driving parameters of the light source module based on the measurement signal sampling values ​​to obtain target adjustment parameters corresponding to the current measurement scenario, and drive the light source module based on the target adjustment parameters to make the measurement signal within a preset range.

[0016] According to one aspect of the embodiments of this application, an electronic device is provided, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the measurement signal adjustment method as described above.

[0017] According to one aspect of the embodiments of this application, a computer-readable storage medium is provided, on which computer-readable instructions are stored, which, when executed by a computer's processor, cause the computer to perform the measurement signal adjustment method as described above.

[0018] In the technical solution provided by the embodiments of this application, on the one hand, by determining the current measurement scenario, the historical adjustment parameters corresponding to the current measurement scenario are directly reused, and the initial driving parameters of the light source module are directly determined based on the historical parameters. There is no need to start from scratch and explore step by step, skipping a large number of invalid parameter traversal steps, greatly shortening the driving parameter adaptation time, and significantly improving the adjustment efficiency of the measurement signal. On the other hand, by using the historical adjustment parameters corresponding to the current measurement scenario as the initial value, and then combining the sampled values ​​of the measurement signal in real time to perform closed-loop dynamic adjustment, it is possible to adapt to the current actual working conditions, individual differences and wearing status in real time, dynamically correct the driving parameter deviation, avoid the limitations of general fixed data, greatly improve the matching accuracy of the light source driving parameters under complex working conditions and extreme scenarios, thereby improving the adjustment accuracy of the measurement signal.

[0019] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0020] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. It is obvious that the drawings described below are merely some embodiments of this application, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort. In the drawings:

[0021] Figure 1 This is a schematic diagram of an implementation environment related to the method for adjusting a measurement signal as illustrated in an exemplary embodiment of this application; Figure 2 This is a flowchart illustrating a method for adjusting a measurement signal, as shown in an exemplary embodiment of this application; Figure 3 yes Figure 2 The flowchart of step S220 in the illustrated embodiment, which describes a method for determining initial driving parameters in an exemplary embodiment, is shown. Figure 4 yes Figure 2 The flowchart of step S240 in the illustrated embodiment is a method for performing closed-loop adjustment in an exemplary embodiment; Figure 5 This is a flowchart illustrating a method for determining the corresponding state of a closed-loop regulating state machine, as shown in an exemplary embodiment of this application. Figure 6 This is a flowchart of another method for adjusting a measurement signal provided in an embodiment of this application; Figure 7 This is a flowchart of another method for adjusting a measurement signal provided in an embodiment of this application; Figure 8 This is a flowchart of another method for adjusting a measurement signal provided in an embodiment of this application; Figure 9 yes Figure 8 The flowchart of step S820 in the illustrated embodiment is a method for performing oscillation suppression processing in an exemplary embodiment; Figure 10 This is a flowchart illustrating the adjustment of the measurement signal for different states, as shown in an exemplary embodiment of this application; Figure 11 This is a flowchart illustrating multi-cycle oscillation detection and suppression based on a circular buffer, as shown in an exemplary embodiment of this application; Figure 12 This is an exemplary embodiment of the present application illustrating an application of adjusting a measurement signal; Figure 13 This is a schematic diagram illustrating the structure of a measurement signal conditioning device according to an exemplary embodiment of this application; Figure 14A schematic diagram of the structure of a computer system suitable for implementing the electronic device of the present application is shown. Detailed Implementation

[0022] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments identical to those described in this application. Rather, they are merely examples of apparatuses and methods identical to some aspects of this application as detailed in the appended claims.

[0023] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities can be implemented as application programs, in one or more hardware modules or integrated circuits, or in different models and / or processor devices and / or microcontroller devices.

[0024] The flowcharts shown in the accompanying drawings are merely illustrative and do not necessarily include all content and operations / steps, nor do they necessarily have to be performed in the described order. For example, some operations / steps can be broken down, while others can be combined or partially combined; therefore, the actual execution order may change depending on the specific circumstances.

[0025] It should be noted that "multiple" as mentioned in this application refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.

[0026] Before providing a further detailed description of the embodiments of this application, the nouns and terms used in the embodiments of this application are explained, and the nouns and terms used in the embodiments of this application shall be interpreted as follows: Measurement signals refer to physiological parameter detection signals obtained through optical sensing. These signals characterize the periodic fluctuations in human blood volume and can be used to analyze multiple physiological parameters such as heart rate, blood oxygen saturation, and vascular elasticity. They can be applied to various health monitoring scenarios, including heart rate monitoring, blood oxygen assessment, and sleep apnea identification. In some embodiments, the measurement signal may be a photoplethysmography (PPG) signal.

[0027] Photoplethysmography (PPG) signals are measurement signals acquired using the photoplethysmography method. They are primarily used for non-invasive detection of periodic changes in blood volume, thereby reflecting physiological parameters such as heart rate, blood oxygen saturation, and vascular elasticity. In some embodiments, PPG signals can be used for different scenarios, including heart rate, blood oxygenation, and sleep apnea.

[0028] Wearable devices refer to portable electronic devices that integrate a light source module and a photodetector, such as smartwatches, smart rings, and smart bracelets. When a wearable device is worn on a target detection area of ​​the human body, the light source module, such as an LED light, illuminates the tissue at the wearing site. The photodetector then receives the light that has passed through the tissue or been reflected back by the blood. The human heartbeat causes regular increases and decreases in the blood volume within the arteries, resulting in synchronous periodic fluctuations in the intensity of the received light. This light intensity fluctuation signal is ultimately converted into a PPG signal. In some embodiments, the light source module may include at least one of a green light, a red light, and an infrared emitter; the number and type can be specifically configured based on different measurement scenarios.

[0029] Proportional-Integral-Derivative (PID) closed-loop control is one of the most widely used closed-loop feedback control algorithms in control systems. Its core idea is to comprehensively calculate the error between the set target value and the actual output value using proportional, integral, and derivative methods, thereby adjusting the system's control signal to enable the controlled object to quickly, stably, and accurately reach the target state. Specifically, PID closed-loop control includes three adjustments: proportional adjustment, integral adjustment, and derivative adjustment. Proportional adjustment refers to adjusting the output in real time based on the current error magnitude to quickly reduce the deviation and improve response speed. Integral adjustment refers to accumulating historical deviations to eliminate the system's static steady-state error and ensure steady-state accuracy. Derivative adjustment refers to predicting the trend of deviation changes, suppressing overshoot in advance, mitigating fluctuations, and improving system stability.

[0030] In some embodiments, the wearable device of this application is a smart ring, which includes a microcontroller (MCU), an integrated analog front-end (AFE), and non-volatile memory (Flash / EEPROM). The AFE integrates an adjustable light source module driver circuit (250µA step accuracy), a multi-channel photodetector receiving circuit, and an ADC sampling circuit (typically with a resolution of 20 bits or higher). The sampling interval can be set according to the specific measurement scenario; for example, in a heart rate detection scenario, the sampling interval is set to 40ms.

[0031] Microcontroller: The main control unit of the system, responsible for logic control, algorithm execution (such as heart rate calculation and motion artifact correction) and task scheduling.

[0032] Non-volatile memory: used to store AFE configuration parameters (such as initial values ​​of drive current), raw PPG data measured offline, or historical records of processed physiological indicators.

[0033] Adjustable light source module driver circuit: precisely controls the brightness of the LED. The small 250µA step means that the light intensity can be finely adjusted according to skin tone or tightness of the clothing, ensuring that the amplitude of the PPG signal received by the detector is moderate (neither saturated nor too weak), which is a prerequisite for obtaining a high-quality "measurement signal".

[0034] Multi-channel photodetector receiving circuit: It can receive reflected light of different wavelengths (such as green, red, and infrared) simultaneously or in time-division manner, providing independent signal channels for blood oxygenation or multispectral vascular assessment.

[0035] High-resolution ADC sampling circuit: converts minute changes in photocurrent into digital signals. The 20-bit high resolution captures minute diphtheria wave details and subtle fluctuations under low perfusion in the PPG signal, ensuring the fidelity of the measurement signal.

[0036] In traditional implementations, driving parameter adjustment is often achieved through step-by-step trial and error or static lookup table methods. Step-by-step trial and error requires incrementally increasing or decreasing the light source driving parameters in fixed steps, necessitating a re-trial from default parameters each time the system starts, resulting in low signal adjustment efficiency. Static lookup table methods rely on offline mapping relationships to match driving parameters, depending on universally fixed data, which can easily lead to parameter mismatch issues under extreme conditions, resulting in poor signal adjustment accuracy. Therefore, a method that can guarantee both signal adjustment efficiency and accuracy is urgently needed.

[0037] Based on this, embodiments of this application provide a method and apparatus for adjusting measurement signals, an electronic device, and a computer-readable storage medium, which can solve the problems of poor adjustment efficiency and accuracy of measurement signals. The implementation environment of the measurement signal adjustment method provided in the embodiments of this application will be described below.

[0038] This application provides a method for adjusting a measurement signal, which can be applied to, for example... Figure 1 In the implementation environment shown, such as Figure 1 As shown, the measurement signal adjustment environment provided in this application includes a terminal 110 and a server 120. The measurement signal adjustment method provided in this application can be executed by the terminal 110 or the server 120, or it can be executed collaboratively by the terminal 110 and the server 120.

[0039] The terminal 110 and the server 120 can communicate via a network. This network can be a wired network or a wireless network. Therefore, the terminal 110 and the server 120 can be directly or indirectly connected via wired or wireless communication. For example, the terminal 110 can be indirectly connected to the server 120 via a wireless access point, or the terminal 110 can be directly connected to the server 120 via the Internet; this application does not impose any limitations on this.

[0040] Terminal 110 may include, but is not limited to, mobile phones, tablets, wearable devices (e.g., smart rings, smartwatches, smart bracelets, smart helmets, etc.), in-vehicle devices, smart home devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, personal digital assistants (PDAs), etc.

[0041] Server 120 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms. Different services can be deployed on the same server or on different servers. The data storage system can store the data that server 120 needs to process. This data storage system can be set up independently, integrated into server 120, or placed in the cloud or on other servers.

[0042] It should be noted that, Figure 1 The number of terminals and servers is for illustrative purposes only and does not constitute an actual limitation of this application.

[0043] The following will be combined with the appendix Figure 2 The method for adjusting the measurement signal provided in the embodiments of this application will be described in detail.

[0044] Please see Figure 2 , Figure 2 This is a flowchart illustrating a method for adjusting a measurement signal, as shown in an exemplary embodiment of this application. The method can be executed by a computer device, which can be... Figure 1The implementation environment shown includes terminal 110 or server 120. Of course, this method can also be applied to other implementation environments and executed by terminals or servers in other implementation environments, and this embodiment does not limit this.

[0045] like Figure 2 As shown, in an exemplary embodiment, the method for adjusting the measurement signal includes at least steps S210 to S240, which are described in detail below: Step S210: Determine the current measurement scenario and obtain the historical adjustment parameters corresponding to the current measurement scenario.

[0046] In this embodiment, the wearable device presets multiple measurement scenarios, including but not limited to heart rate detection, blood oxygen detection, and sleep apnea detection. The light source working mode, target signal amplitude, and current adjustment range differ for each measurement scenario. When the wearable device is powered on or the measurement function is activated, it first identifies the current measurement scenario triggered by the user, and then retrieves the pre-stored historical adjustment parameters that uniquely correspond to the measurement scenario from the wearable device's non-volatile memory.

[0047] In some embodiments, the historical adjustment parameters are the driving parameters of the light source module that have stabilized after closed-loop adjustment and convergence in the same measurement scenario on the wearable device. The historical adjustment parameters may include multi-channel driving parameters, such as the driving parameters corresponding to the red light, the green light, and the infrared light. In some embodiments, the driving parameter of the light source module is the driving current, and the historical adjustment parameters are the historical driving current.

[0048] For example, in the case of a wearable device like a smart ring, when a user triggers the heart rate measurement function, the device determines that the current measurement scenario is a heart rate measurement scenario and automatically retrieves the historical adjustment parameters of the light source module corresponding to the heart rate measurement scenario from its memory. If the user switches to blood pressure measurement, the historical adjustment parameters for the blood pressure measurement scenario are retrieved accordingly. The parameters for different scenarios are independent and do not interfere with each other. In this way, this embodiment of the application matches the historically optimal parameters by classifying scenarios, eliminating the need to iterate and adjust from scratch for each measurement, significantly shortening the measurement signal stabilization time and improving the measurement startup speed. At the same time, it achieves differentiated adaptation of parameters for different measurement scenarios, avoiding the problem that a single parameter cannot adapt to the measurement needs of multiple scenarios, laying the foundation for subsequent precise dimming and signal acquisition.

[0049] Step S220: Determine the initial driving parameters of the light source module in the wearable device based on the historical adjustment parameters.

[0050] In this embodiment, since the historical adjustment parameters are the driving parameters after the previous measurement scenario has stabilized, although they have scenario adaptability, they may still have problems such as operating condition mismatch and lag. Therefore, this embodiment does not directly reuse the historical adjustment parameters as the initial driving parameters. Instead, it uses the historical adjustment parameters as a reference benchmark and verifies and optimizes them by combining one or more of the following: the current real-time operating condition of the device, hardware status, environmental conditions, and scenario parameter specifications, thereby determining the initial driving parameters that are suitable for the current measurement scenario. This avoids the safety hazards caused by historical extreme operating condition parameters under the same measurement scenario, as well as the problem that the lag of historical parameters makes it difficult to adapt to the current real-time operating condition.

[0051] In some embodiments, combined with Figure 3 As shown, Figure 3 yes Figure 2 The flowchart of step S220 in the illustrated embodiment, which describes a method for determining initial driving parameters in an exemplary embodiment, includes at least steps S310 to S320, and is explained in detail below: Step S310: Verify the validity of the historical adjustment parameters and obtain the verification results.

[0052] Validity verification refers to comparing historical adjustment parameters with the corresponding safety parameter range of the light source module to determine whether the historical adjustment parameters are safe. In this embodiment, by verifying the validity of historical adjustment parameters, abnormal historical extreme parameters can be screened in advance, avoiding the risk of light source overload operation from the source. Furthermore, it can unify parameter judgment standards and achieve standardized filtering of historical parameters across all scenarios.

[0053] In some embodiments, the historical adjustment parameters include multi-channel drive parameters, with different channel drive parameters corresponding to different safety parameter ranges. For example, the safety parameter range for a green light is 50–6300 × 10 µA, for a red light it is 500–6300 × 10 µA, and for an infrared light it is 300–6300 × 10 µA.

[0054] Step S320: If the verification result indicates that the historical adjustment parameters are within the preset safe range, then the historical condition parameters are used as the initial driving parameters.

[0055] In some embodiments, after the historical adjustment parameters have been validated, if the driving parameters of each channel are within their respective safe parameter ranges, then the historical adjustment parameters are considered to be suitable for the current similar measurement scenario, have no safety risks, and have a high degree of operating condition matching. Therefore, no recalculation or configuration is required, and these historical adjustment parameters are directly reused as the initial driving parameters for the current startup of the light source module, completing the light source initialization driving settings. In this way, through the scenario-based historical adjustment parameter hot-start mechanism, the optimal parameters can be directly reused for continuous measurements by the same user. This shortens the device startup and acquisition response time and ensures that the initial input value for subsequent closed-loop control is the historical optimal solution or a safe solution, making the measurement signal stable immediately at the start of measurement. The startup time is reduced from several seconds in traditional methods to milliseconds, significantly improving the user experience.

[0056] Step S330: If the verification result indicates that the historical adjustment parameters are not within the preset safety range, then obtain the default parameters corresponding to the current measurement scenario and use the default parameters as the initial driving parameters.

[0057] In this embodiment, if the historical adjustment parameter exceeds the preset safety range, it is considered that the historical adjustment parameter cannot be reused. At this time, the standard default driving parameter specific to the current measurement scenario is retrieved and replaced with the historical adjustment parameter as the initial driving parameter for the formal start of the light source module, ensuring safe device startup and normal operation of basic measurement functions.

[0058] Step S230: Drive the light source module based on the initial driving parameters and obtain the measurement signal sampling value obtained by the wearable device.

[0059] In this embodiment, the wearable device drives the light source module to operate using determined initial driving parameters, causing the light source module to emit detection light of corresponding intensity. The light shines onto the skin of the user's wearing area, and after reflection by subcutaneous blood vessels and tissues, it forms reflected light, which is received by the device's photodetector and converted into a measurement signal, such as a PPG signal. The wearable device periodically samples and converts the measurement signal according to a fixed sampling period (e.g., 40ms), ultimately obtaining multiple sets of continuous measurement signal sample values ​​that can be used for computational analysis, providing raw feedback data for subsequent closed-loop adjustment.

[0060] Step S240: Perform closed-loop adjustment of the driving parameters of the light source module based on the sampled value of the measurement signal to obtain the target adjustment parameters corresponding to the current measurement scenario, and drive the light source module based on the target adjustment parameters so that the measurement signal is within the preset range.

[0061] In this embodiment, the real-time acquired measurement signal sample value is used as feedback, and the light source driving parameters are dynamically optimized through a PID closed-loop control algorithm. In some embodiments, the closed-loop adjustment specifically includes a series of operations such as dynamic scaling of PID coefficients, signal error calculation, differential term operation, PID output calculation, anti-integral saturation processing, current step limit and alignment, etc., ultimately outputting the optimal change in driving parameters, and iteratively updating the driving parameters of the light source module based on this change in driving parameters. After multiple cycles of closed-loop iteration, once the measurement signal stabilizes, the target adjustment parameters adapted to the current user and the current measurement environment are converged. Finally, the device continuously drives the light source module with these target adjustment parameters, so that the measurement signal is stably maintained within the preset optimal amplitude range, ensuring measurement accuracy.

[0062] In some embodiments, combined with Figure 4 As shown, Figure 4 yes Figure 2 The flowchart of the method for performing closed-loop adjustment in step S240 of the illustrated embodiment is shown in an exemplary embodiment, and includes at least steps S410 to S440, which are explained in detail below: Step S410: Determine the corresponding state of the closed-loop control state machine based on the sampled values ​​of the measurement signal.

[0063] It is understandable that, due to real-time changes in user comfort, sweating at the wearing area, skin color, ambient light interference, and physiological state, the initial driving parameters often need adjustment to achieve the optimal signal-to-noise ratio. Based on this, this application's embodiment introduces a closed-loop adjustment state machine to monitor and dynamically adjust the measurement signal in real time. This state machine defines different states (such as idle state, adjustment state, hold state, and saturation state) to manage the iterative convergence process of the light source module's driving parameters, ensuring that the measurement signal is quickly and accurately locked within the target amplitude window.

[0064] In this embodiment, before executing the specific closed-loop adjustment algorithm, the system first needs to evaluate the current measurement environment and map it to a specific state of the closed-loop adjustment state machine. The state here defines the system's current behavior mode, mainly including idle state, adjustment state, hold state, and saturation state. The idle state indicates that the dimming process has not started, or is in standby mode after the current measurement has ended. The adjustment state indicates that the average value of the measured signal deviates from the target value, allowing the execution of specific closed-loop calculations and driver parameter updates. The hold state indicates a steady state where the error between the average value of the measured signal and the target value is within a preset range, and the short-term signal fluctuation is below a stable threshold, or the signal fluctuation tends to stabilize, temporarily stopping the closed-loop adjustment action. The saturation state indicates that the average value of the measured signal has reached its upper limit, triggering a downward adjustment of the driver parameters.

[0065] In some embodiments, combined with Figure 5 As shown, Figure 5 This is a flowchart illustrating a method for determining the corresponding state of a closed-loop regulating state machine, as shown in an exemplary embodiment of this application. It includes at least steps S510 to S540, which are explained in detail below: Step S510: Calculate the average value of the sampled measurement signal to obtain the average value of the measurement signal.

[0066] Step S520: If the average value of the measured signal is greater than or equal to the preset saturation threshold, then the corresponding state of the closed-loop control state machine is determined to be the saturation state.

[0067] For example, the saturation threshold could be 524,000.

[0068] In other embodiments, whether the corresponding state of the closed-loop regulating state machine is saturated can also be determined by detecting whether a hardware saturation flag is valid. For example, if the hardware saturation flag is detected as valid, this determines that the corresponding state of the closed-loop regulating state machine is saturated.

[0069] Step S530: If the error between the average value of the measured signal and the target value of the measured signal is within the first preset range, and the average value of the measured signal meets the preset signal stability judgment condition, then the corresponding state of the closed-loop control state machine is determined to be the holding state.

[0070] In some embodiments, the first preset range may be 300,000 to 500,000; the preset signal stability judgment condition may include any one of the following sub-conditions: sub-condition 1, the measured signal fluctuation is less than the stability threshold (e.g., 40,000), which indicates that the current value is close to the target value; sub-condition 2, the stability timeout counter reaches a preset number (e.g., 5 times), which indicates that although the fluctuation threshold has not been reached after multiple consecutive samplings, the value has tended to stabilize.

[0071] For example, when the error between the average value of the measured signal and the target value of the measured signal is within a first preset range, and the measured signal meets the preset signal stability judgment conditions, the stability timeout counter can be cleared, the stability flag bit can be set to true, and the corresponding state of the closed-loop adjustment state machine can be switched to the hold state to stop the closed-loop adjustment and lock the current driving parameters. This allows for the maintenance of a constant light source driving intensity and stable output of high-quality measurement signals when the signal is stable without significant fluctuations and the measurement scenario and wearing status remain unchanged.

[0072] Step S540: If the closed-loop control state machine is not in a saturated state or a holding state, and no periodic oscillation of parameters is detected, then the corresponding state of the closed-loop control state machine is confirmed to be a control state.

[0073] In this embodiment, after determining the saturation state and the hold state sequentially, the system further detects whether there is an abnormal adjustment phenomenon of periodic back-and-forth oscillation between the driving parameters and the measurement signal. If there is no signal saturation, no steady-state standard is reached, and no abnormal adjustment oscillation exists, it is determined that continuous parameter correction is needed. The state machine is then switched to the adjustment state, and the PID closed-loop adjustment process is formally initiated to obtain the target adjustment parameters for dynamically correcting the driving parameters of the light source module.

[0074] Step S420: If the corresponding state of the closed-loop control state machine is the control state, then calculate the error between the average value of the measured signal and the target value of the measured signal.

[0075] In this embodiment, after entering the adjustment state, instantaneous noise interference in the sampled signal is first eliminated. The arithmetic mean of multiple consecutive sets of measured signal sample values ​​is calculated to represent the current actual measured signal amplitude. The difference between this actual average value and the target signal value specific to the current measurement scenario pre-stored by the device is calculated to obtain the error required for closed-loop control. At the same time, a scaling factor is used to normalize the error, bringing the value to the range suitable for the PID algorithm. Dynamically scaling the PID coefficient according to the sampling interval can maintain the stability of the control loop.

[0076] In some embodiments of this application, the PID coefficients can be dynamically scaled according to the actual sampling interval. After obtaining the scaled PID coefficients, they can be cached in the context, and the PID coefficients can be recalculated when the sampling interval changes. Here, the PID coefficients refer to the proportional coefficient, integral coefficient, and derivative coefficient.

[0077] For example, using 10ms as a baseline, the scaling factor = actual sampling interval / 10ms.

[0078] Scaling factor = Original scaling factor × Scaling factor; Scaling value of integral coefficient = Original integral coefficient / Scaling ratio; Scaling value of differential coefficients = Original differential coefficients × Scaling ratio.

[0079] In some embodiments, the function for calculating the error can be expressed as:

[0080] in, Used to represent error. Used to represent the target value of the measured signal. Used to represent the average value of a measured signal Used to represent scaling factors, for example, scaling factor This reduces the measurement signal to a reasonable range.

[0081] Step S430: Calculate the proportional term, integral term, and derivative term corresponding to the error, and perform output limiting and integral anti-saturation processing on the weighted sum of the three terms to obtain the driving parameter adjustment amount.

[0082] In this embodiment, output limiting refers to setting an upper limit (e.g., 300) on the original output (i.e., the weighted sum of the proportional, integral, and derivative terms) to obtain the final output, thus preventing the adjustment from exceeding the limit. Integral anti-saturation processing means that integral accumulation is only performed if the original output has not reached the upper limit, and the integral term is limited (e.g., 200). If the output has already saturated (i.e., reached the limit), integral accumulation is paused. This prevents continuous accumulation of integrals from causing subsequent adjustment lag and signal overshoot, ultimately resulting in a compliant change in the adjustment parameter output.

[0083] In some embodiments, the function for calculating the scaling term can be expressed as:

[0084] in, Used to represent proportions. Used to represent error. Used to represent the scaling factor.

[0085] In some embodiments, the function for calculating the integral term can be expressed as:

[0086] in, Used to represent integral terms. Used to represent the current accumulated points. Used to represent the cumulative integral of the previous period Used to represent the scaling value of the integral coefficient. Used to represent error. Used to indicate the sampling interval.

[0087] In some embodiments, the function for calculating the differential term can be expressed as:

[0088] in, Used to represent proportions. Used to represent the rate of change of error Used to indicate the current error. Used to indicate the error of the previous cycle. Used to indicate the sampling interval Used to represent the scaling value of the differential coefficient.

[0089] Step S440: The driving parameter adjustment amount is superimposed with the input driving parameter of the closed-loop adjustment in this cycle to obtain the output driving parameter of the closed-loop adjustment in this cycle, and the target adjustment parameter corresponding to the current measurement scenario is determined based on the output driving parameter.

[0090] In some embodiments, after numerically superimposing the input drive parameters of the current cycle with the drive parameter adjustment amount, the parameter variation can be limited to a minimum step (25×10µA) and a maximum step (300×10µA) to prevent sudden current changes. Then, step alignment (aligned to 25×10µA) and range clamping (limited to a preset minimum and maximum allowable current) are performed to finally obtain the output drive parameters of the closed-loop adjustment for the current cycle. The closed-loop adjustment process is then continuously iterated cycle by cycle until the drive parameters no longer change significantly within several consecutive cycles and the measurement signal stably matches the target value. The converged and finalized output drive parameters are the final target adjustment parameters adapted to the current measurement scenario and the user.

[0091] In some embodiments of this application, the target adjustment parameter corresponding to the current measurement scenario can be determined based on the output driving parameters through the following process: Step S441: If the output driving parameter is the same as the input driving parameter, then the output driving parameter is used as the target adjustment parameter corresponding to the current measurement scenario.

[0092] In this embodiment, if the output driving parameter is the same as the input driving parameter, it can be considered that the current driving parameter (i.e., the input driving parameter) has stabilized the measurement signal within a preset range. At this point, the signal deviation has been eliminated, and the adjustment system has reached a steady state. Therefore, this stable and unchanging driving parameter is directly determined as the target adjustment parameter specific to the current measurement scenario. In subsequent measurement processes, this parameter can be used for constant driving for a long time without starting a new round of parameter correction.

[0093] Step S442: If the output driving parameter is different from the input driving parameter, then the output driving parameter is used as the input driving parameter for the closed-loop adjustment of the next cycle.

[0094] In this embodiment, when the output driving parameter obtained from the current adjustment cycle changes compared to the input driving parameter at the beginning of the cycle, it indicates that the current measured signal is still not close to the target range, and the light source intensity still needs continuous correction. Therefore, the updated output driving parameter is assigned as the initial input driving parameter for the next round of PID closed-loop adjustment, and a new round of signal sampling, error calculation, PID operation, and parameter correction is initiated, gradually reducing the signal deviation and continuously approaching the optimal driving parameter.

[0095] In other embodiments, after obtaining the target adjustment parameters, the target adjustment parameters are updated to the storage area in the preset storage unit corresponding to the current measurement scenario.

[0096] For example, in this embodiment, the target adjustment parameter can be stored in the backup area of ​​the corresponding measurement scenario and each channel in the non-volatile memory, thereby achieving data persistence and backup of the stable adjustment parameter. The parameter is written at the first constant cycle after each stabilization, without the need for additional delay.

[0097] Please continue reading. Figure 6 , Figure 6 This is a flowchart of another method for adjusting a measurement signal provided in an embodiment of this application. This method for adjusting the measurement signal can be executed by a computer device, which can be... Figure 1 The terminal 110 or server 120 shown. Figure 6 As shown, the method for adjusting the measurement signal may include at least steps S610 to S640, which are explained in detail below: Step S610: Determine the corresponding state of the closed-loop control state machine based on the sampled values ​​of the measurement signal.

[0098] In some embodiments, the specific implementation of obtaining the initial sleep data of the user to be detected within a preset time range in step S510 can be found in [reference needed]. Figure 5 The implementation methods of steps S510 to S540 in the illustrated embodiment will not be described again here.

[0099] Step S620: If the corresponding state of the closed-loop control state machine is saturated, the input driving parameters of the closed-loop control in this cycle are adjusted downward according to a preset ratio.

[0100] In this embodiment, when the corresponding state of the closed-loop control state machine is determined to be saturated, it indicates that the current light intensity of the light source is too high, and the measurement signal formed by reflection exceeds the linear operating range of the photoelectric acquisition device, which is prone to signal distortion and waveform distortion. At this time, conventional PID closed-loop control is no longer executed. Instead, an emergency control method of rapid proportional reduction is adopted. Based on the input driving parameters before entering the control process in this cycle, the value of the light source driving parameters is rapidly reduced according to a pre-set fixed reduction ratio, thereby reducing the light intensity emitted by the light source from the source. In this way, by rapidly reducing the light source driving power, the signal saturation distortion problem caused by strong light can be effectively solved, and rapid exit from saturation can be achieved. The emergency control logic is simple, the amount of computation is small, and the response speed is much faster than that of closed-loop iterative control, which can pull the signal out of the saturation range in a short time.

[0101] In some embodiments, the preset ratio is 10%.

[0102] In other implementations, after the input drive parameters of the current closed-loop regulation are reduced according to a preset ratio, the corresponding state of the closed-loop regulation state machine is switched to the saturation state, and the wait counter is set to 1 (indicating that the closed-loop regulation of the next sampling cycle is skipped so that the measurement signal has enough time to stabilize) to prevent the regulation from being too fast and the continuous adjustment of the drive parameters from causing signal oscillation.

[0103] In other embodiments, if the corresponding state of the closed-loop control state machine is switching from the control state to the saturation state, it is necessary to reset the integral term in the closed-loop control and the error of the previous cycle to avoid the erroneous integration before saturation affecting the subsequent control accuracy. At the same time, it ensures that under extreme conditions such as strong reflection, the system can bring the measurement signal back to the normal range within a single sampling cycle, avoiding repeated saturation and undersaturation oscillations.

[0104] In other embodiments, a stable timeout counter is introduced to determine signal stability. When the measured signal saturates, the stable timeout counter is reset to zero. This avoids old stable timeout counts interfering with new stability determinations, ensuring accurate steady-state assessment.

[0105] Step S630: The down-processed driving parameters are used as the output driving parameters for the closed-loop regulation of this cycle.

[0106] Step S640: Determine the target adjustment parameters corresponding to the current measurement scenario based on the output driving parameters.

[0107] In some embodiments, the specific implementation of obtaining the initial sleep data of the user to be detected within a preset time range in step S640 can be found in [reference needed]. Figure 4 The implementation methods of steps S421 to S442 in the illustrated embodiment will not be described again here.

[0108] It should be noted that the steps in this embodiment are consistent with the corresponding steps in the foregoing embodiments. Therefore, for a detailed description of these steps, please refer to the description in the foregoing embodiments. This embodiment will not repeat them here.

[0109] Please continue reading. Figure 7 , Figure 7 This is a flowchart of another method for adjusting a measurement signal provided in an embodiment of this application. This method for adjusting the measurement signal can be executed by a computer device, which can be... Figure 1 The terminal 110 or server 120 shown. Figure 7 As shown, the method for adjusting the measurement signal may include at least steps S710 to S730, which are explained in detail below: Step S710: If the corresponding state of the closed-loop control state machine is a hold state, then perform a safety check on the sampled value of the measurement signal to obtain the safety check result.

[0110] In this embodiment, when the closed-loop control state machine is in a hold state, the driving parameters of the light source module are locked, and the system no longer executes PID closed-loop control, but continues to collect and measure signal sampling values ​​normally. According to the preset inspection rules, the current measured signal amplitude is checked in real time to determine whether the signal value falls within the second preset range, a loose safety interval, thereby generating the corresponding safety detection result and monitoring in real time whether the signal under steady state has deviated, drifted, or changed due to environmental interference.

[0111] Step S720: If the safety detection result indicates that the sampled value of the measurement signal is not within the second preset range, then the timeout period is accumulated.

[0112] If the safety detection determines that the average value of the current measured signal has exceeded the second preset safety range, it is considered that the measured signal has significantly deviated from the steady-state trend, but the system does not immediately exit the hold state. Instead, a timeout mechanism is activated, accumulating the timeout duration for each signal out-of-bounds condition and recording the duration of the abnormal signal. By setting an abnormal buffer period (the interval where the accumulated timeout is below a preset time threshold), transient signal fluctuations and temporary out-of-bounds errors caused by accidental interference are filtered out. The system does not immediately exit the hold state at the slightest deviation, avoiding frequent state switching and improving system stability.

[0113] In some embodiments, timeout accumulation refers to the sum of sampling intervals.

[0114] Step S730: When the accumulated timeout reaches a preset time threshold, if the measured signal sampling value is not within the first preset range, the hold state is switched to the adjustment state. The first preset range is smaller than the second preset range. For example, taking the green light channel, the second preset range (wide range) corresponding to green light is 250,000 to 520,000, so the corresponding first preset range can be 300,000 to 500,000. Similarly, for the red light channel and the infrared channel, the corresponding second preset range (wide range) is 280,000 to 520,000, so the first preset range (narrow range) can be 300,000 to 500,000.

[0115] In this embodiment, when the accumulated timeout reaches a preset time threshold, the signal deviation is considered to be no longer an instantaneous interference but a continuous change in operating conditions. At this point, another judgment is made. If the signal still does not fall into the first preset range, which is smaller, it proves that the signal deviation cannot recover on its own. The system then automatically exits the hold state, switches the closed-loop control state machine back to the control state, restarts the PID closed-loop control, and dynamically corrects the drive parameters of the light source module again to pull the measured signal back to the standard optimal range.

[0116] For example, a real environmental change is only determined when the accumulated timeout reaches a preset time threshold (e.g., 500ms). At this point, the stability flag can be cleared, and the closed-loop control state machine will then enter the control state to readjust. If, during the timeout accumulation period, the signal recovers to a safe range (e.g., a second preset range), the timeout timer is cleared, and the hold state continues.

[0117] In some embodiments, after switching from the hold state to the adjustment state, the driving parameters of the light source module can be adjusted again in a closed loop. Specific implementations of the closed-loop adjustment can be found in [reference needed]. Figure 4 The implementation methods of steps S420 to S440 in the illustrated embodiment will not be described again here.

[0118] It should be noted that the steps in this embodiment are consistent with the corresponding steps in the foregoing embodiments. Therefore, for a detailed description of these steps, please refer to the description in the foregoing embodiments. This embodiment will not repeat them here.

[0119] Please continue reading. Figure 8 , Figure 8 This is a flowchart of another method for adjusting a measurement signal provided in an embodiment of this application. This method for adjusting the measurement signal can be executed by a computer device, which can be... Figure 1 The terminal 110 or server 120 shown. Figure 8 As shown, the method for adjusting the measurement signal may include at least steps S810 to S820, which are explained in detail below: Step S810: If the corresponding state of the closed-loop regulating state machine is the regulating state, then perform parameter periodic oscillation detection based on the target driving parameters in the ring buffer to obtain the oscillation detection result.

[0120] In this embodiment, the system maintains a ring-shaped buffer of a preset length (e.g., 8). The size of the buffer includes the driving parameters of the light source module after each adjustment. The current driving parameters are written into the ring-shaped buffer every cycle. The ring-shaped buffer follows a first-in, first-out (FIFO) rule, automatically discarding the oldest historical parameters and always retaining the adjustment parameters from the most recent consecutive cycles.

[0121] In some embodiments, only when the closed-loop control state machine is in the control state, multiple sets of historical control parameters in the buffer are retrieved to analyze the parameter change trend, fluctuation amplitude and reciprocating pattern; it is determined whether the driving parameter exhibits periodic oscillation characteristics of regular back-and-forth rise and fall and repeated up and down shifts, and finally outputs two types of detection results: oscillation present / oscillation absent.

[0122] For example, in the embodiments of this application, parameter periodic oscillation detection can be performed through the following process, including: Step S811: Traverse backward from the current index to find historical points whose difference from the current driving parameter is less than the tolerance (e.g., 250µA) to form candidate periods. The period length is the index difference between the two points.

[0123] Step S812, the traversal range starts from lag=3 (corresponding to the minimum historical data volume of 4), and supports oscillation patterns with detection period lengths of 3 to 7 (such as 1-2-3-1-2-3, 1-2-3-4-1-2-3-4, etc.).

[0124] Step S813: Calculate the maximum and minimum values ​​of all points within the candidate period.

[0125] Step S814: If the difference between the maximum and minimum values ​​is greater than the amplitude threshold (e.g., 250µA), then it is considered that there is a sufficiently large amplitude change, and it is determined to be an effective oscillation period.

[0126] Step S815: Count the continuous oscillation counter once and record the detected period length. In some embodiments, the upper limit of the continuous oscillation counter is 4, and if no valid oscillation period is detected, the continuous oscillation counter is decremented (not lower than 0). When the counter reaches zero, the previously detected period length is cleared.

[0127] Step S816: When the continuous oscillation counter reaches a preset threshold (e.g., 3), it is determined to be continuous oscillation, that is, the oscillation detection result is determined to be that there is a parameter periodic oscillation.

[0128] In this embodiment of the application, the ring buffer oscillation detection algorithm can support multiple oscillation modes with period lengths of 3 to 7, and can accurately reconstruct the trajectory of parameter changes over multiple periods. Compared with single-period judgment, the oscillation detection accuracy is higher.

[0129] Step S820: If the oscillation detection result indicates the existence of parameter periodic oscillation, then oscillation suppression processing is performed to obtain the output driving parameters of the closed-loop regulation in this cycle.

[0130] In this embodiment, the periodic oscillation of parameters is often caused by the wearable device becoming loose, resulting in the driving parameters oscillating repeatedly between two values. By detecting the periodic fluctuations over multiple consecutive cycles, the original PID-calculated adjustment amount is no longer used to update the parameters. Instead, the output driving parameters of the closed-loop regulation for the current cycle are obtained through oscillation suppression processing. This effectively reduces the phenomenon of repeated fluctuations in driving parameters during the closed-loop regulation process, slows down the parameter adjustment rhythm, reduces the amplitude of a single adjustment, breaks the periodic oscillation cycle, and promotes the smooth convergence of the light source driving parameters towards the optimal value. This avoids measurement signal jitter and distortion caused by frequent jumps in the light source current, and at the same time improves the operational stability and convergence efficiency of the entire closed-loop control system.

[0131] In some embodiments, combined with Figure 9 As shown, Figure 9 yes Figure 8 The flowchart of the method for performing oscillation suppression processing in step S820 of the illustrated embodiment is shown in an exemplary embodiment, and includes at least steps S910 to S930, which are explained in detail below: Step S910: Determine the safety driving parameters based on the driving parameters within a preset range in the circular buffer.

[0132] In this embodiment, the annular buffer stores the light source driving parameters that have been effective for multiple recent cycles. First, effective parameters that fall within the normal and reasonable working range are selected from all historical driving parameters in the buffer. Then, the mean, median, or frequency optimization is performed on the selected compliant historical parameters to determine the parameters with small fluctuations, strong adaptability, and stable operating conditions. These parameters are defined as safe driving parameters and are used as the preferred adjustment reference parameters under oscillation conditions.

[0133] In some embodiments, the maximum value among the preset number of recently written drive parameters in the circular buffer is obtained, and 90% of this maximum value is determined as the safety drive parameter. The preset number can be 4.

[0134] Step S920: If the safety drive parameter is not within the preset range, obtain the default parameter corresponding to the current measurement scenario and use the default parameter as the output drive parameter for the closed-loop adjustment in this cycle.

[0135] In some embodiments, the function for calculating the default parameters can be represented as:

[0136] in, Used to represent default parameters Used to represent minimum driving parameters This is used to represent the step value. In this embodiment, if the calculated safe current is too large and exceeds the hardware safety range, the factory default safety drive parameters are used as a fallback to ensure that the system will not experience no signal or overcurrent.

[0137] Step S930: If the safety drive parameter is within the preset range, then the safety drive parameter is used as the output drive parameter for the closed-loop regulation of this cycle.

[0138] In this embodiment, when the safety driving parameter obtained from the circular buffer screening and integration falls within a preset legal parameter range, it can be considered that the parameter has been verified by actual operation, is adjusted smoothly without significant fluctuations, and is suitable for the current measurement conditions. This safety driving parameter is directly determined as the final output driving parameter of the closed-loop regulation in this cycle, thereby replacing the unstable real-time PID regulation under oscillating conditions.

[0139] In other embodiments, after obtaining the safety drive parameters, since the hardware drive parameters can only output integer multiples of the step size (e.g., 250 μA per increment) and cannot output decimals or arbitrary values, the calculated safety drive parameters need to be aligned to the nearest valid step size. For example, if the safety drive parameter is 1485 μA and the step size is 250 μA, the aligned safety drive parameter will be 1500 μA.

[0140] In other embodiments, after aligning the safety drive parameters to step accuracy, the corresponding state of the closed-loop regulating state machine can be switched to a hold state, the stability flag is set to true, and the wait counter is counted once to skip the next cycle of closed-loop regulation, allowing sufficient time for the drive parameters to stabilize. This forces the safety current to be locked and enters the hold state, quickly terminating the parameter oscillations, allowing the light source drive intensity and measurement signal to quickly return to stability, thus improving the robustness and measurement reliability of the closed-loop control system.

[0141] In some other embodiments, before step S910, the integral term and the previous error in the closed-loop regulation can be reset, and then oscillation suppression can be performed. This can clear the erroneous regulation accumulated during oscillation and prevent the PID closed-loop regulation from continuing to get out of control and continue to oscillate.

[0142] Please continue reading. Figure 10 , Figure 10 This is an exemplary embodiment of the present application illustrating a flowchart of adjusting the measurement signal for different states. Figure 10In this process, when a user triggers the wearable device to perform a measurement, a warm start is first performed. The current measurement scenario is determined, and the historical adjustment parameters corresponding to that scenario are read from non-volatile memory. Then, the light source module is driven based on these historical adjustment parameters, and measurement signals are acquired and calculated to obtain the average value of the measurement signal. Next, a state determination is performed based on the average value of the measurement signal. If the average value is greater than or equal to a preset saturation threshold, the measurement signal is considered to be in a saturated state. At this point, the input drive parameter of the current closed-loop regulation is directly reduced, for example, by 10%, and clamped to above the minimum allowable drive parameter. Simultaneously, the integral term of the closed-loop regulation needs to be reset, and the corresponding state of the closed-loop regulation state machine is switched to the saturated state. A count is also performed on the wait counter (indicating skipping the PID closed-loop control of the next sampling cycle, giving the measurement signal sufficient stabilization time). Finally, the reduced drive parameter is used as the output drive parameter of the current closed-loop regulation.

[0143] If the average value of the measured signal is less than the preset saturation threshold, the measured signal is considered not to be in a saturated state. At this point, the wait counter is checked. If the wait counter value is greater than 0, it is considered that the PID closed-loop control of the next sampling cycle needs to be skipped. The wait counter is then reset to zero, and the input drive parameters of the current cycle are used as the output drive parameters (i.e., returning to the original drive parameters). If the wait counter value is not greater than 0, it is further checked whether the current state is a hold state. If so, it is further checked whether the sampled value of the measured signal is within the second preset range. If so, the measured signal is considered stable and no further adjustment is needed. At this point, the accumulated timeout is reset to zero, the input drive parameters of the current cycle are returned, and the input drive parameters of the current cycle are directly used as the output drive parameters of the current cycle. If the sampled value of the measured signal is not within the second preset range (wide range), the timeout period is accumulated. When the accumulated timeout period is greater than or equal to the preset time threshold, the stability flag is cleared to zero. Then, it is determined whether the measured signal is within the first preset range (narrow range). If so, the stability flag is checked. If the stability flag is false, the stability timeout counter is counted once. Then, it is determined whether the average value of the measured signal tends to be stable (i.e., whether the average value of the measured signal meets the preset signal stability judgment condition). If so, it switches to the hold state, sets the stability flag to true, and returns to the input drive parameters of the current cycle, so that the input drive parameters of the current cycle are used as the output drive parameters of the current cycle.

[0144] If the measured signal is not within the first preset range, it is considered that the measured signal deviation is too large and needs to be readjusted. Therefore, the hold state is switched to the adjustment state to perform closed-loop adjustment of the drive parameters. Specifically, when performing closed-loop adjustment of the drive parameters, oscillation detection can be performed first. If continuous oscillation is detected (for example, the continuous oscillation counter reaches the preset threshold 3), it is considered that continuous oscillation has been detected. At this time, oscillation suppression is performed, and the output drive parameter of the current cycle is set to the historical maximum parameter. The integral term is then reset to 0.9, and the system switches to hold mode. If no continuous oscillation is detected, PID closed-loop regulation is performed, along with output limiting and anti-integral saturation processing, to obtain the drive parameter adjustment amount. This drive parameter adjustment amount is then superimposed with the input drive parameter of the current closed-loop regulation cycle to obtain the output drive parameter of the current closed-loop regulation cycle. In some embodiments, the output drive parameter of the current closed-loop regulation cycle can also be step-aligned to align the output drive parameter to a step accuracy, such as (aligned to 25 × 10µA), and range clamped (limited between a preset minimum and maximum allowable current). A wait counter is counted once to skip the next closed-loop regulation cycle, allowing sufficient time for the drive parameter to stabilize.

[0145] In this embodiment, a scenario-based historical parameter warm-start mechanism allows for the direct reuse of the previous optimal parameters for continuous measurements by the same user. This ensures the measurement signal is stable from the moment measurement begins, reducing startup time from several seconds in traditional methods to milliseconds, significantly improving user experience. Simultaneously, adjustments are only made when real, continuous environmental changes occur, greatly reducing unnecessary parameter jumps, lowering measurement signal fluctuations, and reducing power consumption and temperature rise of the light source module. Furthermore, when the measurement signal saturates, current is immediately forced to decrease, and the integral is reset only from the adjusted state. This ensures that even under extreme conditions such as strong reflection, the system can bring the measurement signal back to the normal range within a single sampling period, avoiding repeated saturation and undersaturation oscillations. Additionally, the integral accumulation is frozen when the PID output reaches its limit to prevent excessive accumulation of the integral term.

[0146] Figure 11 This is a flowchart illustrating multi-cycle oscillation detection and suppression based on a ring buffer, as shown in an exemplary embodiment of this application. Figure 11In this process, periodic oscillation detection can be performed before closed-loop adjustment to effectively suppress periodic oscillations caused by loose fitting or improper PID parameters. For example, by writing the current drive parameter to the circular buffer, updating the write index and historical filling statistics, it is then determined whether the number of historical parameters is greater than 4. If not, it indicates that the adjustment has just begun and the conditions for oscillation detection are not met. The continuous oscillation counter is decremented once (the counter should not be lower than 0), and a no-oscillation result is returned. If the number of historical parameters is greater than 4, it is traversed backward from the current index, from lag=3 to hist_fiil-1, where hist_fiil represents the total number of historical parameters that have been filled. Then, the difference between the current parameter and each traversed historical parameter is calculated, and historical points whose difference from the current parameter is less than the tolerance (e.g., 250µA) are found to form candidate periods, with the period length being the index difference between the two points. Then, amplitude verification is performed based on the maximum and minimum values ​​within the candidate period, i.e., the difference between the maximum and minimum values ​​within the candidate period is calculated. If this difference is greater than the amplitude threshold, it indicates that there is a sufficiently large amplitude change, and it is determined to be a valid oscillation period. At this point, the continuous oscillation counter counts once and records the length of the current oscillation period. When the continuous oscillation counter reaches a preset threshold, such as 3, it is determined that continuous oscillation has been detected. At this time, oscillation suppression processing is performed to obtain the output drive parameters for closed-loop regulation in this period. If the difference between the maximum and minimum values ​​within the candidate period is not greater than the amplitude threshold, the continuous oscillation counter is decremented once. When the continuous oscillation counter returns to zero, it indicates that the oscillation has disappeared, the previously recorded length of the last oscillation period is cleared, and the state is reset.

[0147] This application proposes a method for detecting periodic oscillations of driving parameters based on a circular buffer. The method first writes the adjusted driving current value into a circular buffer of a preset length and updates the index. When the buffer data volume reaches a preset threshold, it iterates through historical data, identifying periodic oscillation characteristics based on the dual conditions of "difference between the current value and the historical value + range fluctuation amplitude," and records the frequency of oscillations using a continuous oscillation counter. When the number of consecutively detected oscillations reaches a preset threshold, it is determined to be continuous oscillation and triggers an oscillation suppression process; otherwise, when no oscillation is detected, the counter is decayed and historical periodic records are cleared, thereby achieving accurate identification and reliable control of periodic oscillations of driving parameters.

[0148] Figure 12 This is an exemplary embodiment of the present application illustrating an application of adjusting a measurement signal. Figure 12In this process, by determining the current measurement scenario, the corresponding historical adjustment parameters are read from the non-volatile memory based on the current measurement scenario. Then, the validity of the historical adjustment parameters is verified (channel-by-channel verification of the safety range). If the historical adjustment parameters are within the preset safety range, they are directly used as the initial driving parameters; otherwise, the default parameters corresponding to the current measurement scenario are used as the initial driving parameters. Then, the light source module is driven based on the initial driving parameters, and the measurement signal sample value obtained from signal sampling by the wearable device is acquired. The driving parameters of the light source module are then adjusted in a closed loop based on the measurement signal sample value to obtain the target adjustment parameters corresponding to the current measurement scenario. Specifically, the output driving parameters of the light source module are obtained by performing closed-loop adjustment on the driving parameters of the light source module to obtain the output driving parameters of the current closed-loop adjustment cycle. It is then determined whether the output driving parameters are the same as the input driving parameters. If they are different, the driving parameters are considered unstable and need further adjustment. If they are the same, the driving parameters are considered stable. At this time, the output driving parameters are used as the target adjustment parameters corresponding to the current measurement scenario, and the target adjustment parameters are written into the non-volatile memory at the location corresponding to the current measurement scenario. Finally, the light source module is driven based on the target adjustment parameters to ensure that the measurement signal is within the preset range.

[0149] In this embodiment, by determining the current measurement scenario, the historical adjustment parameters corresponding to the current measurement scenario are directly reused. The initial driving parameters of the light source module are directly determined based on the historical parameters, eliminating the need for step-by-step probing from scratch and skipping a large number of invalid parameter traversal steps. This significantly shortens the driving parameter adaptation time and significantly improves the adjustment efficiency of the measurement signal. In addition, by using the historical adjustment parameters corresponding to the current measurement scenario as initial values ​​and combining them with the sampled values ​​of the real-time measurement signal for closed-loop dynamic adjustment, it is possible to adapt to the current actual working conditions, individual differences, and wearing status in real time, dynamically correct driving parameter deviations, avoid the limitations of general fixed data, and significantly improve the matching accuracy of light source driving parameters under complex working conditions and extreme scenarios, thereby improving the adjustment accuracy of the measurement signal.

[0150] It should be noted that the steps in this embodiment are consistent with the corresponding steps in the foregoing embodiments. Therefore, for a detailed description of these steps, please refer to the description in the foregoing embodiments. This embodiment will not repeat them here.

[0151] Combination Figure 13 As shown, Figure 13 This is a schematic diagram illustrating the structure of a measurement signal conditioning device according to an exemplary embodiment of this application. Figure 13As shown, the exemplary measurement signal adjustment device includes: a first acquisition module 1310, a determination module 1320, a second acquisition module 1330, and a closed-loop adjustment module 1340. The first acquisition module 1310 is configured to determine the current measurement scenario and acquire historical adjustment parameters corresponding to the current measurement scenario; the determination module 1320 is configured to determine the initial driving parameters of the light source module in the wearable device based on the historical adjustment parameters; the second acquisition module 1330 is configured to drive the light source module based on the initial driving parameters and acquire the measurement signal sampling value obtained by signal sampling by the wearable device; the closed-loop adjustment module 1340 is configured to perform closed-loop adjustment of the driving parameters of the light source module based on the measurement signal sampling value to obtain the target adjustment parameters corresponding to the current measurement scenario, and drive the light source module based on the target adjustment parameters to ensure that the measurement signal is within a preset range.

[0152] In another exemplary embodiment, the determining module 1320 is configured to determine the initial driving parameters of the light source module in the wearable device based on historical adjustment parameters in the following manner: performing validity verification on the historical adjustment parameters and obtaining the verification result; if the verification result indicates that the historical adjustment parameters are within a preset safety range, then using the historical condition parameters as the initial driving parameters; if the verification result indicates that the historical adjustment parameters are not within the preset safety range, then obtaining the default parameters corresponding to the current measurement scenario and using the default parameters as the initial driving parameters.

[0153] In another exemplary embodiment, the closed-loop adjustment module 1340 is configured to perform closed-loop adjustment of the driving parameters of the light source module based on the sampled values ​​of the measurement signal to obtain the target adjustment parameters corresponding to the current measurement scenario, including: determining the corresponding state of the closed-loop adjustment state machine based on the sampled values ​​of the measurement signal; if the corresponding state of the closed-loop adjustment state machine is the adjustment state, calculating the error between the average value of the measurement signal and the target value of the measurement signal; calculating the proportional term, integral term, and derivative term corresponding to the error, and performing output limiting and integral anti-saturation processing on the weighted sum of the three terms to obtain the driving parameter adjustment amount; superimposing the driving parameter adjustment amount with the input driving parameters of the closed-loop adjustment in the current cycle to obtain the output driving parameters of the closed-loop adjustment in the current cycle, and determining the target adjustment parameters corresponding to the current measurement scenario based on the output driving parameters.

[0154] In another exemplary embodiment, the closed-loop adjustment module 1340 is further configured to determine the corresponding state of the closed-loop adjustment state machine based on the sampled values ​​of the measurement signal in the following manner: calculating the average value of the sampled values ​​of the measurement signal to obtain the average value of the measurement signal; if the average value of the measurement signal is greater than or equal to a preset saturation threshold, then determining that the corresponding state of the closed-loop adjustment state machine is a saturation state; if the error between the average value of the measurement signal and the target value of the measurement signal is within a first preset range, and the average value of the measurement signal satisfies a preset signal stability judgment condition, then determining that the corresponding state of the closed-loop adjustment state machine is a holding state; if the closed-loop adjustment state machine is not in a saturation state or a holding state, and no parameter periodic oscillation is detected, then confirming that the corresponding state input state of the closed-loop adjustment state machine is an adjustment state.

[0155] In another exemplary embodiment, the closed-loop adjustment module 1340 is further configured to determine the target adjustment parameter corresponding to the current measurement scenario based on the output driving parameter in the following manner: if the output driving parameter is the same as the input driving parameter, then the output driving parameter is used as the target adjustment parameter corresponding to the current measurement scenario; if the output driving parameter is different from the input driving parameter, then the output driving parameter is used as the input driving parameter for the closed-loop adjustment of the next cycle for the next cycle of closed-loop adjustment.

[0156] In another exemplary embodiment, the closed-loop adjustment module 1340 is further configured to, if the corresponding state of the closed-loop adjustment state machine is a saturated state, reduce the input driving parameter of the closed-loop adjustment in the current cycle according to a preset ratio; and use the reduced driving parameter as the output driving parameter of the closed-loop adjustment in the current cycle.

[0157] In another exemplary embodiment, the closed-loop control module 1340 is further configured to perform a safety check on the sampled value of the measurement signal if the corresponding state of the closed-loop control state machine is a hold state, and obtain a safety check result; if the safety check result indicates that the sampled value of the measurement signal is not within a second preset range, then timeout time is accumulated; when the accumulated timeout time reaches a preset time threshold, and the sampled value of the measurement signal is not within a third preset range, then the hold state is switched to the control state; wherein, the third preset range is smaller than the second preset range.

[0158] In another exemplary embodiment, the closed-loop adjustment module 1340 is further configured to perform parameter periodic oscillation detection based on the target driving parameters in the annular buffer if the corresponding state of the closed-loop adjustment state machine is the adjustment state, and obtain the oscillation detection result; wherein, the annular buffer stores the driving parameters of the light source module after each adjustment; if the oscillation detection result indicates that there is parameter periodic oscillation, then oscillation suppression processing is performed to obtain the output driving parameters of the closed-loop adjustment in this cycle.

[0159] In another exemplary embodiment, the closed-loop adjustment module 1340 is further configured to perform oscillation suppression processing to obtain the output driving parameters of the current closed-loop adjustment if the oscillation detection result indicates the presence of parameter periodic oscillation, including: determining a safe driving parameter based on the driving parameters within a preset range in the annular buffer; if the safe driving parameter is not within the preset range, obtaining the default parameter corresponding to the current measurement scenario and using the default parameter as the output driving parameter of the current closed-loop adjustment; if the safe driving parameter is within the preset range, using the safe driving parameter as the output driving parameter of the current closed-loop adjustment.

[0160] In another exemplary embodiment, the measurement signal conditioning device further includes a storage module configured to update the target conditioning parameters to a storage area in a preset storage unit corresponding to the current measurement scenario.

[0161] It should be noted that the measurement signal adjustment device and the measurement signal adjustment method provided in the above embodiments belong to the same concept. The specific operation methods of each module and unit have been described in detail in the method embodiments and will not be repeated here. In practical applications, the measurement signal adjustment device provided in the above embodiments can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. This is not a limitation here.

[0162] Embodiments of this application also provide an electronic device, including: one or more processors; and a storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the measurement signal adjustment method provided in the above embodiments.

[0163] Figure 14 A schematic diagram of a computer system suitable for implementing the embodiments of this application is shown. It should be noted that... Figure 14 The computer system 1400 of the electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0164] like Figure 14As shown, the computer system 1400 includes a Central Processing Unit (CPU) 1401, which can perform various appropriate actions and processes based on programs stored in Read-Only Memory (ROM) 1402 or programs loaded from storage portion 1408 into Random Access Memory (RAM) 1403, such as performing the methods described in the above embodiments. Various programs and data required for system operation are also stored in RAM 1403. The CPU 1401, ROM 1402, and RAM 1403 are interconnected via bus 1404. An Input / Output (I / O) interface 1405 is also connected to bus 1404.

[0165] The following components are connected to I / O interface 1405: an input section 1406 including a keyboard, mouse, etc.; an output section 1407 including a cathode ray tube (CRT), liquid crystal display (LCD), etc., and speakers, etc.; a storage section 1408 including a hard disk, etc.; and a communication section 1409 including a model interface card such as a LAN (Local Area Network) card, modem, etc. The communication section 1409 performs communication processing via a model such as the Internet. A drive 1410 is also connected to I / O interface 1405 as needed. Removable media 1411, such as a disk, optical disk, magneto-optical disk, semiconductor memory, etc., are installed on drive 1410 as needed so that computer programs read from them can be installed into storage section 1408 as needed.

[0166] Specifically, according to embodiments of this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program including a computer program for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from the model via communication section 1409, and / or installed from removable medium 1411. When the computer program is executed by central processing unit (CPU) 1401, it performs various functions defined in the system of this application.

[0167] It should be noted that the computer-readable medium shown in the embodiments of this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM), flash memory, optical fiber, portable compact disc read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this application, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying a computer-readable computer program. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media can also be any computer-readable medium other than computer-readable storage media, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The computer program contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, etc., or any suitable combination thereof.

[0168] Another aspect of this application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the method for regulating the measurement signal as described above. This computer-readable storage medium may be included in the electronic device described in the above embodiments, or it may exist independently and not assembled into the electronic device.

[0169] Another aspect of this application provides a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the measurement signal adjustment method provided in the various embodiments described above.

[0170] The above description is merely a preferred exemplary embodiment of this application and is not intended to limit the implementation of this application. Those skilled in the art can easily make corresponding modifications or alterations based on the main concept and spirit of this application. Therefore, the scope of protection of this application should be determined by the scope of protection claimed in the claims.

[0171] It is understood that in the specific embodiments of this application, data related to measurement signals (such as historical adjustment parameters, measurement signal sampling values, and target adjustment parameters) are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.

Claims

1. A method for adjusting a measurement signal, characterized in that, include: Determine the current measurement scenario and obtain the historical adjustment parameters corresponding to the current measurement scenario; Based on the historical adjustment parameters, the initial driving parameters of the light source module in the wearable device are determined; The light source module is driven based on the initial driving parameters, and the measurement signal sample value obtained by the wearable device is acquired. The driving parameters of the light source module are adjusted in a closed loop based on the sampled value of the measurement signal to obtain the target adjustment parameters corresponding to the current measurement scenario. The light source module is then driven based on the target adjustment parameters to ensure that the measurement signal is within a preset range.

2. The method according to claim 1, characterized in that, Determining the initial driving parameters of the light source module in the wearable device based on the historical adjustment parameters includes: The validity of the historical adjustment parameters is verified, and the verification results are obtained. If the verification result indicates that the historical adjustment parameter is within a preset safety range, then the historical condition parameter is used as the initial driving parameter; If the verification result indicates that the historical adjustment parameter is not within the preset safety range, then the default parameter corresponding to the current measurement scenario is obtained, and the default parameter is used as the initial driving parameter.

3. The method according to claim 1, characterized in that, The step of performing closed-loop adjustment of the driving parameters of the light source module based on the sampled values ​​of the measurement signal to obtain the target adjustment parameters corresponding to the current measurement scenario includes: The corresponding state of the closed-loop control state machine is determined based on the sampled values ​​of the measured signal; If the corresponding state of the closed-loop control state machine is the control state, then calculate the error between the average value of the measured signal and the target value of the measured signal; Calculate the proportional, integral, and derivative terms corresponding to the error, and perform output limiting and integral anti-saturation processing on the weighted sum of the three terms to obtain the driving parameter adjustment amount; The adjustment amount of the driving parameter is superimposed with the input driving parameter of the closed-loop adjustment in the current cycle to obtain the output driving parameter of the closed-loop adjustment in the current cycle, and the target adjustment parameter corresponding to the current measurement scenario is determined based on the output driving parameter.

4. The method according to claim 3, characterized in that, Determining the corresponding state of the closed-loop control state machine based on the sampled values ​​of the measured signal includes: The average value of the measured signal is obtained by averaging the sampled values. If the average value of the measured signal is greater than or equal to the preset saturation threshold, then the corresponding state of the closed-loop regulating state machine is determined to be a saturation state. If the error between the average value of the measured signal and the target value of the measured signal is within a first preset range, and the average value of the measured signal meets the preset signal stability judgment condition, then the corresponding state of the closed-loop control state machine is determined to be the holding state. If the closed-loop regulating state machine is not in the saturation state or the holding state, and no periodic oscillation of parameters is detected, then the corresponding state of the closed-loop regulating state machine is confirmed to be the regulating state.

5. The method according to claim 3, characterized in that, Determining the target adjustment parameter corresponding to the current measurement scenario based on the output driving parameters includes: If the output driving parameter is the same as the input driving parameter, then the output driving parameter is used as the target adjustment parameter corresponding to the current measurement scenario; If the output driving parameter is different from the input driving parameter, then the output driving parameter is used as the input driving parameter for the closed-loop adjustment in the next cycle.

6. The method according to claim 3, characterized in that, The method further includes: If the corresponding state of the closed-loop regulation state machine is saturated, the input driving parameters of the closed-loop regulation in this cycle are adjusted down according to a preset ratio. The down-processed driving parameters are used as the output driving parameters for the closed-loop regulation in this cycle.

7. The method according to claim 3, characterized in that, The method further includes: If the corresponding state of the closed-loop control state machine is a hold state, then a safety check is performed on the sampled value of the measured signal to obtain a safety check result; If the security detection result indicates that the sampled value of the measurement signal is not within the second preset range, then the timeout period is accumulated. When the accumulated timeout reaches a preset time threshold, and the sampled value of the measurement signal is not within the first preset range, the hold state is switched to the adjustment state; wherein, the first preset range is smaller than the second preset range.

8. The method according to claim 3, characterized in that, The method further includes: If the corresponding state of the closed-loop adjustment state machine is the adjustment state, then the parameter periodic oscillation detection is performed based on the target driving parameters in the circular buffer to obtain the oscillation detection result; wherein, the circular buffer stores the driving parameters of the light source module after each adjustment. If the oscillation detection result indicates the presence of parameter periodic oscillation, then oscillation suppression processing is performed to obtain the output driving parameters for closed-loop regulation in this cycle.

9. The method according to claim 8, characterized in that, If the oscillation detection result indicates the presence of periodic oscillations, then oscillation suppression processing is performed to obtain the output driving parameters for the closed-loop regulation of this period, including: The safety drive parameters are determined based on the drive parameters within a preset range in the circular buffer. If the safety drive parameter is not within the preset range, then the default parameter corresponding to the current measurement scenario is obtained, and the default parameter is used as the output drive parameter for the closed-loop adjustment in this cycle; If the safety drive parameter is within the preset range, then the safety drive parameter will be used as the output drive parameter for the closed-loop regulation of this cycle.

10. The method according to any one of claims 1 to 9, characterized in that, The method further includes: The target adjustment parameters are updated to the storage area in the preset storage unit corresponding to the current measurement scenario.

11. A device for adjusting a measurement signal, characterized in that, include: The first acquisition module is configured to determine the current measurement scenario and acquire the historical adjustment parameters corresponding to the current measurement scenario; The determination module is configured to determine the initial driving parameters of the light source module in the wearable device based on the historical adjustment parameters. The second acquisition module is configured to drive the light source module based on the initial driving parameters and acquire the measurement signal sample value obtained by the wearable device through signal sampling. The closed-loop adjustment module is configured to perform closed-loop adjustment of the driving parameters of the light source module based on the sampled value of the measurement signal to obtain the target adjustment parameters corresponding to the current measurement scenario, and drive the light source module based on the target adjustment parameters so that the measurement signal is within a preset range.

12. An electronic device, characterized in that, include: One or more processors; A storage device for storing one or more programs, which, when executed by the one or more processors, cause the electronic device to implement the method for regulating the measurement signal as described in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, It stores computer-readable instructions that, when executed by the processor of a computer, cause the computer to perform the method for adjusting the measurement signal according to any one of claims 1 to 10.