Signal processing method, data acquisition method, processing module, electronic equipment and storage medium
By updating parameter information in the parameter register and setting the target identifier, the signal processing error problem caused by untimely updating parameter information in the analog signal acquisition is solved, and the accuracy of signal acquisition is improved.
Patent Information
- Application Number
- CN202411419675.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-11
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2044-10-11
AI Technical Summary
During the analog signal acquisition process, the signal processing error caused by untimely update of parameter information is large.
By storing the first parameter information in the parameter register to process the analog signal, and updating the register after receiving the second parameter information, processing the analog signal to obtain the second digital signal, and setting a target identifier for the second digital signal, To distinguish the two processing methods, reduce errors.
Reduces signal processing errors and improves signal acquisition accuracy.
Smart Images

Figure CN119279545A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data processing, and in particular to a signal processing method, a data acquisition 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 component can emit light to illuminate the skin surface, the receiving component receives the reflected light signal and converts the light signal into a PPG signal, and the analog front end converts the PPG signal into a corresponding digital signal according to the parameter information sent by the microcontroller unit. After obtaining 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 measurement value of the PPG signal, thereby realizing the collection of the PPG signal. In addition, the microcontroller unit can also determine whether the current parameter information needs to be updated according to the measurement 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, which will cause a large error in the measurement value of the PPG signal, thus causing the problem of large signal processing error. Summary of the invention
[0005] In view of this, embodiments of the present 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 an embodiment of the present application, a signal processing method is provided, which is applied to a first processing module, and 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 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 digital signals after the second digital signal 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 an embodiment of the present application, a data acquisition method is provided, which is applied to a second processing module, and the data acquisition method comprises: 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 processing an analog signal sampled by the first processing module to obtain 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 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, and the target identifier is used to indicate the digital signals before the digital signal with the target identifier in the at least one digital signal. The target signal is the first digital signal, the digital signal with the target identifier is set, and each digital signal after the digital signal with the target identifier is the second digital signal, the first digital signal is obtained by the first processing module according to the first parameter information, and the second digital signal is obtained by the first processing module according to the second parameter information; if there is a digital signal with the target identifier in the at least one digital signal, the first digital signal in 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 in 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.
[0008] According to a third aspect of an embodiment of the present application, a first processing module is provided, including: a first processing unit, used to process 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; an information replacement unit, used 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; a second processing unit, used to process 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 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 to be tested, 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 signal to be tested.
[0009] According to a fourth aspect of an embodiment of the present application, a second processing module is provided, comprising: a signal acquisition unit, for 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 processing an analog signal sampled by the first processing module to obtain the 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; a signal determination unit, for 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, and the target identifier is used to indicate that the digital signals before the digital signal with the target identifier in the at least one digital signal are the first A digital signal, a digital signal provided with the target identifier, and each digital signal after the digital signal provided with the target identifier is the second digital signal, the first digital signal is obtained by the first processing module according to the first parameter information, and the second digital signal is obtained by the first processing module according to the second parameter information; a data acquisition unit, for processing 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 signal to be measured when there is a digital signal provided with the target identifier in the at least one digital signal, and processing 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 signal to be measured.
[0010] According to the fifth aspect of the embodiments of the present application, an electronic device is provided, 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 through 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 or operations corresponding to the method of the second aspect.
[0011] According to a sixth 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 or the second aspect.
[0012] According to a seventh 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 or the second aspect described above.
[0013] According to the signal processing scheme provided by the embodiment of the present application, the first processing module processes the analog signal obtained by sampling the signal to be tested according to the first parameter information stored in the parameter register to obtain the first digital signal, and then after receiving the second parameter information sent by the second processing module, replaces the first parameter information in the parameter register with the second parameter information, and then processes the analog signal obtained by sampling the signal to be tested according to the second parameter information stored in the parameter register to obtain the 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 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, 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] 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.
[0015] Figure 1 is a flow chart of a signal processing method according to an embodiment of the present application;
[0016] Figure 2 is a schematic diagram of a first processing module and a second processing module according to an embodiment of the present application;
[0017] Figure 3is a processing timing diagram of a first processing module of an embodiment of the present application;
[0018] Figure 4 is a processing timing diagram of a first processing module of another embodiment of the present application;
[0019] Figure 5 is a flow chart of a data acquisition method according to an embodiment of the present application;
[0020] Figure 6 is a schematic diagram of a first processing module of an embodiment of the present application;
[0021] Figure 7 is a schematic diagram of a second processing module according to an embodiment of the present application;
[0022] Figure 8 It is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0023] Signal processing methods
[0024] An embodiment of the present application provides a signal processing method, which is applied to a first processing module. The first processing module may be an analog front end (Analog Front End, AFE), etc., which is not limited in the embodiment of the present application.
[0025] The signal processing method is described in detail below through multiple embodiments.
[0026] Figure 1 FIG. 1 is a flow chart of a signal processing method according to an embodiment of the present application. Figure 1 As shown, the signal processing method comprises the following steps:
[0027] Step 101: Process an analog signal obtained by sampling a signal to be measured according to first parameter information stored in a parameter register to obtain a first digital signal.
[0028] The signal to be tested is an analog signal, for example, the signal to be tested may be a continuous or discontinuous analog PPG signal, etc., and the parameter register is set in the first processing module.
[0029] In a specific implementation, based on the first processing module periodically sampling the signal to be tested, the analog signal obtained by the current sampling 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, the first parameter information in the parameter register is replaced by the second parameter information.
[0031] The second processing module may be a microcontroller unit (MCU) or the like.
[0032] In a specific embodiment, 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 implement the update of the parameter information.
[0033] Step 103: Process the analog signal obtained by sampling the signal to be measured 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.
[0034] Among them, 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 to be tested, 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 to be tested.
[0035] It should be noted that the digital signal after the second digital signal refers to the digital signal obtained by the first processing module sampling the analog signal obtained by the test signal according to the second parameter information after the above-mentioned first second digital signal and before the second parameter information in the parameter register is updated.
[0036] In a specific embodiment, based on the periodic sampling of the signal to be measured 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 will process the analog signal obtained by sampling the signal to be measured according to the second parameter information stored in the parameter register, obtain the second digital signal, and set a target identifier for the first second digital signal obtained, 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 to be measured corresponding to the first digital signal, and the second processing module can process the second digital signal and the digital signal after the second digital signal according to the first parameter information, respectively, to obtain the corresponding second target measurement value of the signal to be measured.
[0037] In addition, a non-target identifier may be set for each digital signal other than the first second digital signal (whether the first digital signal or the second digital signal), where 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 an embodiment of the present application, the first processing module processes the analog signal obtained by sampling the signal to be tested according to the first parameter information stored in the parameter register to obtain the first digital signal, and then after receiving the second parameter information sent by the second processing module, replaces the first parameter information in the parameter register with the second parameter information, and then processes the analog signal obtained by sampling the signal to be tested according to the second parameter information stored in the parameter register to obtain the 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, 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.
[0039] In a possible implementation, the signal to be measured is a photoplethysmography 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 is a schematic diagram of a first processing module and a second processing module according to an embodiment of the present application. Figure 2 As shown, the first processing module AFE includes a TX unit connected to a light emitting diode LED and an RX unit connected to a photodiode PD. The LED is used to emit light to illuminate the skin surface under the drive of the driver DRV included in the TX unit. The PD is used to receive the reflected light signal and convert the light signal into a PD current signal, which is the PPG signal. The AFE periodically samples the PPG signal through the RX unit to obtain an analog signal input to the RX unit. The RX unit outputs a digital voltage signal according to the analog signal, which is the first digital signal or the second digital signal. The first digital signal and the second digital signal will be stored in the queue FIFO (the digital signal stored in the FIFO is generally a binary value) in the order in which the corresponding analog signals are sampled. The second processing module MCU connected to the AFE is used to read the data stored in the FIFO. In addition, the AFE also includes a logic controller Logical Control, a parameter buffer controller, a data marker and a bus BUS. Control 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 identifier and the non-target identifier for the digital signal stored in the FIFO. The BUS is used to connect the MCU through the communication connection line to realize the connection between the AFE and the MCU.
[0041] Among them, the sampling period of the signal to be tested by the first processing module can generally be set to 20 milliseconds to 60 milliseconds. For example, the sampling period of the signal to be tested by the first processing module is set to 40 milliseconds, which is not limited in the embodiment of the present application.
[0042] In the embodiment of the present application, by using an optical plethysmography signal as a signal to be measured, the error in processing the optical plethysmography signal can be reduced.
[0043] In a possible implementation, the above-mentioned step 101 includes the following specific processing: according to the first current value included in the first parameter information, controlling the current offset unit included in the first processing module to output a current with a current value of the first current value, so that at least part of the analog signal obtained by sampling the signal to be measured is offset to obtain a first offset signal; according to the first parameter information, processing the first offset signal to obtain a first digital signal.
[0044] In a specific embodiment, Figure 2 As shown, the RX unit includes a current cancel unit dc cancel. In the process of processing the analog signal according to the first parameter information (including the first current value) to obtain the first digital signal, dc cancel is used to provide a current whose current value is the first current value opposite to the PD current, so that at least part of the analog signal obtained by sampling the signal to be measured is canceled to obtain the first canceled signal, and the TX unit then obtains the first digital signal according to the first canceled signal. It should be noted that the first current value is smaller than the signal value of the analog signal, so the current output by dc cancel does not cause the analog signal to be reversed to the first canceled signal.
[0045] In the embodiment of the present application, the output current of the current compensation unit can offset at least part of the analog signal, reducing the possibility of errors caused by saturation of the first processing module due to excessive analog current, so as to make signal processing more accurate.
[0046] In a possible implementation, the above-mentioned processing of the first offset signal according to the first parameter information to obtain the first digital signal includes 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 offset signal into the transimpedance amplifier to obtain the first voltage signal output by the transimpedance amplifier; inputting the first voltage signal into the analog-to-digital converter included in the first processing module to obtain the first digital signal output by the analog-to-digital converter.
[0047] In a specific embodiment, 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 according to the first parameter information (also including the first gain) to obtain the first digital signal, after obtaining the first offset signal, the first offset signal is input into the TIA, and the TIA outputs an analog first voltage signal, and the ADC then converts the analog first voltage signal into a first digital signal.
[0048] In an embodiment of the present application, the first processing module can convert the first offset 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 a solution for 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 the unit of ADCcode1 is I1 PD LSB, I1 PD is the signal value (in μA) corresponding to the analog signal processed by the first processing module according to the first parameter information stored in the parameter register, I1 dc cancel is the first current value (in μA), and tia1 is the first gain (in LSB / μA).
[0050] In a possible implementation, the above step 103 processes the analog signal obtained by sampling the signal to be measured according to the second parameter information stored in the parameter register to obtain the second digital signal, including the following specific processing: according to the second current value included in the second parameter information, controlling the current offset unit included in the first processing module to output a current with a second current value, so that at least part of the analog signal obtained by sampling the signal to be measured is offset to obtain a second offset signal; according to the second parameter information, processing the second offset signal to obtain a second digital signal.
[0051] In a specific embodiment, Figure 2As shown, the RX unit includes a current cancel unit dc cancel. In the process of processing the analog signal according to the second parameter information (including the second current value) to obtain the second digital signal, dc cancel is used to provide a current whose current value is the second current value opposite to the PD current, so that at least part of the analog signal obtained by sampling the signal to be measured is canceled to obtain the second canceled signal, and the TX unit obtains the second digital signal according to the second canceled signal. It should be noted that the second current value is smaller than the signal value of the analog signal, so the current output by dc cancel does not cause the analog signal to be reversed to the second canceled signal.
[0052] In the embodiment of the present application, the output current of the current compensation unit can offset at least part of the analog signal, reducing the possibility of errors caused by saturation of the first processing module due to excessive analog current, so as to make signal processing more accurate.
[0053] In a possible implementation, the second offset signal is processed according to the second parameter information to obtain a second digital signal, including 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 offset signal into the transimpedance amplifier to obtain a second voltage signal output by the transimpedance amplifier; inputting the second voltage signal into the analog-to-digital converter included in the first processing module to obtain a second digital signal output by the analog-to-digital converter.
[0054] In a specific embodiment, 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 according to the second parameter information (also including the second gain) to obtain the second digital signal, after obtaining the second offset signal, the second offset 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 an embodiment of the present application, the first processing module can convert the second offset 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 a solution for 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 the unit of ADCcode2 is I1 PD LSB, I2 PDis the signal value (in μA) of the analog signal processed by the first processing module according to the second parameter information stored in the parameter register, I2 dc cancel is the second current value (in μA), and tia2 is the second gain (in LSB / μA).
[0057] The first processing module can adjust the gain of the transimpedance amplifier and the output current of the current compensation unit by updating the parameter information stored in the parameter register, and then adjust the measurement range of the first processing module, so that the first processing module can obtain more valid data in the process of processing the PPG signal.
[0058] In a possible implementation, the above-mentioned signal processing method also includes: if an end command sent by the second processing module is received within the waiting time starting from the receipt of the start command sent by the second processing module, 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 starting from the receipt of the start command, then starting from the receipt of the start command, it is determined that the second parameter information sent by the second processing module is received after the waiting time.
[0059] Figure 3 is a processing timing diagram of the first processing module of an embodiment of the present application, such as Figure 3 As shown in the figure, the old parameter is the first parameter information, the new parameter is the second parameter information, and the length of the bar marked with the word "waiting" 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, and then the MCU sends the second parameter information to the AFE within the waiting time, and sends the 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 is a processing timing diagram of the first processing module of another embodiment of the present application, such as Figure 4 As shown in the figure, the old parameter is the first parameter information, the new parameter is the second parameter information, and the length of the bar marked with the word "waiting" 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, and then the MCU sends the second parameter information to the AFE within the waiting time. However, until the waiting time ends, the end command corresponding to the second parameter information is not sent to the AFE. 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 an embodiment of the present application, by setting a scheme in which if no end command is received within the waiting period after the start command is received, it is determined that the second parameter information sent by the second processing module is received after the waiting period has elapsed, the problem of the first parameter information being unable to be updated due to the AFE not receiving the end command due to software or hardware problems can be avoided as much as possible.
[0062] Data acquisition method
[0063] The embodiment of the present application provides a data acquisition method, which is applied to a second processing module. The second processing module may be a microcontroller unit (MCU), etc., which is not limited in the embodiment of the present application.
[0064] The data acquisition method is described in detail below through multiple embodiments.
[0065] Figure 5 FIG. 1 is a flow chart of a data acquisition method according to an embodiment of the present application. Figure 5 As shown, the data acquisition method includes the following steps:
[0066] Step 501: Acquire at least one digital signal from the head of a queue stored in a first processing module.
[0067] Among them, the digital signal is obtained by the first processing module processing the analog signal obtained by sampling the signal to be tested, the digital signals in the queue are arranged in the order in which the analog signals corresponding to the digital signals are sampled, and the digital signal is the first digital signal or the second digital signal in the above-mentioned signal processing method embodiment.
[0068] It should be noted that, in the embodiment of the present application, step 501 refers to the process in which, after the first parameter information in the parameter register is updated to the second parameter information, the at least one digital signal obtained from the head of the queue includes at least part of the second digital signal, and ends 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 processing an analog signal obtained by sampling the signal to be tested according to the third parameter information stored in the parameter register to replace the second parameter information by the first processing module). In 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 digital signal, the digital signal is the second digital signal. If the at least one digital signal is a plurality of digital signals, the plurality of digital signals include at least one first digital signal and at least one second digital signal, or the digital signals in the plurality of digital signals are all second digital signals.
[0069] Step 502: Determine whether there is a digital signal with a target identifier in the at least one digital signal.
[0070] Among them, there is at most one digital signal with a target identifier in the above-mentioned at least one digital signal, and the target identifier is used to indicate that in the above-mentioned at least one digital signal, the digital signals before the digital signal with the target identifier are the first digital signals, the digital signal with the target identifier, and the digital signals after the digital signal with the target identifier are the second digital signals, the first digital signal is obtained by the first processing module according to the first parameter information, and the second digital signal is obtained by the first processing module according to the second parameter information.
[0071] Step 503: If there is a digital signal with a target identifier in the at least one digital signal, the first digital signal in the at least one digital signal is processed according to the first parameter information to obtain a first target measurement value of the signal to be measured, and the second digital signal in the at least one digital signal is processed according to the second parameter information to obtain a second target measurement value of the signal to be measured.
[0072] In an embodiment of the present application, the at least one digital signal is obtained from the head of the queue stored in the first processing module, and then it is determined whether there is a digital signal with a target identifier in the at least one digital signal. If there is a digital signal with a target identifier in the at least one digital signal, the first digital signal in 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 in 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. Thus, the target identifier can be used to distinguish the first digital signal obtained by the first processing module according to the first parameter information and the second digital signal obtained by 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, reducing the error of signal processing, and thus reducing the error of data acquisition.
[0073] In a possible implementation, the data acquisition method further includes the following processing: if there is no digital signal with a target identifier in the at least one digital signal, each digital signal in the at least one digital signal is processed according to the second parameter information to obtain a second target measurement value of the signal to be measured.
[0074] In a possible implementation, the signal to be measured is an optical plethysmography signal, the analog signal is a current signal, and the digital signal is a voltage signal. Figure 2As shown above, the above is based on Figure 2 Each signal is introduced, and the embodiments of the present application will not be described in detail here.
[0075] In a possible implementation, the first digital signal is obtained by the first processing module processing the analog signal obtained by sampling the signal to be measured according to 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 compensation 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 above-mentioned step 503 processes the first digital signal in the above-mentioned at least one digital signal according to the first parameter information to obtain the first target measurement value of the signal to be measured, including 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 measured.
[0076] In a specific implementation, the specific process of obtaining the first digital signal has been introduced above, and the present application embodiment will not repeat it again. Based on this, the first target measurement value I1 of the signal to be measured corresponding to the first digital signal = ADC code1 / tia1+I1 dc cancel , it can be seen that, ideally, the first target measurement value of the signal to be measured corresponding to the first digital signal is equal to I1 PD .
[0077] Therefore, the calculation of the first target measurement value of the signal to be measured 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 to be measured 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 compensation 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 to be measured, including the following specific processing: according to the second current value and the second gain, the second digital signal in the above-mentioned at least one digital signal is processed to obtain the second target measurement value of the signal to be measured.
[0079] In a specific implementation, the specific process of obtaining the second digital signal has been introduced above, and the present application embodiment will not repeat it again. Based on this, the second target measurement value I2 of the signal to be measured corresponding to the second digital signal = ADC code2 / tia2+I2 dc cancel, it can be seen that, ideally, the second target measurement value of the signal to be measured corresponding to the second digital signal is equal to I2 PD .
[0080] Therefore, the calculation of the second target measurement value of the signal to be measured is relatively simple, saving calculation 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, the parameter information used to replace the second parameter information is sent to the first processing module, so that the first processing module adjusts the gain of the transimpedance amplifier and the output current of the current compensation unit.
[0082] First processing module
[0083] Corresponding to the above signal processing method embodiment, Figure 6 A schematic diagram of a first processing module according to an embodiment of the present application is shown. 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 to obtain a first digital signal;
[0085] An information replacement unit 602 is configured 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] A second processing unit 603 is used to process 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 set a target identifier for the first second digital signal obtained by processing according to the second parameter information;
[0087] Among them, 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 the digital signal after the second digital signal according to the second parameter information to obtain a second target measurement value of the signal to be tested.
[0088] In the embodiment of the present application, the first processing unit 601 processes the analog signal obtained by sampling the signal to be tested according to the first parameter information stored in the parameter register to obtain the 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 to be tested according to the second parameter information stored in the parameter register to obtain the 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 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, 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.
[0089] It should be noted that the first processing module of 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 described in detail here.
[0090] Second processing module
[0091] Corresponding to the above data acquisition method embodiment, Figure 7 A schematic diagram of a second processing module according to an embodiment of the present application is shown. Figure 7 As shown, the second processing module 700 includes:
[0092] A signal acquisition unit 701 is used to acquire at least one digital signal from the head of a queue stored in the first processing module, wherein the digital signal is obtained by the first processing module processing an analog signal obtained by sampling the 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;
[0093] a signal determination unit 702, configured to determine whether there is a digital signal provided with a target identifier in the at least one digital signal, wherein at most one digital signal provided with the target identifier exists in the at least one digital signal, and the target identifier is used to indicate that, in the at least one digital signal, each digital signal before the digital signal provided with the target identifier is a first digital signal, the digital signal provided with the target identifier, and each digital signal after the digital signal provided with the target identifier is a second digital signal, the first digital signal is obtained by the first processing module according to the first parameter information, and the second digital signal is obtained by the first processing module according to the second parameter information;
[0094] The data acquisition unit 703 is used to 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 to be tested, 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 to be tested when a digital signal with the target identifier is present in the at least one digital signal.
[0095] In the embodiment of the present application, the signal acquisition unit 701 acquires the above-mentioned at least one digital signal from the head of the queue stored in the first processing module, the signal determination unit 702 determines whether there is a digital signal with a target identifier in the above-mentioned at least one digital signal, and the data acquisition unit 703 processes the first digital signal in the above-mentioned at least one digital signal according to the first parameter information when there is a digital signal with a target identifier in the above-mentioned at least one digital signal, and obtains the first target measurement value of the signal to be measured, and processes the second digital signal in the above-mentioned at least one digital signal according to the second parameter information to obtain the second target measurement value of the signal to be measured. Thus, the target identifier can be used to distinguish the first digital signal obtained by the first processing module according to the first parameter information and the second digital signal obtained by 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, reducing the error of signal processing, and thus reducing the error of data acquisition.
[0096] It should be noted that the second processing module of 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 described in detail here.
[0097] Electronic devices
[0098] Figure 8 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 8 As shown, the electronic device may include: a processor (processor) 802, a communication interface (Communications Interface) 804, a memory (memory) 806, and a communication bus 808. Among them:
[0099] The processor 802 , the communication interface 804 , and the memory 806 communicate with each other via a communication bus 808 .
[0100] The communication interface 804 is used to communicate with other electronic devices or servers.
[0101] The processor 802 is used to execute the program 810, and specifically can execute the relevant steps in any of the aforementioned signal processing method embodiments or the relevant steps in any of the data acquisition method embodiments.
[0102] Specifically, the program 810 may include program codes, which include computer operation instructions.
[0103] The processor 802 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.
[0104] 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.
[0105] 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 802 may be designed based on the RISC-V instruction set. Specifically, the processor chip in the electronic device provided in the embodiments of the present application may be a chip designed using the RISC-V instruction set, and the chip may execute executable code based on the configured instructions, thereby implementing the signal processing method or data acquisition method in the above embodiments.
[0106] The memory 806 is used to store the program 810. The memory 806 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.
[0107] The program 810 may be specifically used to enable the processor 802 to execute the signal processing method or data acquisition method in any of the aforementioned embodiments.
[0108] The specific implementation of each step in program 810 can refer to the corresponding description of the corresponding steps and units in any of the above-mentioned signal processing methods or data acquisition 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 above-mentioned method embodiments, which will not be repeated here.
[0109] Through the electronic device of the embodiment of the present application, the target identifier can be used to distinguish between the first digital signal obtained by processing the first parameter information and the second digital signal obtained by processing 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] The present application also provides a computer-readable storage medium storing instructions for causing a machine to execute the signal processing method or data acquisition 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 reads and executes the program code stored in the storage medium.
[0112] 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.
[0113] 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.
[0114] Computer program product
[0115] 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.
[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 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.
[0117] 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.
[0118] 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.
[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 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.
[0120] 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.
[0121] 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 signal processing method, applied to a first processing module, characterized in that: The method comprises: According to the first parameter information stored in the parameter register, an analog signal obtained by sampling the signal to be measured is processed to obtain a first digital signal; After receiving the second parameter information sent by the second processing module, replacing the first parameter information in the parameter register with the second parameter information; According to the second parameter information stored in the parameter register, an analog signal obtained by sampling the signal to be tested is processed to obtain a second digital signal, and a target identifier is set for a first second digital signal obtained by processing according to the second parameter information; Among them, 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 the digital signal after the second digital signal according to the second parameter information to obtain a second target measurement value of the signal to be tested.
2. The method according to claim 1, characterized in that The signal to be measured is an optical plethysmography 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 according to claim 2, characterized in that The step of processing the analog signal obtained by sampling the signal to be measured according to the first parameter information stored in the parameter register to obtain the first digital signal includes: According to the first current value included in the first parameter information, control the current offset unit included in the first processing module to output a current having a current value of the first current value, so that at least part of the analog signal obtained by sampling the signal to be measured is offset, and a first offset signal is obtained; The first offset signal is processed according to the first parameter information to obtain the first digital signal.
4. The method according to claim 3, characterized in that: The step of processing the first offset signal according to the first parameter information to obtain the first digital signal includes: 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 offset signal into the transimpedance amplifier to obtain a first voltage signal output by the transimpedance amplifier; The first voltage signal is input 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 according to claim 2, characterized in that: The step of 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 the second digital signal includes: According to the second current value included in the second parameter information, control the current offset unit included in the first processing module to output a current having a current value of the second current value, so that at least part of the analog signal obtained by sampling the signal to be measured is offset, and a second offset signal is obtained; The second post-cancellation signal is processed according to the second parameter information to obtain the second digital signal.
6. The method according to claim 5, characterized in that The step of processing the second offset signal according to the second parameter information to obtain the second digital signal includes: 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 offset signal into the transimpedance amplifier to obtain a second voltage signal output by the transimpedance amplifier; The second voltage signal is input 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.
7. The method according to claim 1, characterized in that The method further comprises: If, starting from receiving the start command sent by the second processing module, an end command sent by the second processing module is received within the waiting time, 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 starting from the receipt of the start command, it is determined that the second parameter information sent by the second processing module is received after the waiting time period starting from the receipt of the start command.
8. A data acquisition method, characterized in that: Applied to the second processing module, the data acquisition method includes: 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 processing an analog signal obtained by sampling the 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; Determine 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, and the target identifier is used to indicate that, in the at least one digital signal, each digital signal before the digital signal with the target identifier is a first digital signal, the digital signal with the target identifier is set, and each digital signal after the digital signal with the target identifier is set is a second digital signal, the first digital signal is obtained by the first processing module according to the first parameter information, and the second digital signal is obtained by the first processing module according to the second parameter information; If there is a digital signal with the target identifier in the at least one digital signal, the first digital signal in the at least one digital signal is processed according to the first parameter information to obtain a first target measurement value of the signal to be tested, and the second digital signal in the at least one digital signal is processed according to the second parameter information to obtain a second target measurement value of the signal to be tested.
9. The method according to claim 8, characterized in that The method further comprises: If there is no digital signal with the target identifier in the at least one digital signal, each digital signal in the at least one digital signal is processed according to the second parameter information to obtain a second target measurement value of the signal to be measured.
10. The method according to claim 8 or 9, characterized in that: The signal to be measured is an optical plethysmography signal, the analog signal is a current signal, and the digital signal is a voltage signal.
11. The method according to claim 10, characterized in that The first digital signal is obtained by the first processing module processing an analog signal obtained by sampling the signal to be measured according to 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 compensation 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; The step of processing 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 to be measured includes: The first digital signal in the at least one digital signal is processed according to the first current value and the first gain to obtain a first target measurement value of the signal to be measured.
12. The method according to claim 10, characterized in that The second digital signal is obtained by the first processing module processing an analog signal obtained by sampling the signal to be measured 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 compensation 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; The step of processing 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 to be measured includes: The second digital signal in the at least one digital signal is processed according to the second current value and the second gain to obtain a second target measurement value of the signal to be measured.
13. A first processing module, characterized in that: include: A first processing unit, configured to process an analog signal obtained by sampling the signal to be measured according to first parameter information stored in the 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 the second parameter information sent by the second processing module; A second processing unit is used to process 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 set a target identifier for the first second digital signal obtained by processing according to the second parameter information; Among them, 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 the digital signal after the second digital signal according to the second parameter information to obtain a second target measurement value of the signal to be tested.
14. A second processing module, characterized in that: include: a signal acquisition unit, configured 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 processing the analog signal sampled by the first processing module to obtain the 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; a signal determination unit, used to determine 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, and the target identifier is used to indicate that, in the at least one digital signal, each digital signal before the digital signal with the target identifier is a first digital signal, the digital signal with the target identifier is set, and each digital signal after the digital signal with the target identifier is set is a second digital signal, the first digital signal is obtained by the first processing module according to the first parameter information, and the second digital signal is obtained by the first processing module according to the second parameter information; A data acquisition unit is used to 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 to be measured, 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 to be measured when a digital signal with the target identifier is present in the at least one digital signal.
15. 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 signal processing method according to any one of claims 1 to 7 or the data acquisition method according to any one of claims 8 to 12.
16. A computer storage medium, characterized in that: A computer program is stored thereon, and when the program is executed by a processor, the signal processing method according to any one of claims 1 to 7 or the data acquisition method according to any one of claims 8 to 12 is implemented.
17. A computer program product, characterized in that The method comprises computer instructions, wherein the computer instructions instruct a computing device to execute the signal processing method according to any one of claims 1 to 7 or the data acquisition method according to any one of claims 8 to 12.
Citation Information
Patent Citations
Signal processing method, apparatus and device, and medium
CN111552507A
Data processing method and device
CN115529110A
Data processing method applied to fault locating, and optical module
WO2024169242A1