Data processing method, processing module, electronic equipment and storage medium

By setting the target parameters and compensation amount in the processing module, signal cancellation and compensation are performed, the problem of excessive range of signal value for PPG signal acquisition is solved, and the efficiency and accuracy of signal acquisition are improved.

CN119201953APending Publication Date: 2024-12-27SHENZHEN GOODIX TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411281878.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

In the process of collecting optical plethysmographic signals (PPG signals), due to the large range of signal values, the chip cannot effectively collect data, resulting in low acquisition efficiency.

Method used

By setting the target parameters and compensation amount, signal cancellation and compensation are performed, target parameters and compensation amount are updated, and the signal processing range of the processing module is expanded to avoid data acquisition failure caused by excessive or too small signal.

Benefits of technology

It improves the efficiency of signal acquisition, ensures that the processing module can effectively collect the measured signal values ​​of the analog signal, and improves the accuracy and efficiency of signal acquisition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201953A_ABST
    Figure CN119201953A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a data processing method, a processing module, electronic equipment and a storage medium, the method is applied to the processing module, and the method comprises the following steps: according to a target parameter, processing an analog signal obtained by sampling a to-be-tested signal to obtain a first digital quantity, the target parameter is used for indicating a signal value of a signal for offsetting at least part of the analog signal; compensating the first digital quantity according to the target compensation quantity to obtain a measurement signal value of the analog signal; if the first digital quantity meets a parameter updating condition, updating the target parameter according to the first digital quantity to obtain an updated target parameter; and according to the updated target parameter, updating the target compensation amount to obtain an updated target compensation amount. According to the scheme, the signal acquisition efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of data processing, and in particular to a data processing method, a processing module, an electronic device, and a storage medium. Background Art

[0002] At present, in the process of collecting analog signals, considering factors such as the quality and cost of the collected signals, the analog signals are usually converted into digital signals for collection.

[0003] For example, in the process of collecting optical plethysmography signals (PPG signals), the light emitting element can emit light to illuminate the skin surface, the receiving element receives the reflected light signal, and converts the light signal into a PPG signal and inputs it into the chip. The chip converts the PPG signal into a corresponding digital signal and outputs the digital signal. Then, the measurement value of the PPG signal can be calculated based on the digital signal to realize the collection of the PPG signal.

[0004] However, since the signal value range of the PPG signal is large, and the signal value range that the chip can process is limited, in the process of collecting PPG signals, the chip is often unable to collect valid data because the PPG signal is too large or too small, resulting in low efficiency in signal collection. Summary of the invention

[0005] In view of this, embodiments of the present application provide a data processing method, a processing module, an electronic device, and a storage medium to at least partially solve the above problems.

[0006] According to a first aspect of an embodiment of the present application, a data processing method is provided, which is applied to a processing module, including: processing an analog signal obtained by sampling a signal to be measured according to a target parameter to obtain a first digital quantity, wherein the target parameter is used to indicate a signal value of a signal that offsets at least part of the analog signal; compensating the first digital quantity according to a target compensation amount to obtain a measured signal value of the analog signal; if the first digital quantity meets a parameter update condition, updating the target parameter according to the first digital quantity to obtain an updated target parameter; and updating the target compensation amount according to the updated target parameter to obtain an updated target compensation amount.

[0007] According to a second aspect of an embodiment of the present application, a processing module is provided, including: a signal processing unit, used to process an analog signal obtained by sampling a signal to be measured according to a target parameter, to obtain a first digital quantity, wherein the target parameter is used to indicate a signal value of a signal that offsets at least part of the analog signal; a numerical compensation unit, used to compensate the first digital quantity according to a target compensation amount, to obtain a measured signal value of the analog signal; a first updating unit, used to update the target parameter according to the first digital quantity when the first digital quantity meets a parameter update condition, to obtain an updated target parameter; a second updating unit, used to update the target compensation amount according to the updated target parameter, to obtain an updated target compensation amount.

[0008] According to the third aspect of an embodiment of the present application, there is provided an electronic device comprising: a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; the memory is used to store at least one executable instruction, and the executable instruction enables the processor to perform operations corresponding to the method of the first aspect described above.

[0009] According to a fourth aspect of an embodiment of the present application, a computer storage medium is provided, on which a computer program is stored, and the program is executed by a processor to perform the method of the first aspect.

[0010] According to a fifth aspect of an embodiment of the present application, a computer program product is provided, comprising computer instructions, wherein the computer instructions instruct a computing device to execute the method of the first aspect described above.

[0011] According to the data processing scheme provided in the embodiment of the present application, the analog signal obtained by sampling the signal to be measured can be processed according to the target parameters to obtain a first digital quantity, and then the first digital quantity can be compensated according to the target compensation amount to obtain a measurement signal value of the analog signal. If the first digital quantity meets the parameter update condition, the target parameter is updated according to the first digital quantity to obtain an updated target parameter, and the target compensation amount is updated according to the updated target parameter to obtain an updated target compensation amount. Therefore, in the process of processing the analog signal obtained by sampling the test signal according to the target parameter, at least part of the analog signal is offset by a signal whose signal value is the signal value indicated by the target parameter, so that the first digital quantity is determined according to the offset signal, and the first digital signal is subsequently compensated by the target compensation amount to obtain the measurement signal value of the analog signal, thereby realizing the acquisition of the test signal, and the target parameter and the target compensation amount can be updated according to the first digital quantity. Compared with directly determining the first digital quantity according to the analog signal, the setting of the target parameter and the target compensation amount in the present application realizes the expansion of the signal range that the processing module can process, and tries to avoid the problem that the processing module cannot collect valid data due to the test signal being too large or too small in the process of collecting the test signal, thereby improving the efficiency of the measurement signal value of the analog signal obtained by collecting the test signal, thereby improving the efficiency of signal acquisition. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0013] Figure 1 is a flow chart of a data processing method according to an embodiment of the present application;

[0014] Figure 2 is a schematic diagram of measurement signal values ​​according to an embodiment of the present application;

[0015] Figure 3 is a schematic diagram of a processing module of an embodiment of the present application;

[0016] Figure 4 It is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0017] Data processing methods

[0018] An embodiment of the present application provides a data processing method, which is applied to a processing module. The processing module may be a chip for collecting PPG signals, etc., which is not limited in the embodiment of the present application.

[0019] The data processing method is described in detail below through multiple embodiments.

[0020] Figure 1 1 is a flow chart of a data processing method according to an embodiment of the present application. Figure 1 As shown, the data processing method includes the following steps:

[0021] Step 101: Process an analog signal obtained by sampling a signal to be measured according to a target parameter to obtain a first digital value.

[0022] The target parameter is used to indicate the signal value of the signal that cancels at least part of the analog signal.

[0023] In a specific embodiment, the signal to be measured is a PPG signal, and the processing module samples the PPG signal to obtain an analog signal. The processing module then offsets at least part of the analog signal according to the target parameter stored in the parameter register therein, and then processes the signal obtained after the offset to obtain a first digital quantity, wherein the initial value of the target parameter may be 0 or may not be 0, and this is not limited to the embodiments of the present application.

[0024] Based on the fact that the analog signal is a signal obtained by sampling the PPG, the at least part of the analog signal that is offset may be at least part of the DC value of the analog signal, and the signal for offsetting at least part of the analog signal is a current signal, the direction of which is opposite to the DC value of the analog signal, and the signal value is the signal value indicated by the target parameter. It should be noted that the signal value indicated by the target parameter is generally smaller than the DC value of the analog signal, and therefore it is basically unlikely that the analog signal is completely offset and an opposite analog signal is obtained.

[0025] Step 102: Compensate the first digital value according to the target compensation value to obtain a measurement signal value of the analog signal.

[0026] When the initial value of the target parameter is 0, the initial value of the target compensation amount is also 0. When the initial value of the target parameter is not 0, the initial value of the target compensation amount is determined according to the target parameter.

[0027] In a specific embodiment, after the processing module obtains the first digital quantity, the sum of the target compensation quantity and the first digital quantity is determined as the digital signal corresponding to the analog signal. The digital signal is the measurement signal value of the analog signal, thereby realizing the acquisition of the signal to be measured. The measurement signal value of the analog signal can be stored in the queue FIFO included in the processing module.

[0028] Step 103: If the first digital quantity meets the parameter update condition, the target parameter is updated according to the first digital quantity to obtain an updated target parameter.

[0029] The parameter update condition is used to indicate the condition that the processing module cannot collect valid data due to the target parameter being too large or too small.

[0030] For example, when the first digital quantity is greater than or equal to the first threshold, or when the first digital quantity is less than or equal to the second threshold, the target parameter is updated according to the first digital quantity to try to make the first digital quantity subsequently obtained according to the updated target parameter between the first threshold and the second threshold, wherein the second threshold is greater than the first threshold. The first threshold and the second threshold can generally be set according to actual needs. For example, the first threshold is -8388608 and the second threshold is 8388607. The embodiments of the present application are not limited to this.

[0031] Step 104: Update the target compensation amount according to the updated target parameter to obtain an updated target compensation amount.

[0032] In an embodiment of the present application, an analog signal obtained by sampling a signal to be measured can be processed according to a target parameter to obtain a first digital quantity, and then the first digital quantity can be compensated according to a target compensation quantity to obtain a measurement signal value of the analog signal. If the first digital quantity meets a parameter update condition, the target parameter is updated according to the first digital quantity to obtain an updated target parameter, and the target compensation quantity is updated according to the updated target parameter to obtain an updated target compensation quantity. Therefore, in the process of processing the analog signal obtained by sampling the test signal according to the target parameter, at least part of the analog signal is offset by a signal whose signal value is the signal value indicated by the target parameter, so that the first digital quantity is determined according to the offset signal, and the first digital signal is subsequently compensated by the target compensation amount to obtain the measurement signal value of the analog signal, thereby realizing the acquisition of the test signal, and the target parameter and the target compensation amount can be updated according to the first digital quantity. Compared with directly determining the first digital quantity according to the analog signal, the setting of the target parameter and the target compensation amount in the present application realizes the expansion of the signal range that the processing module can process, and tries to avoid the problem that the processing module cannot collect valid data due to the test signal being too large or too small in the process of collecting the test signal, thereby improving the efficiency of the measurement signal value of the analog signal obtained by collecting the test signal, thereby improving the efficiency of signal acquisition.

[0033] In a possible implementation, the analog signal is a current signal. For example, if the signal to be measured is a PPG signal, the analog signal is a current signal. Based on this, the step 101 includes the following specific processing: outputting a signal whose signal value is the signal value indicated by the target parameter through the signal output unit, offsetting at least part of the analog signal to obtain an offset analog signal; converting the offset analog signal into a voltage signal through a transimpedance amplifier included in the processing module; and converting the voltage signal into a first digital quantity through an analog-to-digital converter included in the processing module.

[0034] In an embodiment of the present application, in the process of obtaining the first digital quantity, after offsetting at least part of the analog signal which is a current signal, the offset analog signal can be converted into a voltage signal, and then the voltage signal can be converted into a digital quantity. Therefore, the analog signal can be converted into a digital quantity through a signal output unit, a transimpedance amplifier and an analog-to-digital converter, thereby reducing costs.

[0035] In a possible implementation, the processing module is used to periodically sample the signal to be measured. Based on this, the data processing method further includes the following specific processing:

[0036] If the first digital quantity is a digital quantity corresponding to an analog signal obtained by sampling the test signal for the i-th time, and in the i-cnt+1-th sampling to the i-th sampling of the test signal, the digital quantities corresponding to the analog signal obtained in each sampling are greater than or equal to the first threshold, or are less than or equal to the second threshold, then it is determined that the first digital quantity meets the parameter update condition; otherwise, the first digital quantity does not meet the parameter update condition, wherein i and cnt are both positive integers, cnt is less than or equal to i, the first threshold is greater than the second threshold, cnt is 1, 2, 4 or 8, etc., and the embodiments of the present application are not limited to this.

[0037] In one example, if cnt=1, then when the first digital quantity is greater than or equal to the first threshold, or less than or equal to the second threshold, it is determined that the first digital quantity meets the parameter update condition; if cnt>1, then in the cnt consecutive sampling of the signal to be tested, when the digital quantity corresponding to the analog signal obtained in each sampling is greater than or equal to the first threshold, or less than or equal to the second threshold, it is determined that the first digital quantity meets the parameter update condition, wherein the digital quantity corresponding to the analog signal obtained in the last sampling of the cnt consecutive samplings is the first digital quantity.

[0038] In an embodiment of the present application, when cnt=1, when the first digital quantity is greater than or equal to the first threshold, or less than or equal to the second threshold, it is determined that the first digital quantity meets the parameter update condition, which can make the process of determining whether the first digital quantity meets the parameter update condition simpler and save computing resources; when cnt>1, when the digital quantities corresponding to the analog signals obtained by continuous cnt sampling of the signal to be tested are all greater than or equal to the first threshold, or are all less than or equal to the second threshold, it is determined that the first digital quantity meets the parameter update condition. At this time, it is equivalent to adding an anti-shake mechanism, improving the stability of the processing module, and can also make the result of determining whether the first digital quantity meets the parameter update condition more accurate.

[0039] In a possible implementation, the step of “updating the target parameter according to the first digital value to obtain an updated target parameter” in step 103 includes the following specific processing: calculating the updated target parameter by the following formula:

[0040] dc_cancel_code1=H3((Idc_cancel0+PpgMixData*A*1000000 / (TIA*D))*B / C+dc_cancel_cod e0);

[0041] Among them, H3() is the third overflow prevention function, dc_cancel_code1 is the updated target parameter, Idc_cancel0 is the signal value indicated by the target parameter, the unit of Idc_cancel0 is microamperes, PpgMixData is the first digital quantity, A is the proportional coefficient of the analog-to-digital converter, for example, 1.8, TIA is the gain resistance value of the transimpedance amplifier, TIA can be determined according to the number of gain resistors included in the transimpedance amplifier, for example, the transimpedance amplifier includes two gain resistors with a resistance value of tia, then TIA=2*tia, the unit of TIA is ohm, D is the maximum value output by the analog-to-digital converter, for example, D=8388608, B is the maximum storage value of the storage bit used to store the target parameter, that is, the maximum value that the storage bit can store, for example, 255 or 256, etc., C is the maximum signal value of the output signal of the signal output unit, for example, 32, 64, 128 or 256 microamperes, etc., dc_cancel_code0 is the target parameter.

[0042] It should be noted that H3((Idc_cancel0+PpgMixData*A*1000000 / (TIA*D))*B / C+dc_cancel_code0) is used to indicate that when (Idc_cancel0+PpgMixData*A*1000000 / (TIA*D))*B / C+dc_cancel_code0 is less than or equal to the third threshold, H3((Idc_cancel0+PpgMixData*A*1000000 / (TIA*D))*B / C+dc_cancel_code0) is equal to the third threshold, and when (Idc_cancel0+PpgMixData*A*1000000 / (TIA*D))*B / C+dc_cancel_code0 is greater than or equal to the fourth threshold, H3((Idc_cancel0+PpgMixData*A*1000000 / (TIA*D))*B / C+dc_cancel_code0) is greater than or equal to the fourth threshold. When (Idc_cancel0+PpgMixData*A*1000000 / (TIA*D))*B / C+dc_cancel_code0) is equal to the fourth threshold, and (Idc_cancel0+PpgMixData*A*1000000 / (TIA*D))*B / C+dc_cancel_code0 is greater than the third threshold and less than the fourth threshold, H3((Idc_cancel0+PpgMixData*A*1000000 / (TIA*D))*B / C+dc_cancel_code0) is equal to (Idc_cancel0+PpgMixData*A*1000000 / (TIA*D))*B / C+dc_cancel_code0), wherein the fourth threshold is greater than the third threshold, and the specific values ​​of the third threshold and the fourth threshold can be respectively the minimum value and the maximum value that can be stored in the storage bit used to store dc_cancel_code1, for example, the third threshold is 0 and the fourth threshold is 255.

[0043] In a specific implementation, the signal value Idc_cancel1=Idc_cancel0+PpgMixData*A*1000000 / (TIA*D) indicated by the updated target parameter can be calculated first, and then the updated target parameter dc_cancel_code1=H3(Idc_cancel1*B / C+dc_cancel_code0) can be calculated. At this time, Idc_cancel1 has actual physical meaning, which is convenient for troubleshooting when processing module abnormalities.

[0044] In another specific implementation, the amplified signal value Idc_cancel2=(Idc_cancel0+PpgMixData*A*1000000 / (TIA*D))*B may be calculated first, and then the updated target parameter dc_cancel_code1=H3(Idc_cancel2 / C+dc_cancel_code0) may be calculated. In the calculation process of dc_cancel_code1, there is no need to perform multiplication calculation, which can improve the calculation efficiency of the updated target parameter.

[0045] In the embodiment of the present application, the updated target parameter can be determined simply and quickly by using a formula for calculating the updated target parameter dc_cancel_code1.

[0046] In step 104, the updated target compensation amount can be determined by at least the following two implementation methods:

[0047] In a possible implementation, step 104 includes the following specific processing: determining an updated target compensation amount according to a signal value indicated by the updated target parameter, a gain resistance value of the transimpedance amplifier, and an analog-to-digital conversion rule of the analog-to-digital converter.

[0048] For example, the product of the signal value indicated by the updated target parameter and the gain resistance value is determined as a voltage value, and then the digital quantity corresponding to the voltage value is determined according to the analog-to-digital conversion rule of the analog-to-digital converter, and the digital quantity is used as the updated target compensation amount.

[0049] In the embodiment of the present application, the updated target compensation amount is determined by theoretical deduction, which is convenient and quick.

[0050] In another possible implementation, step 104 includes the following specific processing: according to the updated target parameter, processing the analog signal obtained by sampling the signal to be measured to obtain a second digital quantity; according to the difference between the first digital quantity and the second digital quantity, updating the target compensation amount to obtain an updated target compensation amount.

[0051] In a specific embodiment, after obtaining the updated target parameter, a sampling path can be opened again to sample the signal to be tested once to obtain an analog signal, and the analog signal is processed according to the updated target parameter to obtain a second digital quantity. At this time, since the difference between the first digital quantity and the second digital quantity reflects the difference between the updated target parameter and the target parameter, the target compensation amount can be updated by the difference between the first digital quantity and the second digital quantity to obtain an updated target compensation amount.

[0052] In an embodiment of the present application, compared to determining the updated target compensation amount by theoretical deduction based on the signal value indicated by the updated target parameters, the gain resistance value of the transimpedance amplifier and the analog-to-digital conversion rule of the analog-to-digital converter, in an embodiment of the present application, after the target parameters are updated, the signal to be measured is sampled again, and the analog signal of the current sample is processed according to the updated target parameters to obtain a second digital quantity. There is no need to calibrate data such as the signal value indicated by the updated target parameters and the gain resistance value of the transimpedance amplifier, and the determined updated target compensation amount is more accurate.

[0053] In a possible implementation, the target compensation amount is updated according to the difference between the first digital amount and the second digital amount to obtain the updated target compensation amount, including:

[0054] The updated target compensation amount is calculated by the following formula:

[0055] dre_code1=H1(Rightshift(PpgMixData-PpgDreData,scale)+dre_code0);

[0056] Among them, dre_code1 is the updated target compensation amount, H1() is the first overflow prevention function, Rightshift(PpgMixData-PpgDreData, scale) is the value obtained by shifting the difference between PpgMixData and PpgDreData to the right by scale bits (rounding can be performed during the right shift process), PpgMixData is the first binary digital value, PpgDreData is the second binary digital value, scale is the number of right shift bits, scale is generally any integer from 1 to 8, preferably, scale can be any integer from 1 to 6, and dre_code0 is the target compensation amount.

[0057] It should be noted that H1(Rightshift(PpgMixData-PpgDreData,scale)+dre_code0) is used to indicate that when Rightshift(PpgMixData-PpgDreData,scale)+dre_code0 is less than or equal to the fifth threshold, H1(Rightshift(PpgMixData-PpgDreData,scale)+dre_code0) is equal to the fifth threshold, and when Rightshift(PpgMixData-PpgDreData,scale)+dre_code0 is greater than or equal to the sixth threshold, H1(Rightshift(PpgMixData-PpgDreData,scale)+dre_code0) is greater than or equal to the sixth threshold. e)+dre_code0) is equal to the sixth threshold, when Rightshift(PpgMixData-PpgDreData,scale)+dre_code0 is greater than the fifth threshold and less than the sixth threshold, H1(Rightshift(PpgMixData-PpgDreData,scale)+dre_code0) is equal to Rightshift(PpgMixData-PpgDreData,scale)+dre_code0, wherein the sixth threshold is greater than the fifth threshold, and the specific values ​​of the fifth threshold and the sixth threshold can be the minimum and maximum values ​​that can be stored in the storage bit used to store dre_code1, for example, the fifth threshold is -8388608, and the sixth threshold is 8388607.

[0058] Based on this, the above step 102 includes the following specific processing: calculating the measured signal value of the analog signal by the following formula:

[0059] PPG=H2(Rightshift(PpgMixData,scale)+dre_code0);

[0060] Wherein, PPG is the measured signal value of the analog signal, H2() is the second overflow prevention function, and Rightshift(PpgMixData, scale) is the value obtained by shifting PpgMixData to the right by scale bits (rounding may be performed during the right shift process).

[0061] It should be noted that H2(Rightshift(PpgMixData, scale)+dre_code0) is used to indicate that when Rightshift(PpgMixData, scale)+dre_code0 is less than or equal to the seventh threshold, H2(Rightshift(PpgMixData, scale)+dre_code0) is equal to the seventh threshold, and when Rightshift(PpgMixData, scale)+dre_code0 is greater than or equal to the eighth threshold, H2(Rightshift(PpgMixData, scale)+dre_code0) When Rightshift(PpgMixData-PpgDreData,scale)+dre_code0 is greater than the seventh threshold and less than the eighth threshold, H2(Rightshift(PpgMixData,scale)+dre_code0) is equal to Rightshift(PpgMixData,scale)+dre_code0, wherein the eighth threshold is greater than the seventh threshold, and the specific values ​​of the seventh threshold and the eighth threshold may be respectively the minimum value and the maximum value that can be stored in the storage bit for storing PPG, for example, the seventh threshold is -8388608, and the eighth threshold is 8388607.

[0062] In an embodiment of the present application, the difference between the first digital quantity and the second digital quantity (PpgMixData-PpgDreData) can be amplified by right-shifting the difference between the first digital quantity and the second digital quantity, and then the updated target compensation amount can be amplified. Similarly, the measurement signal value of the analog signal can be amplified by right-shifting the first digital quantity. Therefore, when the signal to be measured is collected, the measurement signal value of the collected analog signal can be amplified by 2-64 times, thereby improving the quality of the collected data.

[0063] In one possible implementation, the processing module is used to periodically sample the signal to be measured. Based on this, the data acquisition method also includes the following processing: after obtaining the first digital quantity, if the first digital quantity is less than or equal to the lowest saturation threshold, or greater than or equal to the highest saturation threshold, stop acquiring the measurement signal value of the analog signal (that is, stop performing the above steps 102, 103 and 104) until a first digital quantity less than the highest saturation threshold and greater than the lowest saturation threshold is obtained, and then perform the above steps 102, 103 and 104 based on the first digital quantity.

[0064] Among them, the lowest saturation threshold and the highest saturation threshold are determined by the signal value range of the signal that the processing module can process, mainly by the signal processing capability of the transimpedance amplifier and the signal processing capability of the analog-to-digital converter, the first threshold is greater than the lowest saturation threshold, and the second threshold is less than the highest saturation threshold.

[0065] In a specific embodiment, the processing module includes a range extension unit, and at least the above step 102 is performed by the range extension unit. Optionally, the above steps 103 and 104 can also be performed by the range extension unit. The embodiment of the present application is not limited to this. Based on this, during the use of the range extension unit, the signal to be measured is suddenly saturated, so that the first digital quantity is less than or equal to the minimum saturation threshold, or greater than or equal to the maximum saturation threshold. At this time, the value of cnt in the range extension unit can be cleared so that the range extension unit no longer performs any operation. It is necessary to wait until the current value of the sampled analog signal decreases, that is, the signal to be measured is unsaturated, and then restart the operation of the range extension unit.

[0066] In an embodiment of the present application, when the first digital quantity is less than or equal to the minimum saturation threshold, or greater than or equal to the maximum saturation threshold, since the corresponding analog signal is in a saturated state, the error of the first digital quantity is large. At this time, not continuing to process based on the first digital quantity can improve the accuracy of collecting the signal to be tested.

[0067] In a possible implementation, the above step 102 is performed by a range extension unit included in the processing module. Based on this, the data acquisition method further includes: when the range extension unit is abnormal, resetting the range extension unit.

[0068] In a specific embodiment, when an abnormality occurs in the range extension unit in a specific scenario, a reset mechanism is required to restore the function of the range extension unit to an initial state. The range extension unit reset may be to clear cnt, dre_code1, dre_code0, dc_cancel_code1 and dc_cancel_code0 in the range extension unit. The range extension unit may be reset by a main switch of the processing module. When the main switch of the processing module is turned off, the range extension unit is reset. The range extension unit may also be reset by a reset switch of the range extension unit. When the reset switch of the range extension unit = 1, the range extension unit is reset. If sampling has been turned on at this time, it needs to be reset at the start of the next sampling. The reset switch of the range extension unit will be automatically cleared to 0 after writing 1.

[0069] Thereby, it is possible to reset the range extension unit when it is abnormal.

[0070] Optionally, after obtaining the updated target parameter, the range extension unit may be notified through an update mark (eg, a DcCancelUpdateFlag mark) to prepare to start the next round of work, ie, to perform data compensation and other processing on the next first digital quantity.

[0071] Optionally, the first digital quantity and the second digital quantity obtained by the processing module may be the result of ambient light suppression on the signal to be measured. The embodiment of the present application does not limit whether the processing module suppresses ambient light on the signal to be measured. In the process of the range extension unit compensating for the first digital quantity, the situation in which the ambient light changes automatically occurs is avoided as much as possible.

[0072] Figure 2 is a schematic diagram of a measurement signal value of an embodiment of the present application, such as Figure 2 As shown, based on the fact that the signal to be measured is a PPG signal, LED is a light-emitting element for emitting light to illuminate the skin surface and thus generating a PPG signal, a box marked with LED is filled to indicate that the LED is emitting light, DRE is a range extension unit, a box marked with DRE is filled to indicate that the DRE is working, a box marked with DRE is not filled to indicate that the DRE is not working, THR_H is a second threshold, THR_L is a first threshold, and Figure 2 It can be seen that after the target parameters are updated, the next first digital quantity can be processed according to the updated target parameters and the updated target compensation amount. Specifically, after the target parameters are updated, for the analog signal obtained by the next sampling of the signal to be measured, the processing module can process the analog signal according to the updated target parameters to obtain the first digital quantity, and then compensate the first digital quantity by the updated target compensation amount to obtain the measurement signal value of the analog signal.

[0073] Processing Module

[0074] Corresponding to the above method embodiment, Figure 3 A schematic diagram of a processing module according to an embodiment of the present application is shown. Figure 3 As shown, the processing module 300 includes:

[0075] A signal processing unit 301 is used to process an analog signal obtained by sampling the signal to be measured according to a target parameter to obtain a first digital value, wherein the target parameter is used to indicate a signal value of a signal that cancels at least part of the analog signal;

[0076] A numerical compensation unit 302, configured to compensate the first digital value according to a target compensation value to obtain a measurement signal value of the analog signal;

[0077] A first updating unit 303, configured to update the target parameter according to the first digital quantity to obtain an updated target parameter when the first digital quantity meets a parameter update condition;

[0078] The second updating unit 304 is used to update the target compensation amount according to the updated target parameter to obtain an updated target compensation amount.

[0079] In an embodiment of the present application, the signal processing unit 301 can process the analog signal obtained by sampling the signal to be measured according to the target parameters to obtain a first digital quantity. The numerical compensation unit 302 can compensate the first digital quantity according to the target compensation quantity to obtain a measurement signal value of the analog signal. The first update unit 303 updates the target parameter according to the first digital quantity when the first digital quantity meets the parameter update condition to obtain an updated target parameter. The second update unit 304 updates the target compensation quantity according to the updated target parameter to obtain an updated target compensation quantity. Therefore, in the process of processing the analog signal obtained by sampling the test signal according to the target parameter, at least part of the analog signal is offset by a signal whose signal value is the signal value indicated by the target parameter, so that the first digital quantity is determined according to the offset signal, and the first digital signal is subsequently compensated by the target compensation amount to obtain the measurement signal value of the analog signal, thereby realizing the acquisition of the test signal, and the target parameter and the target compensation amount can be updated according to the first digital quantity. Compared with directly determining the first digital quantity according to the analog signal, the setting of the target parameter and the target compensation amount in the present application realizes the expansion of the signal range that the processing module can process, and tries to avoid the problem that the processing module cannot collect valid data due to the test signal being too large or too small in the process of collecting the test signal, thereby improving the efficiency of the measurement signal value of the analog signal obtained by collecting the test signal, thereby improving the efficiency of signal acquisition.

[0080] It should be noted that the processing module of this embodiment is used to implement the corresponding data processing method in the aforementioned method embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.

[0081] Electronic devices

[0082] Figure 4 This is a schematic block diagram of an electronic device provided in an embodiment of the present application. The specific embodiment of the present application does not limit the specific implementation of the electronic device. Figure 4 As shown, the electronic device may include: a processor (processor) 402, a communication interface (Communications Interface) 404, a memory (memory) 406, and a communication bus 408. Among them:

[0083] The processor 402 , the communication interface 404 , and the memory 406 communicate with each other via a communication bus 408 .

[0084] The communication interface 404 is used to communicate with other electronic devices or servers.

[0085] The processor 402 is used to execute the program 410, and specifically can execute the relevant steps in any of the aforementioned data processing method embodiments.

[0086] Specifically, the program 410 may include program codes, which include computer operation instructions.

[0087] The processor 402 may be a CPU, or an application specific integrated circuit ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of the present application. The one or more processors included in the smart device may be processors of the same type, such as one or more CPUs; or processors of different types, such as one or more CPUs and one or more ASICs.

[0088] RISC-V is an open source instruction set architecture based on the Reduced Instruction Set (RISC) principle. It can be applied to various aspects such as single-chip microcomputers and FPGA chips. Specifically, it can be applied to the fields of IoT security, industrial control, mobile phones, personal computers, etc., and because it is designed with small, fast, and low-power realities in mind, it is particularly suitable for modern computing devices such as warehouse-scale cloud computers, high-end mobile phones, and tiny embedded systems. With the rise of artificial intelligence Internet of Things (AIoT), the RISC-V instruction set architecture has also received more and more attention and support, and is expected to become the next generation of widely used CPU architecture.

[0089] The computer operation instructions in the embodiments of the present application may be computer operation instructions based on the RISC-V instruction set architecture, and correspondingly, the processor 402 may be designed based on the RISC-V instruction set. Specifically, the chip of the processor in the electronic device provided in the embodiments of the present application may be a chip designed with the RISC-V instruction set, and the chip may execute executable code based on the configured instructions, thereby realizing the data processing method in the above embodiments.

[0090] The memory 406 is used to store the program 410. The memory 406 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.

[0091] The program 410 may be specifically used to enable the processor 402 to execute the data processing method in any of the aforementioned embodiments.

[0092] The specific implementation of each step in program 410 can refer to the corresponding description of the corresponding steps and units in any of the aforementioned data processing method embodiments, which will not be repeated here. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working process of the above-described devices and modules can refer to the corresponding process description in the aforementioned method embodiments, which will not be repeated here.

[0093] Through the electronic device of the embodiment of the present application, in the process of processing the analog signal obtained by sampling the signal to be measured according to the target parameter, at least part of the analog signal is offset by a signal whose signal value is the signal value indicated by the target parameter, so that the first digital quantity is determined according to the offset signal, and the first digital signal is subsequently compensated by the target compensation amount to obtain the measurement signal value of the analog signal, thereby realizing the acquisition of the signal to be measured, and the target parameter and the target compensation amount can be updated according to the first digital quantity. Compared with directly determining the first digital quantity according to the analog signal, the setting of the target parameter and the target compensation amount in the present application realizes the expansion of the signal range that the processing module can process, and tries to avoid the problem that the processing module cannot collect valid data due to the signal to be measured being too large or too small in the process of collecting the signal to be measured, thereby improving the efficiency of the measurement signal value of the analog signal obtained by collecting the signal to be measured, and thereby improving the efficiency of signal acquisition.

[0094] Computer storage media

[0095] The present application also provides a computer-readable storage medium storing instructions for causing a machine to execute the data processing method as described herein. Specifically, a system or device equipped with a storage medium may be provided, on which a software program code implementing the functions of any of the above embodiments is stored, and a computer (or CPU or MPU) of the system or device is enabled to read and execute the program code stored in the storage medium.

[0096] In this case, the program code read from the storage medium itself can implement the function of any one of the above embodiments, so the program code and the storage medium storing the program code constitute part of the present application.

[0097] The storage medium embodiments for providing the program code include a floppy disk, a hard disk, a magneto-optical disk, an optical disk (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), a magnetic tape, a non-volatile memory card, and a ROM. Alternatively, the program code can be downloaded from a server computer by a communication network.

[0098] Computer program product

[0099] An embodiment of the present application also provides a computer program product, including computer instructions, which instruct a computing device to perform any corresponding operation in the above-mentioned multiple method embodiments.

[0100] It should be noted that the user-related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data used to train the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0101] It should be pointed out that, according to the needs of implementation, the various components / steps described in the embodiments of the present application can be split into more components / steps, or two or more components / steps or partial operations of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of the present application.

[0102] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or implemented as software or computer code that can be stored in a recording medium (such as a CD ROM, RAM, floppy disk, hard disk or magneto-optical disk), or implemented as a computer code originally stored in a remote recording medium or a non-temporary machine-readable medium downloaded through a network and to be stored in a local recording medium, so that the method described herein can be stored in such software processing on a recording medium using a general-purpose computer, a special-purpose processor or programmable or special-purpose hardware (such as an ASIC or FPGA). It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component (e.g., RAM, ROM, flash memory, etc.) that can store or receive software or computer code, and when the software or computer code is accessed and executed by a computer, a processor or hardware, the method described herein is implemented. In addition, when a general-purpose computer accesses the code for implementing the method shown here, the execution of the code converts the general-purpose computer into a special-purpose computer for executing the method shown here.

[0103] It should be noted that the user-related information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to sample data used to train the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of the present application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0104] Those of ordinary skill in the art will appreciate that the units and method steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for specific applications, but such implementation should not be considered to be beyond the scope of the embodiments of the present application.

[0105] The above implementation methods are only used to illustrate the embodiments of the present application, and are not limitations on the embodiments of the present application. Ordinary technicians in the relevant technical field can make various changes and modifications without departing from the spirit and scope of the embodiments of the present application. Therefore, all equivalent technical solutions also belong to the scope of the embodiments of the present application. The scope of patent protection of the embodiments of the present application should be limited by the claims.

Claims

1. A data processing method, characterized in that: Applicable to processing modules, including: Processing an analog signal obtained by sampling the signal to be measured according to a target parameter to obtain a first digital quantity, wherein the target parameter is used to indicate a signal value of a signal that cancels at least a portion of the analog signal; Compensating the first digital value according to a target compensation amount to obtain a measurement signal value of the analog signal; If the first digital quantity meets the parameter update condition, the target parameter is updated according to the first digital quantity to obtain an updated target parameter; The target compensation amount is updated according to the updated target parameter to obtain an updated target compensation amount.

2. The method according to claim 1, characterized in that The updating of the target compensation amount according to the updated target parameter to obtain the updated target compensation amount includes: According to the updated target parameter, processing an analog signal obtained by sampling the signal to be measured to obtain a second digital value; The target compensation amount is updated according to the difference between the first digital amount and the second digital amount to obtain the updated target compensation amount.

3. The method according to claim 2, characterized in that The updating of the target compensation amount according to the difference between the first digital amount and the second digital amount to obtain the updated target compensation amount includes: The updated target compensation amount is calculated by the following formula: dre_code1=H1(Rightshift(PpgMixData-PpgDreData,scale)+dre_code0); Among them, dre_code1 is the updated target compensation amount, H1() is the first overflow prevention function, Rightshift(PpgMixData-PpgDreData, scale) is the value obtained by shifting the difference between PpgMixData and PpgDreData to the right by scale bits, PpgMixData is the first binary digital quantity, PpgDreData is the second binary digital quantity, scale is the number of right shift bits, and dre_code0 is the target compensation amount.

4. The method according to claim 3, characterized in that The compensating the first digital quantity according to the target compensation quantity to obtain the measurement signal value of the analog signal includes: The measured signal value of the analog signal is calculated by the following formula: PPG=H2(Rightshift(PpgMixData,scale)+dre_code0); Wherein, PPG is the measured signal value of the analog signal, H2() is the second overflow prevention function, and Rightshift(PpgMixData, scale) is the value obtained by shifting PpgMixData to the right by scale bits.

5. The method according to claim 1, characterized in that The analog signal is a current signal; The step of processing, according to the target parameter, an analog signal obtained by sampling the signal to be measured to obtain a first digital value comprises: Outputting a signal whose signal value is the signal value indicated by the target parameter through a signal output unit, offsetting at least a part of the analog signal, and obtaining an offset analog signal; Converting the offset analog signal into a voltage signal through a transimpedance amplifier included in the processing module; The voltage signal is converted into the first digital value by an analog-to-digital converter included in the processing module.

6. The method according to claim 5, characterized in that The updating of the target compensation amount according to the updated target parameter to obtain the updated target compensation amount includes: The updated target compensation amount is determined according to the signal value indicated by the updated target parameter, the gain resistance value of the transimpedance amplifier, and the analog-to-digital conversion rule of the analog-to-digital converter.

7. The method according to claim 5, characterized in that The updating of the target parameter according to the first digital quantity to obtain an updated target parameter includes: The updated target parameter is calculated by the following formula: dc_cancel_code1=H3((Idc_cancel0+PpgMixData*A*1000000 / (TIA*D))*B / C+dc_cancel_cod e0); Among them, H3() is the third overflow prevention function, dc_cancel_code1 is the updated target parameter, Idc_cancel0 is the signal value indicated by the target parameter, the unit of Idc_cancel0 is microampere, PpgMixData is the first digital quantity, A is the proportional coefficient of the analog-to-digital converter, TIA is the gain resistance value of the transimpedance amplifier, the unit of TIA is ohm, D is the maximum value output by the analog-to-digital converter, B is the maximum storage value of the storage bit used to store the target parameter, C is the maximum signal value of the output signal of the signal output unit, and dc_cancel_code0 is the target parameter.

8. The method according to claim 1, characterized in that The processing module is used to periodically sample the signal to be measured; The method further comprises: If the first digital quantity is a digital quantity corresponding to an analog signal obtained by sampling the signal to be tested for the i-th time, and in the i-cnt+1-th sampling of the signal to be tested to the i-th sampling, the digital quantities corresponding to the analog signal obtained in each sampling are greater than or equal to the first threshold, or are less than or equal to the second threshold, then it is determined that the first digital quantity meets the parameter update condition; otherwise, the first digital quantity does not meet the parameter update condition, wherein i and cnt are both positive integers, cnt is less than or equal to i, and the first threshold is greater than the second threshold.

9. The method according to claim 1, characterized in that: The processing module is used to periodically sample the signal to be measured; The method further comprises: After obtaining the first digital quantity, if the first digital quantity is less than or equal to the minimum saturation threshold, or greater than or equal to the maximum saturation threshold, stop obtaining the measurement signal value of the analog signal until a first digital quantity less than the maximum saturation threshold and greater than the minimum saturation threshold is obtained.

10. The method according to claim 1, characterized in that The step of compensating the first digital quantity according to the target compensation quantity to obtain the measurement signal value of the analog signal is performed by a range extension unit included in the processing module; The method further comprises: When the range extension unit is abnormal, the range extension unit is reset.

11. A processing module, characterized in that: include: a signal processing unit, configured to process an analog signal obtained by sampling the signal to be measured according to a target parameter to obtain a first digital quantity, wherein the target parameter is used to indicate a signal value of a signal that cancels at least part of the analog signal; A numerical compensation unit, used to compensate the first digital value according to a target compensation value to obtain a measurement signal value of the analog signal; a first updating unit, configured to update the target parameter according to the first digital quantity to obtain an updated target parameter when the first digital quantity meets a parameter updating condition; The second updating unit is used to update the target compensation amount according to the updated target parameter to obtain an updated target compensation amount.

12. An electronic device, characterized in that: include: A processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store at least one executable instruction, and the executable instruction enables the processor to execute an operation corresponding to the data processing method according to any one of claims 1 to 10.

13. A computer storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the data processing method according to any one of claims 1 to 10 is implemented.

14. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions instruct a computing device to execute the data processing method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Signal processing method and device, electronic equipment and storage medium

    CN111641412A

  • Analog-to-digital conversion method and device, chip, electronic equipment and storage medium

    CN111819796A

  • Blood pressure value processing method and device and electronic equipment

    CN115281637A

  • Voltage measurement method and system, electronic equipment and nonvolatile storage medium

    CN115436694A

  • Clock generator with dual-path temperature compensation

    US10594301B1