Signal processing method, data acquisition method, processing module, electronic device, and storage medium
By updating parameter information and setting target identifiers in the parameter register, digital signal processing under different parameters is distinguished, thus solving the PPG signal measurement error problem caused by the failure to update analog front-end parameters in a timely manner and achieving more accurate signal processing.
Patent Information
- Application Number
- CN202411419675.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2044-10-11
AI Technical Summary
After the microcontroller sends the updated parameter information to the analog front-end, the analog front-end fails to update in time, resulting in a large error in the measured value of the PPG signal.
The first parameter information is stored in the parameter register, the signal under test is processed to obtain the first digital signal, and the register is updated after receiving the second parameter information to distinguish between the first and second digital signals and set the target identifier so that the second processing module can process according to the different parameter information.
This reduces signal processing errors and improves the measurement accuracy of PPG signals.
Smart Images

Figure CN119279545B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and more particularly to a signal processing method, a data acquisition method, a processing module, an electronic device, and a storage medium. Background Technology
[0002] Currently, in the process of acquiring analog signals, considering factors such as the quality and cost of the acquired signals, the method of converting analog signals into digital signals is usually adopted for acquisition.
[0003] For example, in the process of acquiring optical volumetric spectroscopy (PPG) signals, the light-emitting element can emit light to illuminate the skin surface, the receiver receives the reflected light signal and converts it into a PPG signal. The analog front end converts the PPG signal into a corresponding digital signal based on the parameter information sent by the microcontroller unit. After acquiring the digital signal corresponding to the PPG signal, the microcontroller unit will restore the digital signal according to the current parameter information to obtain the measured value of the PPG signal, thus realizing the acquisition of PPG signals. In addition, the microcontroller unit can also determine whether the current parameter information needs to be updated based on the measured value of the PPG signal.
[0004] However, after the microcontroller sends the updated parameter information to the analog front-end, if the parameter information in the analog front-end is not updated in time, the analog front-end will still determine the digital signal corresponding to the PPG signal based on the parameter information before the update, and the microcontroller will restore the digital signal based on the updated parameter information. This will cause a large error in the measured value of the PPG signal, thus causing a large signal processing error. Summary of the Invention
[0005] In view of the above, embodiments of this application provide a signal processing method, a data acquisition 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 the embodiments of this application, a signal processing method is provided, applied to a first processing module. The method includes: processing an analog signal obtained by sampling a signal to be tested according to first parameter information stored in a parameter register to obtain a first digital signal; after receiving second parameter information sent by a second processing module, replacing the first parameter information in the parameter register with the second parameter information; processing the analog signal obtained by sampling the signal to be tested according to the second parameter information stored in the parameter register to obtain a second digital signal, and setting a target identifier for the first second digital signal obtained by processing according to the second parameter information; wherein the target identifier is used to instruct the second processing module to process the first digital signal according to the first parameter information to obtain a first target measurement value of the signal to be tested, and to process the second digital signal and subsequent digital signals according to the second parameter information to obtain a second target measurement value of the signal to be tested.
[0007] According to a second aspect of the embodiments of this application, a data acquisition method is provided, applied to a second processing module. The data acquisition method includes: acquiring at least one digital signal from the head of a queue stored in a first processing module, wherein the digital signal is obtained by the first processing module through processing an analog signal sampled from a signal to be tested, and the digital signals in the queue are arranged in the order in which the analog signals corresponding to the digital signals are sampled; determining whether there is a digital signal with a target identifier among the at least one digital signal, wherein at most one digital signal with the target identifier exists among the at least one digital signal, and the target identifier is used to indicate the digital signals preceding the digital signal with the target identifier among the at least one digital signal. The first digital signal is defined as a digital signal with the target identifier, and the digital signals following the digital signal with the target identifier are defined as the second digital signal. The first digital signal is obtained by the first processing module based on the first parameter information, and the second digital signal is obtained by the first processing module based on the second parameter information. If there is a digital signal with the target identifier among the at least one digital signal, then the first digital signal among the at least one digital signal is processed according to the first parameter information to obtain the first target measurement value of the signal under test, and the second digital signal among the at least one digital signal is processed according to the second parameter information to obtain the second target measurement value of the signal under test.
[0008] According to a third aspect of the embodiments of this application, a first processing module is provided, comprising: a first processing unit, configured to process an analog signal obtained by sampling a signal under test according to first parameter information stored in a parameter register to obtain a first digital signal; an information replacement unit, configured to replace the first parameter information in the parameter register with the second parameter information after receiving second parameter information sent by a second processing module; and a second processing unit, configured to process the analog signal obtained by sampling the signal under test according to the second parameter information stored in the parameter register to obtain a second digital signal, and set a target identifier for the first second digital signal obtained by processing according to the second parameter information; wherein the target identifier is used to instruct the second processing module to process the first digital signal according to the first parameter information to obtain a first target measurement value of the signal under test, and to process the second digital signal and subsequent digital signals according to the second parameter information to obtain a second target measurement value of the signal under test.
[0009] According to a fourth aspect of the embodiments of this application, a second processing module is provided, comprising: a signal acquisition unit, configured to acquire at least one digital signal from the head of a queue stored in a first processing module, wherein the digital signal is obtained by the first processing module through processing an analog signal sampled from a signal to be tested, and the digital signals in the queue are arranged in the order in which the analog signals corresponding to the digital signals are sampled; and a signal determination unit, configured to determine whether there is a digital signal with a target identifier among the at least one digital signal, wherein at most one digital signal with the target identifier exists among the at least one digital signal, and the target identifier is used to indicate that each digital signal preceding the digital signal with the target identifier is a first digital signal. The digital signal includes a digital signal with the target identifier and all subsequent digital signals after the digital signal with the target identifier as the second digital signal. The first digital signal is obtained by the first processing module based on the first parameter information, and the second digital signal is obtained by the first processing module based on the second parameter information. The data acquisition unit is used to process the first digital signal with the target identifier in the at least one digital signal according to the first parameter information to obtain a first target measurement value of the signal under test, and to process the second digital signal in the at least one digital signal according to the second parameter information to obtain a second target measurement value of the signal under test.
[0010] According to a fifth aspect of the present application, an electronic device is provided, including: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other through the communication bus; the memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the method of the first aspect or the operation corresponding to the method of the second aspect.
[0011] According to a sixth aspect of the embodiments of this application, a computer storage medium is provided, on which a computer program is stored, the program being executed by a processor using the methods of the first or second aspect described above.
[0012] According to a seventh aspect of the embodiments of this application, a computer program product is provided, including computer instructions that instruct a computing device to perform the methods of the first or second aspect described above.
[0013] According to the signal processing scheme provided in the embodiments of this application, the first processing module processes the analog signal obtained by sampling the signal under test based on the first parameter information stored in the parameter register to obtain a first digital signal. Then, after receiving the second parameter information sent by the second processing module, it replaces the first parameter information in the parameter register with the second parameter information, and processes the analog signal obtained by sampling the signal under test based on the second parameter information stored in the parameter register to obtain a second digital signal. A target identifier is set for the first second digital signal obtained by processing based on the second parameter information. Thus, the target identifier can be used to distinguish between the first digital signal obtained by processing based on the first parameter information and the second digital signal obtained by processing based on the second parameter information, so that the second processing module can process the first digital signal based on the first parameter information and also process the second digital signal based on the second parameter information, reducing the possibility of processing the second digital signal based on the first parameter information and reducing signal processing errors. Attached Figure Description
[0014] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings.
[0015] Figure 1 This is a flowchart of a signal processing method according to an embodiment of this application;
[0016] Figure 2 This is a schematic diagram of a first processing module and a second processing module according to an embodiment of this application;
[0017] Figure 3This is a timing diagram of the first processing module in one embodiment of this application;
[0018] Figure 4 This is a timing diagram of the first processing module in another embodiment of this application;
[0019] Figure 5 This is a flowchart of a data acquisition method according to an embodiment of this application;
[0020] Figure 6 This is a schematic diagram of the first processing module according to an embodiment of this application;
[0021] Figure 7 This is a schematic diagram of the second processing module according to an embodiment of this application;
[0022] Figure 8 This is a schematic diagram of an electronic device according to an embodiment of this application. Detailed Implementation
[0023] Signal processing methods
[0024] This application provides a signal processing method applied to a first processing module, which may be an analog front end (AFE) or the like. This application does not limit the specific application to this method.
[0025] The signal processing method will be described in detail below through several embodiments.
[0026] Figure 1 This is a flowchart of a signal processing method according to an embodiment of this application. Figure 1 As shown, the signal processing method includes the following steps:
[0027] Step 101: Based on the first parameter information stored in the parameter register, process the analog signal obtained by sampling the signal to be tested to obtain the first digital signal.
[0028] The signal to be tested is an analog signal, such as a continuous or discontinuous analog PPG signal, and the parameter register is set in the first processing module.
[0029] In one specific implementation, the first processing module periodically samples the signal to be tested. For the analog signal obtained in the current sampling, the analog signal can be processed according to the first parameter information currently stored in the parameter register to obtain the first digital signal.
[0030] Step 102: After receiving the second parameter information sent by the second processing module, replace the first parameter information in the parameter register with the second parameter information.
[0031] The second processing module can be a microcontroller unit (MCU), etc.
[0032] In one specific implementation, if the second processing module detects that the first parameter information needs to be updated, the second processing module will send the second parameter information to the buffer of the first processing module. After the second processing module finishes sending the second parameter information, and before the next sampling of the signal to be tested, the first processing module will replace the first parameter information in the parameter register with the received second parameter information to update the parameter information.
[0033] Step 103: Based on the second parameter information stored in the parameter register, process the analog signal obtained by sampling the signal to be tested to obtain the second digital signal, and set a target identifier for the first second digital signal obtained by processing based on the second parameter information.
[0034] The target identifier is used to instruct the second processing module to process the first digital signal according to the first parameter information to obtain the first target measurement value of the signal under test, and to process the second digital signal and the digital signal after the second digital signal according to the second parameter information to obtain the second target measurement value of the signal under test.
[0035] It should be noted that the digital signal following the second digital signal refers to the digital signal obtained by the first processing module from the analog signal sampled from the signal under test, after the first second digital signal mentioned above and before the second parameter information in the parameter register is updated.
[0036] In one specific implementation, based on the periodic sampling of the signal under test by the first processing module, after the first parameter information in the parameter register is updated to the second parameter information, the first processing module processes the analog signal obtained by sampling the signal under test according to the second parameter information stored in the parameter register to obtain a second digital signal, and sets a target identifier for the first obtained second digital signal, so that the second processing module can process the first digital signal according to the first parameter information to obtain the first target measurement value of the signal under test corresponding to the first digital signal, and the second processing module can process the second digital signal and the digital signals after the second digital signal according to the first parameter information to obtain the second target measurement value of the corresponding signal under test.
[0037] In addition, a non-target identifier can be set for each digital signal other than the first and second digital signals (whether it is the first or the second digital signal). The non-target identifier is different from the target identifier. For example, the non-target identifier is 0 and the target identifier is 1.
[0038] In this embodiment, the first processing module processes the analog signal obtained by sampling the signal under test based on the first parameter information stored in the parameter register to obtain a first digital signal. Then, after receiving the second parameter information sent by the second processing module, it replaces the first parameter information in the parameter register with the second parameter information. It then processes the analog signal obtained by sampling the signal under test based on the second parameter information stored in the parameter register to obtain a second digital signal, and sets a target identifier for the first second digital signal obtained based on the second parameter information. Thus, the target identifier can be used to distinguish between the first digital signal obtained based on the first parameter information and the second digital signal obtained based on the second parameter information, enabling the second processing module to process both the first and second digital signals based on the first parameter information, reducing the possibility of processing the second digital signal based solely on the first parameter information and lowering signal processing errors.
[0039] In one possible implementation, the signal to be measured is an optical volumetric recording signal (PPG signal), the analog signal is a current signal, the first digital signal is a voltage signal, and the second digital signal is a voltage signal.
[0040] Figure 2 This is a schematic diagram of the first processing module and the second processing module according to an embodiment of this application, as shown below. Figure 2 As shown, the first processing module AFE includes a TX unit connected to an LED and an RX unit connected to a photodiode PD. The LED emits light to illuminate the skin surface under the drive of the driver DRV included in the TX unit. The PD receives the reflected light signal and converts it into a PD current signal, which is the PPG signal. The AFE periodically samples the PPG signal through the RX unit to obtain the analog signal input to the RX unit. The RX unit outputs a digital voltage signal based on the analog signal, which is either the first digital signal or the second digital signal. The first and second digital signals are stored sequentially in a FIFO queue (the digital signals stored in the FIFO are generally binary values) according to the order in which the corresponding analog signals are sampled. The second processing module MCU connected to the AFE reads the data stored in the FIFO. In addition, the AFE also includes a logic controller, a parameter buffer controller, a data flag, and a bus. The Control controller is used to control the periodic sampling of the PPG signal by the AFE through the RX unit. The parameter buffer controller is used to control the reception of the second parameter information through the buffer of the AFE. The data marker is used to set the target and non-target identifiers for the digital signals stored in the FIFO. The BUS is used to connect the AFE and the MCU through the communication connection line to realize the connection between the AFE and the MCU.
[0041] The sampling period of the first processing module for the signal under test can generally be set to 20 milliseconds to 60 milliseconds. For example, the sampling period of the first processing module for the signal under test can be set to 40 milliseconds. This application embodiment does not limit this.
[0042] In the embodiments of this application, by using the optical volumetric recording signal as the signal to be measured, the error in processing the optical volumetric recording signal can be reduced.
[0043] In one possible implementation, step 101 above includes the following specific processing: according to the first current value included in the first parameter information, controlling the current cancellation unit included in the first processing module to output a current with a current value of the first current value, so that at least a portion of the analog signal obtained by sampling the signal to be tested is cancelled to obtain a first cancelled signal; according to the first parameter information, processing the first cancelled signal to obtain a first digital signal.
[0044] In one specific implementation, such as Figure 2 As shown, the RX unit includes a current cancellation unit (dc cancel). During the process of processing the analog signal to obtain the first digital signal based on the first parameter information (including the first current value), dc cancel provides a current with a value opposite to the PD current, equal to the first current value, so that at least a portion of the analog signal obtained by sampling the signal under test is canceled, resulting in a first canceled signal. The TX unit then obtains the first digital signal based on the first canceled signal. It should be noted that the first current value is relatively small compared to the analog signal value; therefore, the current output by dc cancel does not cause the analog signal to be reversed with the first canceled signal.
[0045] In this embodiment, the output current of the current cancellation unit can cancel at least part of the analog signal, reducing the possibility of errors caused by excessive analog current saturation of the first processing module, thereby making the signal processing more accurate.
[0046] In one possible implementation, the first canceled signal is processed according to the first parameter information to obtain a first digital signal, including the following specific processing: adjusting the gain of the transimpedance amplifier included in the first processing module to the first gain included in the first parameter information; inputting the first canceled signal into the transimpedance amplifier to obtain a first voltage signal output by the transimpedance amplifier; and inputting the first voltage signal into the analog-to-digital converter included in the first processing module to obtain a first digital signal output by the analog-to-digital converter.
[0047] In one specific implementation, such as Figure 2As shown, the RX unit also includes a transimpedance amplifier (TIA) and an analog-to-digital converter (ADC). In the process of processing the analog signal to obtain the first digital signal according to the first parameter information (including the first gain), after obtaining the first canceled signal, the first canceled signal is input into the TIA, the TIA outputs the analog first voltage signal, and the ADC then converts the analog first voltage signal into the first digital signal.
[0048] In this embodiment, the first processing module can convert the first canceled signal, which is a current signal, into a first voltage signal through a transimpedance amplifier, and then convert the analog first voltage signal into a first digital signal through an analog-to-digital converter, thereby realizing the scheme of converting the analog signal obtained by sampling the PPG signal into a digital signal.
[0049] Based on this, the signal value of the first digital signal, ADC code1 = (I1 PD –I1 dc cancel )*tia1, where ADCcode1 is in units of I1. PD For LSB, I1 PD I1 is the signal value (in μA) corresponding to the analog signal processed by the first processing module based on the first parameter information stored in the parameter register. dc cancel tia1 is the first current value (in μA), and tia1 is the first gain (in LSB / μA).
[0050] In one possible implementation, step 103 above, which processes the analog signal obtained by sampling the signal under test according to the second parameter information stored in the parameter register to obtain the second digital signal, includes the following specific processing: according to the second current value included in the second parameter information, controlling the current cancellation unit included in the first processing module to output a current with a current value of the second current value, so that at least a part of the analog signal obtained by sampling the signal under test is cancelled to obtain the second cancelled signal; and processing the second cancelled signal according to the second parameter information to obtain the second digital signal.
[0051] In one specific implementation, such as Figure 2As shown, the RX unit includes a current cancellation unit (dc cancel). During the process of processing the analog signal to obtain the second digital signal based on the second parameter information (including the second current value), dc cancel provides a current with a value opposite to the PD current, equal to the second current value, so that at least a portion of the analog signal obtained by sampling the signal under test is canceled, resulting in a second canceled signal. The TX unit then obtains the second digital signal based on the second canceled signal. It should be noted that the second current value is relatively small compared to the analog signal value; therefore, the current output by dc cancel does not cause the analog signal to be reversed with the second canceled signal.
[0052] In this embodiment, the output current of the current cancellation unit can cancel at least part of the analog signal, reducing the possibility of errors caused by excessive analog current saturation of the first processing module, thereby making the signal processing more accurate.
[0053] In one possible implementation, the above-mentioned processing of the second canceled signal according to the second parameter information to obtain the second digital signal includes the following specific processing: adjusting the gain of the transimpedance amplifier included in the first processing module to the second gain included in the second parameter information; inputting the second canceled signal into the transimpedance amplifier to obtain the second voltage signal output by the transimpedance amplifier; and inputting the second voltage signal into the analog-to-digital converter included in the first processing module to obtain the second digital signal output by the analog-to-digital converter.
[0054] In one specific implementation, such as Figure 2 As shown, the RX unit also includes a transimpedance amplifier (TIA) and an analog-to-digital converter (ADC). In the process of processing the analog signal to obtain the second digital signal according to the second parameter information (including the second gain), after obtaining the second canceled signal, the second canceled signal is input into the TIA so that the TIA outputs an analog second voltage signal, and the ADC then converts the analog second voltage signal into a second digital signal.
[0055] In this embodiment, the first processing module can convert the second canceled signal, which is a current signal, into a second voltage signal through a transimpedance amplifier, and then convert the analog second voltage signal into a second digital signal through an analog-to-digital converter, thereby realizing the scheme of converting the analog signal obtained by sampling the PPG signal into a digital signal.
[0056] Based on this, the signal value of the second digital signal, ADC code2 = (I2) PD –I2 dc cancel )*tia2, where ADCcode2 is in units of I1. PD For LSB, I2 PDI2 is the signal value (in μA) of the analog signal processed by the first processing module based on the second parameter information stored in the parameter register. dc cancel tia2 is the second current value (in μA), and tia2 is the second gain (in LSB / μA).
[0057] By updating the parameter information stored in the parameter register, the first processing module can adjust the gain of the transimpedance amplifier and the output current of the current cancellation unit, thereby adjusting the measurement range of the first processing module so that it can obtain more effective data in the process of processing PPG signals.
[0058] In one possible implementation, the signal processing method further includes: if, starting from the receipt of a start command sent by the second processing module, an end command is received within a waiting period, then it is determined that second parameter information sent by the second processing module has been received, wherein the start command is used to indicate the start of sending the second parameter information, and the end command is used to indicate the end of sending the second parameter information; if, starting from the receipt of the start command, no end command is received within the waiting period, then, starting from the receipt of the start command, after the waiting period, it is determined that second parameter information sent by the second processing module has been received.
[0059] Figure 3 This is a timing diagram of the first processing module in one embodiment of this application, as shown below. Figure 3 As shown, the old parameter is the first parameter information, and the new parameter is the second parameter information. The length of the bar marked with the word "wait" is used to indicate the waiting time. Based on this, after the AFE samples the PPG signal once, the MCU sends a start command corresponding to the second parameter information to the AFE. Then, the MCU sends the second parameter information to the AFE within the waiting time and sends an end command corresponding to the second parameter information to the AFE within the waiting time. At this time, it can be determined that the AFE has received the second parameter information sent by the second processing module.
[0060] Figure 4 This is a timing diagram of the first processing module in another embodiment of this application, as shown below. Figure 4 As shown, the old parameter is the first parameter information, and the new parameter is the second parameter information. The length of the bar marked with the word "wait" is used to indicate the waiting time. Based on this, after the AFE samples the PPG signal once, the MCU sends the start command corresponding to the second parameter information to the AFE. Then, the MCU sends the second parameter information to the AFE within the waiting time, but does not send the end command corresponding to the second parameter information to the AFE until the waiting time ends. At this time, it can also be determined that the AFE has received the second parameter information sent by the second processing module.
[0061] In this embodiment of the application, by setting a scheme that if no end command is received within the waiting period after receiving the start command, the second parameter information sent by the second processing module is determined to have been received after the waiting period, the problem of the first parameter information not being able to be updated due to the AFE not receiving the end command caused by software or hardware problems can be avoided as much as possible.
[0062] Data acquisition methods
[0063] This application provides a data acquisition method, which is applied to a second processing module. The second processing module can be a microcontroller unit (MCU) or the like, but this application does not limit it.
[0064] The data acquisition method will be described in detail below through several embodiments.
[0065] Figure 5 This is a flowchart of a data acquisition method according to an embodiment of this application. Figure 5 As shown, the data acquisition method includes the following steps:
[0066] Step 501: Obtain at least one digital signal from the head of the queue stored in the first processing module.
[0067] The digital signal is obtained by the first processing module through sampling the signal to be tested. The digital signals in the queue are arranged in the order in which the corresponding analog signals are sampled. The digital signal is either the first digital signal or the second digital signal in the above-described signal processing method embodiment.
[0068] It should be noted that, in the embodiments of this application, step 501 refers to the process after the first parameter information in the parameter register is updated to the second parameter information, starting from the at least one digital signal obtained from the head of the queue including at least a portion of the second digital signal, and ending before the at least one digital signal obtained from the head of the queue includes a third digital signal (the third digital signal is a digital signal obtained by the first processing module by processing the analog signal sampled from the signal to be tested according to the third parameter information stored in the parameter register for replacing the second parameter information). During this process, at least one digital signal is obtained from the head of the queue. Therefore, if the at least one digital signal is a single digital signal, then the digital signal is the second digital signal; if the at least one digital signal is multiple digital signals, then the multiple digital signals include at least one first digital signal and at least one second digital signal, or all the digital signals in the multiple digital signals are second digital signals.
[0069] Step 502: Determine whether there is a digital signal with a target identifier among the above at least one digital signal.
[0070] Among the at least one digital signal, there is at most one digital signal with a target identifier. The target identifier is used to indicate that each digital signal before the digital signal with the target identifier is a first digital signal, the digital signal with the target identifier and the digital signal after the digital signal with the target identifier are second digital signals. The first digital signal is obtained by the first processing module based on the first parameter information, and the second digital signal is obtained by the first processing module based on the second parameter information.
[0071] Step 503: If there is a digital signal with a target identifier among the at least one digital signal, then the first digital signal among the at least one digital signal is processed according to the first parameter information to obtain the first target measurement value of the signal to be measured, and the second digital signal among the at least one digital signal is processed according to the second parameter information to obtain the second target measurement value of the signal to be measured.
[0072] In this embodiment, at least one digital signal is obtained from the head of the queue stored in the first processing module. Then, it is determined whether a digital signal with a target identifier exists among the at least one digital signal. If such a signal exists, the first digital signal is processed according to first parameter information to obtain a first target measurement value of the signal under test. Similarly, the second digital signal is processed according to second parameter information to obtain a second target measurement value of the signal under test. Thus, the target identifier can be used to distinguish between the first digital signal obtained by the first processing module based on the first parameter information and the second digital signal obtained based on the second parameter information. This allows the second processing module to process both the first and second digital signals based on the first and second parameter information, reducing the likelihood of processing the second digital signal based on the first parameter information, thus reducing signal processing errors and consequently reducing data acquisition errors.
[0073] In one possible implementation, the above data acquisition method further includes the following processing: if there is no digital signal with a target identifier among the at least one digital signal, then each of the at least one digital signal is processed according to the second parameter information to obtain the second target measurement value of the signal to be measured.
[0074] In one possible implementation, the signal to be measured is an optical volumetric recording signal, the analog signal is a current signal, and the digital signal is a voltage signal, specifically as follows: Figure 2As shown, the above is based on Figure 2 The various signals will be described in detail in the embodiments of this application, and will not be repeated here.
[0075] In one possible implementation, the first digital signal is obtained by the first processing module processing the analog signal obtained by sampling the signal to be tested based on the first current value and the first gain included in the first parameter information. The first current value is used to indicate the current value of the current output by the current cancellation unit included in the first processing module, and the first gain is used to indicate the gain of the transimpedance amplifier included in the first processing module. Based on this, the first digital signal in the above-mentioned at least one digital signal is processed according to the first parameter information to obtain the first target measurement value of the signal to be tested, which includes the following specific processing: processing the first digital signal in the above-mentioned at least one digital signal according to the first current value and the first gain to obtain the first target measurement value of the signal to be tested.
[0076] In one specific embodiment, the specific process of obtaining the first digital signal has been described above, and will not be repeated in this application embodiment. Based on this, the first target measurement value I1 of the test signal corresponding to the first digital signal is I1 = ADC code1 / tia1 + I1 dc cancel Therefore, it can be concluded that, ideally, the first target measurement value of the signal under test corresponding to the first digital signal is equal to I1. PD .
[0077] Therefore, the calculation of the first target measurement value of the signal under test is relatively simple, saving computing resources.
[0078] In one possible implementation, the second digital signal is obtained by the first processing module processing the analog signal obtained by sampling the signal under test according to the second current value and the second gain included in the second parameter information. The second current value is used to indicate the current value of the current output by the current cancellation unit included in the first processing module, and the second gain is used to indicate the gain of the transimpedance amplifier included in the first processing module. Based on this, the second digital signal in the above-mentioned at least one digital signal is processed according to the second parameter information to obtain the second target measurement value of the signal under test, which includes the following specific processing: processing the second digital signal in the above-mentioned at least one digital signal according to the second current value and the second gain to obtain the second target measurement value of the signal under test.
[0079] In one specific embodiment, the specific process of obtaining the second digital signal has been described above, and will not be repeated in this application embodiment. Based on this, the second target measurement value I2 of the test signal corresponding to the second digital signal is I2 = ADC code2 / tia2 + I2 dc cancelTherefore, it can be concluded that, ideally, the second target measurement value of the signal under test corresponding to the second digital signal is equal to I2. PD .
[0080] Therefore, the calculation of the second target measurement value of the signal under test is relatively simple, saving computing resources.
[0081] Optionally, after obtaining the second target measurement value of the signal to be measured, the second processing module can determine whether to update the second parameter information in the parameter register based on the second target measurement value. If so, it sends parameter information to the first processing module to replace the second parameter information, so that the first processing module can adjust the gain of the transimpedance amplifier and the output current of the current cancellation unit.
[0082] First processing module
[0083] Corresponding to the above-described signal processing method embodiments, Figure 6 A schematic diagram of a first processing module according to an embodiment of this application is shown, as follows: Figure 6 As shown, the first processing module 600 includes:
[0084] The first processing unit 601 is used to process the analog signal obtained by sampling the signal to be tested according to the first parameter information stored in the parameter register, and obtain the first digital signal.
[0085] The information replacement unit 602 is used to replace the first parameter information in the parameter register with the second parameter information after receiving the second parameter information sent by the second processing module.
[0086] The second processing unit 603 is used to process the analog signal obtained by sampling the signal under test according to the second parameter information stored in the parameter register, to obtain a second digital signal, and to set a target identifier for the first second digital signal obtained by processing according to the second parameter information;
[0087] The target identifier is used to instruct the second processing module to process the first digital signal according to the first parameter information to obtain a first target measurement value of the signal under test, and to process the second digital signal and the digital signal after the second digital signal according to the second parameter information to obtain a second target measurement value of the signal under test.
[0088] In this embodiment, the first processing unit 601 processes the analog signal obtained by sampling the signal under test according to the first parameter information stored in the parameter register to obtain a first digital signal. After receiving the second parameter information sent by the second processing module, the information replacement unit 602 replaces the first parameter information in the parameter register with the second parameter information. The second processing unit 603 processes the analog signal obtained by sampling the signal under test according to the second parameter information stored in the parameter register to obtain a second digital signal, and sets a target identifier for the first second digital signal obtained by processing according to the second parameter information. Thus, the target identifier can be used to distinguish between the first digital signal obtained by processing according to the first parameter information and the second digital signal obtained by processing according to the second parameter information, enabling the second processing module to process the first digital signal based on the first parameter information and also to process the second digital signal based on the second parameter information, reducing the possibility of processing the second digital signal based on the first parameter information and lowering signal processing errors.
[0089] It should be noted that the first processing module in this embodiment is used to implement the corresponding signal processing method in the aforementioned method embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0090] Second processing module
[0091] Corresponding to the above data acquisition method embodiments, Figure 7 A schematic diagram of a second processing module according to an embodiment of this application is shown, as follows: Figure 7 As shown, the second processing module 700 includes:
[0092] The signal acquisition unit 701 is used to acquire at least one digital signal from the head of the queue stored in the first processing module, wherein the digital signal is obtained by the first processing module through processing the sampled signal of the signal to be tested, and the digital signals in the queue are arranged in the order in which the corresponding analog signals are sampled.
[0093] The signal determination unit 702 is used to determine whether there is a digital signal with a target identifier among the at least one digital signal, wherein at most one digital signal with the target identifier exists among the at least one digital signal, and the target identifier is used to indicate that each digital signal before the digital signal with the target identifier is a first digital signal, the digital signal with the target identifier and each digital signal after the digital signal with the target identifier are second digital signals, wherein the first digital signal is obtained by the first processing module based on first parameter information, and the second digital signal is obtained by the first processing module based on second parameter information;
[0094] The data acquisition unit 703 is configured to, when there is a digital signal with the target identifier in the at least one digital signal, process the first digital signal in the at least one digital signal according to the first parameter information to obtain a first target measurement value of the signal under test, and process the second digital signal in the at least one digital signal according to the second parameter information to obtain a second target measurement value of the signal under test.
[0095] In this embodiment, the signal acquisition unit 701 acquires at least one digital signal from the head of the queue stored in the first processing module. The signal determination unit 702 determines whether a digital signal with a target identifier exists among the at least one digital signal. When a digital signal with a target identifier exists among the at least one digital signal, the data acquisition unit 703 processes the first digital signal among the at least one digital signal according to the first parameter information to obtain a first target measurement value of the signal to be measured, and processes the second digital signal among the at least one digital signal according to the second parameter information to obtain a second target measurement value of the signal to be measured. Thus, the target identifier can be used to distinguish between the first digital signal obtained by the first processing module based on the first parameter information and the second digital signal obtained by processing based on the second parameter information. This allows the second processing module to process the first digital signal based on the first parameter information and also to process the second digital signal based on the second parameter information, reducing the possibility of processing the second digital signal based on the first parameter information, reducing signal processing errors, and consequently reducing data acquisition errors.
[0096] It should be noted that the second processing module in this embodiment is used to implement the corresponding data acquisition method in the aforementioned method embodiment, and has the beneficial effects of the corresponding method embodiment, which will not be repeated here.
[0097] electronic devices
[0098] Figure 8 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Specific embodiments of this application do not limit the specific implementation of the electronic device. Figure 8 As shown, the electronic device may include: a processor 802, a communications interface 804, a memory 806, and a communications bus 808. Wherein:
[0099] The processor 802, communication interface 804, and memory 806 communicate with each other through the communication bus 808.
[0100] Communication interface 804 is used to communicate with other electronic devices or servers.
[0101] The processor 802 is used to execute program 810, specifically to execute relevant steps in any of the aforementioned signal processing method embodiments or relevant steps in any of the data acquisition method embodiments.
[0102] Specifically, program 810 may include program code that includes computer operation instructions.
[0103] The processor 802 may be a CPU, an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of this application. The smart device includes one or more processors, which 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.
[0104] RISC-V is an open-source instruction set architecture based on the Reduced Instruction Set Computing (RISC) principle. It can be applied to various aspects of microcontrollers and FPGA chips, specifically in areas such as IoT security, industrial control, mobile phones, and personal computers. Because its design considers small size, speed, and low power consumption, 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 AIoT (Artificial Intelligence of Things), the RISC-V instruction set architecture is receiving increasing attention and support and is expected to become the next generation of widely used CPU architecture.
[0105] The computer operation instructions in this application embodiment can be computer operation instructions based on the RISC-V instruction set architecture. Correspondingly, the processor 802 can be designed based on the RISC-V instruction set. Specifically, the processor chip in the electronic device provided in this application embodiment can be a chip designed using the RISC-V instruction set. This chip can execute executable code based on the configured instructions, thereby implementing the signal processing method or data acquisition method in the above embodiments.
[0106] Memory 806 is used to store program 810. Memory 806 may include high-speed RAM memory, and may also include non-volatile memory, such as at least one disk storage device.
[0107] Specifically, program 810 can be used to cause processor 802 to execute the signal processing method or data acquisition method in any of the foregoing embodiments.
[0108] The specific implementation of each step in program 810 can be found in the corresponding steps and units described in any of the foregoing signal processing method or data acquisition method embodiments, and will not be repeated here. Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and modules described above can be referred to the corresponding process descriptions in the foregoing method embodiments, and will not be repeated here.
[0109] In the electronic device of this application embodiment, the target identifier can be used to distinguish between a first digital signal obtained by processing according to the first parameter information and a second digital signal obtained by processing according to the second parameter information, so that the second processing module can process the first digital signal based on the first parameter information and can also process the second digital signal based on the second parameter information, thereby reducing the possibility of processing the second digital signal based on the first parameter information and reducing the error of signal processing.
[0110] Computer storage media
[0111] This application also provides a computer-readable storage medium storing instructions for causing a machine to perform the signal processing method or data acquisition method as described herein. Specifically, a system or apparatus equipped with a storage medium storing software program code that implements the functions of any of the embodiments described above, and enabling the computer (or CPU or MPU) of the system or apparatus to read and execute the program code stored in the storage medium.
[0112] In this case, the program code read from the storage medium can itself implement the function of any of the above embodiments, and therefore the program code and the storage medium storing the program code constitute part of this application.
[0113] Examples of storage media used to provide program code include floppy disks, hard disks, magneto-optical disks, optical disks (such as CD-ROM, CD-R, CD-RW, DVD-ROM, DVD-RAM, DVD-RW, DVD+RW), magnetic tapes, non-volatile memory cards, and ROMs. Alternatively, program code can be downloaded from a server computer via a communication network.
[0114] Computer program products
[0115] This application also provides a computer program product, including computer instructions that instruct a computing device to perform any corresponding operation in the above-described plurality of method embodiments.
[0116] 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 for training the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0117] It should be noted that, depending on the implementation needs, the various components / steps described in the embodiments of this application can be broken down into more components / steps, or two or more components / steps or parts of the operation of components / steps can be combined into new components / steps to achieve the purpose of the embodiments of this application.
[0118] The methods described in the embodiments of this application can be implemented in hardware, firmware, or 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 as computer code downloaded over a network that is originally stored in a remote recording medium or a non-transitory machine-readable medium and will be stored in a local recording medium. Thus, the methods described herein can be processed by software stored on a recording medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware (such as an ASIC or FPGA). It is understood that the computer, processor, microprocessor controller, or programmable hardware includes storage components (e.g., RAM, ROM, flash memory, etc.) capable of storing or receiving software or computer code that, when accessed and executed by the computer, processor, or hardware, implements the methods described herein. Furthermore, when a general-purpose computer accesses code used to implement the methods shown herein, the execution of the code transforms the general-purpose computer into a dedicated computer for executing the methods shown herein.
[0119] 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 for training the model, data used for analysis, stored data, displayed data, etc.) involved in the embodiments of this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0120] Those skilled in the art will recognize that the units and method steps of the various examples 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 implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for specific applications, but such implementations should not be considered beyond the scope of the embodiments of this application.
[0121] The above embodiments are only used to illustrate the embodiments of this application, and are not intended to limit the embodiments of this application. Those skilled in the art can make various changes and modifications without departing from the spirit and scope of the embodiments of this application. Therefore, all equivalent technical solutions also fall within the scope of the embodiments of this application, and the patent protection scope of the embodiments of this application should be defined by the claims.
Claims
1. A signal processing method applied to a first processing module, characterized in that, The method comprises: processing an analog signal obtained by sampling a to-be-measured signal according to first parameter information stored in a parameter register, to obtain a first digital signal; after receiving second parameter information sent by a second processing module, replacing the first parameter information in the parameter register with the second parameter information; processing the analog signal obtained by sampling the to-be-measured signal according to the second parameter information stored in the parameter register, to obtain a second digital signal, and setting a target identifier for a first second digital signal obtained by processing according to the second parameter information; wherein the target identifier is used to instruct the second processing module to process the first digital signal according to the first parameter information, to obtain a first target measurement value of the to-be-measured signal, and to process the second digital signal and digital signals after the second digital signal according to the second parameter information, to obtain a second target measurement value of the to-be-measured signal.
2. The method of claim 1, wherein, The to-be-measured signal is an optical volume recording signal, the analog signal is a current signal, the first digital signal is a voltage signal, and the second digital signal is a voltage signal.
3. The method of claim 2, wherein, The processing of the analog signal obtained by sampling the to-be-measured signal according to the first parameter information stored in the parameter register, to obtain a first digital signal, comprises: controlling a current cancellation unit included in the first processing module to output a current with a first current value included in the first parameter information, so that at least part of the analog signal obtained by sampling the to-be-measured signal is cancelled, to obtain a first cancelled signal; processing the first cancelled signal according to the first parameter information, to obtain the first digital signal.
4. The method of claim 3, wherein, The processing of the first cancelled signal according to the first parameter information, to obtain the first digital signal, comprises: adjusting a gain of a transimpedance amplifier included in the first processing module to a first gain included in the first parameter information; inputting the first cancelled signal into the transimpedance amplifier, to obtain a first voltage signal output by the transimpedance amplifier; inputting the first voltage signal into an analog-to-digital converter included in the first processing module, to obtain the first digital signal output by the analog-to-digital converter.
5. The method of claim 2, wherein, The processing of the analog signal obtained by sampling the to-be-measured signal according to the second parameter information stored in the parameter register, to obtain a second digital signal, comprises: controlling a current cancellation unit included in the first processing module to output a current with a second current value included in the second parameter information, so that at least part of the analog signal obtained by sampling the to-be-measured signal is cancelled, to obtain a second cancelled signal; processing the second cancelled signal according to the second parameter information, to obtain the second digital signal.
6. The method of claim 5, wherein, The processing of the second cancelled signal according to the second parameter information, to obtain the second digital signal, comprises: adjusting a gain of a transimpedance amplifier included in the first processing module to a second gain included in the second parameter information; inputting the second cancellation signal into the transimpedance amplifier to obtain a second voltage signal output by the transimpedance amplifier; inputting the second voltage signal into an analog-to-digital converter included in the first processing module to obtain the second digital signal output by the analog-to-digital converter.
7. The method of claim 1, wherein, The method further comprises: if the end command sent by the second processing module is received within the waiting time period since the start command sent by the second processing module is received, it is determined that the second parameter information sent by the second processing module is received, wherein the start command is used to indicate the start of sending the second parameter information, and the end command is used to indicate the end of sending the second parameter information; if the end command is not received within the waiting time period since the start command is received, it is determined that the second parameter information sent by the second processing module is received after the waiting time period since the start command is received.
8. A data acquisition method characterized by, The data acquisition method applied to the second processing module comprises: acquiring at least one digital signal from the head of a queue stored in the first processing module, wherein the digital signal is obtained by processing an analog signal sampled from a to-be-measured signal by the first processing module, and the digital signals in the queue are arranged in the order in which the analog signals corresponding to the digital signals are sampled; determining whether there is a digital signal with a target identifier in the at least one digital signal, wherein there is at most one digital signal with the target identifier in the at least one digital signal, the target identifier is used to indicate that each digital signal before the digital signal with the target identifier, the digital signal with the target identifier, and each digital signal after the digital signal with the target identifier in the at least one digital signal are first digital signals, second digital signals, the first digital signals are obtained by processing the to-be-measured signal according to first parameter information by the first processing module, and the second digital signals are obtained by processing the to-be-measured signal according to second parameter information by the first processing module, wherein the first processing module processes the analog signal sampled from the to-be-measured signal according to the second parameter information to obtain the second digital signal, and sets the target identifier for the first second digital signal obtained according to the second parameter information; if there is a digital signal with the target identifier in the at least one digital signal, processing the first digital signals in the at least one digital signal according to the first parameter information to obtain a first target measurement value of the to-be-measured signal, and processing the second digital signals in the at least one digital signal according to the second parameter information to obtain a second target measurement value of the to-be-measured signal.
9. The method of claim 8, wherein, The method further comprises: if there is no digital signal with the target identifier in the at least one digital signal, processing each digital signal in the at least one digital signal according to the second parameter information to obtain a second target measurement value of the to-be-measured signal.
10. The method according to claim 8 or 9, characterized in that, The to-be-measured signal is an optical volume plethysmography signal, the analog signal is a current signal, and the digital signal is a voltage signal. The to-be-measured signal is an optical volume plethysmography signal, the analog signal is a current signal, and the digital signal is a voltage signal.
11. The method of claim 10, wherein, The first digital signal is obtained by processing an analog signal sampled from the to-be-measured signal according to a first current value and a first gain included in the first parameter information, the first current value is used to indicate a current value of a current output by a current offset unit included in the first processing module, and the first gain is used to indicate a gain of a trans-impedance amplifier included in the first processing module. The processing of the first digital signal in the at least one digital signal according to the first parameter information to obtain the first target measurement value of the to-be-measured signal comprises: processing the first digital signal in the at least one digital signal according to the first current value and the first gain to obtain the first target measurement value of the to-be-measured signal.
12. The method of claim 10, wherein, The second digital signal is obtained by processing an analog signal sampled from the to-be-measured signal according to a second current value and a second gain included in the second parameter information, the second current value is used to indicate a current value of a current output by a current offset unit included in the first processing module, and the second gain is used to indicate a gain of a trans-impedance amplifier included in the first processing module. The processing of the second digital signal in the at least one digital signal according to the second parameter information to obtain the second target measurement value of the to-be-measured signal comprises: processing the second digital signal in the at least one digital signal according to the second current value and the second gain to obtain the second target measurement value of the to-be-measured signal.
13. A first processing module, characterized by comprise: a first processing unit, configured to process an analog signal sampled from a to-be-measured signal according to first parameter information stored in a parameter register to obtain a first digital signal; an information replacing unit, configured to replace the first parameter information in the parameter register by second parameter information sent by a second processing module after receiving the second parameter information; a second processing unit, configured to process the analog signal sampled from the to-be-measured signal according to the second parameter information stored in the parameter register to obtain a second digital signal, and set a target identifier for a first second digital signal obtained according to the second parameter information; wherein the target identifier is used to indicate that the second processing module processes the first digital signal according to the first parameter information to obtain a first target measurement value of the to-be-measured signal, and processes the second digital signal and digital signals after the second digital signal according to the second parameter information to obtain a second target measurement value of the to-be-measured signal.
14. A second processing module, characterized by comprise: a signal obtaining unit, configured to obtain at least one digital signal from a head of a queue stored in a first processing module, wherein the digital signal is obtained by processing an analog signal sampled from a to-be-measured signal by the first processing module, and digital signals in the queue are arranged in an order in which the analog signals corresponding to the digital signals are sampled; The signal determining unit is configured to determine whether a digital signal provided with a target identifier exists in the at least one digital signal, wherein there is at most one digital signal provided with the target identifier in the at least one digital signal, and the target identifier is used to indicate that each digital signal before the digital signal provided with the target identifier, the digital signal provided with the target identifier, and each digital signal after the digital signal provided with the target identifier in the at least one digital signal is a first digital signal, the first digital signal is obtained by processing a first analog signal obtained by sampling the to-be-measured signal according to first parameter information by the first processing module, and the second digital signal is obtained by processing a second analog signal obtained by sampling the to-be-measured signal according to second parameter information by the first processing module, wherein the first processing module processes the second analog signal according to the second parameter information to obtain the second digital signal, and the target identifier is set for a first second digital signal obtained by processing according to the second parameter information. The data obtaining unit is configured to, when the digital signal provided with the target identifier exists in the at least one digital signal, process the first digital signal in the at least one digital signal according to the first parameter information to obtain a first target measurement value of the to-be-measured signal, and process the second digital signal in the at least one digital signal according to the second parameter information to obtain a second target measurement value of the to-be-measured signal.
15. An electronic device, comprising: The processor, the memory, and the communication interface complete mutual communication through the communication bus. The memory is configured to store at least one executable instruction, and the executable instruction causes the processor to perform operations corresponding to the signal processing method in any one of claims 1-7 or the data obtaining method in any one of claims 8-12. The computer program is stored on the memory and is executed by the processor to implement the signal processing method in any one of claims 1-7 or the data obtaining method in any one of claims 8-12.
16. A computer storage medium, comprising, The computer program includes computer instructions, and the computer instructions instruct the computing device to perform the signal processing method in any one of claims 1-7 or the data obtaining method in any one of claims 8-12.
17. A computer program product, characterised in that,
Citation Information
Patent Citations
Signal processing method, apparatus and device, and medium
CN111552507A
Data processing method and device
CN115529110A