Sampling parameter configuration method and device, signal testing method and computer device
Patent Information
- Application Number
- CN202111517450.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-13
- Publication Date
- 2026-10-09
- Estimated Expiration
- 2041-12-13
AI Technical Summary
[0026] The aforementioned sampling parameter configuration method, apparatus, signal testing method, and computer equipment have at least the following beneficial effects: This sampling parameter configuration method, by acquiring a preliminary sampling signal obtained from the preliminary sampling of the electrical pulse signal output by the object under test based on preset sampling parameters, allows for the understanding of the frequency characteristics of the electrical pulse signal output by the object under test. Then, the sampling parameters of the data acquisition device can be reconfigured according to the reference parameters characterizing the frequency characteristics of the electrical pulse signal output by the object under test and a preset desired number of cycles to form target sampling parameters. This allows the data acquisition device to resample the signal of the object under test based on the target sampling parameters to obtain a target sampling signal with a preset desired number of cycles. This ensures that for electrical pulse signals of different frequencies output by the object under test, a target sampling signal with a preset desired number of cycles can be obtained, avoiding the problems of large subsequent measurement errors due to too few sampling cycles or low measurement calculation efficiency due to too many sampling cycles. It can improve measurement calculation efficiency while ensuring measurement accuracy. Furthermore, since the computational load can be reduced, the computational power requirements of the hardware can be further reduced, thus lowering costs.
Smart Images

Figure CN116263478B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of signal acquisition and measurement technology, and in particular to a sampling parameter configuration method, apparatus, signal testing method, and computer equipment. Background Technology
[0002] The output signal of active implantable devices is generally an electrical pulse stimulation signal, and it has adjustable parameters within a certain range, meaning that parameters such as the frequency, pulse width, and amplitude of the electrical pulse stimulation signal are allowed to vary within a specified range. For example, the frequency of the electrical pulse stimulation signal can be as low as a few hertz or as high as hundreds or even thousands of hertz. Therefore, this type of electrical pulse stimulation signal has the characteristic of a wide range of variable parameters such as frequency. Correspondingly, this places higher demands on the testing work in the research and development and verification processes, making it crucial to be able to flexibly and accurately acquire electrical pulse signals with the above characteristics. Summary of the Invention
[0003] Therefore, it is necessary to provide a sampling parameter configuration method, device, signal testing method, and computer equipment that can adaptively configure the sampling parameters of the data acquisition device based on the frequency characteristics of the signal under test, in order to address the above-mentioned technical problems.
[0004] Firstly, this application provides a sampling parameter configuration method, the method comprising:
[0005] The preliminary sampling signal is acquired, and the reference parameters are obtained based on the preliminary sampling signal. The reference parameters are used to characterize the frequency characteristics of the electrical pulse signal output by the object under test. The preliminary sampling signal is obtained by the data acquisition device after acquiring the electrical pulse signal output by the object under test based on the preset sampling parameters.
[0006] The sampling parameters of the data acquisition device are reconfigured according to the reference parameters and the preset expected number of cycles to form the target sampling parameters, so that the data acquisition device can acquire the electrical pulse signal output by the object under test to obtain the target sampling signal with the preset expected number of cycles.
[0007] In one embodiment, the preliminary sampling signal is obtained by the data acquisition device after acquiring the electrical pulse signal output by the object under test for a first time length based on preset sampling parameters. The first time length is the time for sampling at least one complete electrical pulse signal, determined based on the frequency range of the electrical pulse signal output by the object under test.
[0008] In one embodiment, the reference parameters include the number of first sampling points collected within a single cycle of the electrical pulse signal output by the object under test;
[0009] The steps for reconfiguring the sampling parameters of the data acquisition device based on the baseline parameters and the preset desired number of cycles to form the target sampling parameters include:
[0010] The number of second sampling points is determined by multiplying the first number of sampling points by the preset expected number of periods;
[0011] The sampling parameters of the data acquisition device are reconfigured based on the second number of sampling points to form the target sampling parameters.
[0012] In one embodiment, the target sampling parameters include sampling frequency, number of sampling points, and sampling time length; the step of reconfiguring the sampling parameters of the data acquisition device based on the second number of sampling points includes:
[0013] The sampling frequency, number of sampling points, and / or sampling time length are reconfigured based on the second number of sampling points.
[0014] In one embodiment, the step of reconfiguring the sampling frequency based on the second number of sampling points includes:
[0015] The sampling frequency of the data acquisition device is determined and reconfigured based on the ratio of the second number of sampling points to the second time length.
[0016] In one embodiment, the object under test is an active device.
[0017] Secondly, a signal testing method is provided, the method comprising:
[0018] The target sampling signal output by the data acquisition device is obtained. The target sampling signal is a sampling signal with a preset expected number of cycles obtained by the data acquisition device after acquiring the electrical pulse signal output by the object under test based on preset sampling parameters. The sampling parameters of the data acquisition device are configured by the above-mentioned sampling parameter configuration method.
[0019] Determine the first parameter of each electrical pulse signal in the target sampled signal;
[0020] The first parameter of each electrical pulse signal in the target sampling signal is averaged to obtain the test result.
[0021] Thirdly, a sampling parameter configuration device is also provided, the device comprising:
[0022] The preliminary sampling signal acquisition module is used to acquire the preliminary sampling signal and obtain reference parameters based on the preliminary sampling signal. The reference parameters are used to characterize the frequency characteristics of the electrical pulse signal output by the object under test. The preliminary sampling signal is obtained by the data acquisition device after acquiring the electrical pulse signal output by the object under test based on preset sampling parameters.
[0023] The sampling parameter reconfiguration module is used to reconfigure the sampling parameters of the data acquisition device according to the reference parameters and the preset expected number of cycles to form the target sampling parameters, so that the data acquisition device can acquire the electrical pulse signal output by the object under test to obtain the target sampling signal with the preset expected number of cycles.
[0024] A computer device includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described sampling parameter configuration method and / or the steps of the above-described signal testing method.
[0025] A computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the above-described sampling parameter configuration method and / or the steps of the above-described signal testing method.
[0026] The aforementioned sampling parameter configuration method, apparatus, signal testing method, and computer equipment have at least the following beneficial effects: This sampling parameter configuration method, by acquiring a preliminary sampling signal obtained from the preliminary sampling of the electrical pulse signal output by the object under test based on preset sampling parameters, allows for the understanding of the frequency characteristics of the electrical pulse signal output by the object under test. Then, the sampling parameters of the data acquisition device can be reconfigured according to the reference parameters characterizing the frequency characteristics of the electrical pulse signal output by the object under test and a preset desired number of cycles to form target sampling parameters. This allows the data acquisition device to resample the signal of the object under test based on the target sampling parameters to obtain a target sampling signal with a preset desired number of cycles. This ensures that for electrical pulse signals of different frequencies output by the object under test, a target sampling signal with a preset desired number of cycles can be obtained, avoiding the problems of large subsequent measurement errors due to too few sampling cycles or low measurement calculation efficiency due to too many sampling cycles. It can improve measurement calculation efficiency while ensuring measurement accuracy. Furthermore, since the computational load can be reduced, the computational power requirements of the hardware can be further reduced, thus lowering costs. Attached Figure Description
[0027] Figure 1 This is a schematic diagram of the sampling process for obtaining a sampled signal with the desired number of cycles in an exemplary technique;
[0028] Figure 2 This is an application environment diagram of the sampling parameter configuration method and the signal testing method in one embodiment;
[0029] Figure 3 This is a flowchart illustrating a sampling parameter configuration method in one embodiment;
[0030] Figure 4 This is a flowchart illustrating the sampling parameter configuration method in another embodiment;
[0031] Figure 5 This is a flowchart illustrating the sampling parameter configuration method in another embodiment;
[0032] Figure 6 This is a flowchart illustrating a signal testing method in one embodiment;
[0033] Figure 7 This is a structural block diagram of a sampling parameter configuration device in one embodiment;
[0034] Figure 8 This is a structural block diagram of a signal testing device in one embodiment;
[0035] Figure 9 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0036] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0037] As described in the background section, the output signal of active implantable devices is generally an electrical pulse stimulation signal, and the parameters are adjustable within a certain range. These active implantable devices are often designed as devices with multi-channel electrical pulse stimulation signal output in order to achieve precise stimulation of the target site.
[0038] For electrical pulse stimulation signals with a wide range of variable parameters such as frequency and multiple channels, the difficulty of signal testing during the research and development and verification process is greatly increased.
[0039] When measuring electrical pulse stimulation signals, to ensure accurate results, it is often necessary to measure parameters such as frequency, pulse width, and amplitude for each cycle separately and then calculate their average values. However, when acquiring waveforms using a data acquisition device, if the preset acquisition duration is 1 second, only two cycles of signal can be acquired for electrical pulse stimulation signals with frequencies as low as 2Hz. This results in an insufficient sample size and increased measurement error. Conversely, for electrical pulse stimulation signals with frequencies as high as 250Hz, 250 cycles can be acquired within 1 second, leading to an excessive sample size and increased computational load. Therefore, a balance needs to be struck between measurement error and computational load.
[0040] In one of the exemplary technologies, such as Figure 1 As shown, waveform acquisition is performed using the initial sampling parameters configured on the data acquisition device. Then, the number of cycles of the acquired waveform is counted; for example, rising edge detection can be used to detect the number of cycles. Finally, the measured number of cycles N is compared. T0 With the preset expected number of cycles N TThe magnitude relationship, if the measured number of cycles N T0 Less than the preset expected number of cycles N T Then, the sampling is performed again, and the waveforms from the previous and subsequent samples are merged to form a new waveform signal. The number of periods in the merged waveform signal is then compared to the preset expected number of periods. If it is still less than the preset expected number of periods, the sampling and merging process is repeated until the number of periods in the merged waveform signal is greater than or equal to the preset expected number of periods N. T If the actual number of cycles N T0 If the number of cycles is greater than the preset expected number of cycles or the number of cycles of the merged waveform signal is greater than the preset expected number of cycles, then the waveform of the first sample or the waveform of the last merged signal is truncated until the actual number of cycles equals the preset expected number of cycles before proceeding to the next waveform measurement operation.
[0041] This implementation scheme often relies on program algorithms to detect the rising / falling edges of the waveform. Since the data acquisition device configuration parameters are fixed, the time spent sampling a fixed number of cycles for input signals with large frequency differences, such as 2Hz and 250Hz, also differs greatly, which is not conducive to controlling the length of the entire test cycle.
[0042] To address the aforementioned problems, embodiments of this application provide a sampling parameter configuration method, which can be applied to, for example... Figure 2 In the application environment shown, the data acquisition device 102 communicates with the control board 104 via a wireless network connection or a contact connection such as a serial port. The data acquisition device 102 can receive and store commands sent to it by the control board 104, and update configuration parameters upon receiving a command. The data acquisition device 102 can acquire the electrical pulse stimulation signal output by the active instrument 106. The waveform signal sampled by the data acquisition device 102 can be uploaded to the control board 104, allowing the control board 104 to reconfigure its sampling parameters based on the sampled waveform signal. Alternatively, the control board 104 can use the sampled signal to perform signal testing on the object under test, calculating the waveform's frequency, pulse width, amplitude, etc. The control board 104 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, embedded boards, and USB flash drives with computer programs. The active instrument 106 can be an electric hook, an electric scalpel, or an ultrasonic scalpel, etc. The data acquisition device 102 can be a data acquisition card, etc.
[0043] In one embodiment, such as Figure 3 As shown, a sampling parameter configuration method is provided, which can be applied to... Figure 1 Taking the control board 104 as an example, the explanation includes the following steps:
[0044] S200: Acquire the preliminary sampling signal and obtain reference parameters based on the preliminary sampling signal. The reference parameters are used to characterize the frequency characteristics of the electrical pulse signal output by the object under test. The preliminary sampling signal is obtained by the data acquisition device after acquiring the electrical pulse signal output by the object under test based on preset sampling parameters. The frequency of the sampled signal, the number of sampling points corresponding to a single cycle, etc., can all reflect the frequency characteristics of the signal of the object under test.
[0045] S400: The sampling parameters of the data acquisition device are reconfigured according to the reference parameters and the preset expected number of cycles to form the target sampling parameters, so that the data acquisition device can acquire the electrical pulse signal output by the object under test to obtain the target sampling signal with the preset expected number of cycles.
[0046] The preset sampling parameters are the sampling parameters currently configured on the data acquisition device. These parameters can include the sampling frequency, the number of sampling points included in the data read from the buffer in a single operation, and the sampling duration. A data acquisition device refers to a device with at least one data acquisition channel, such as a data acquisition card. When it has multiple acquisition channels, the implementation of sampling parameter configuration in this application is applicable to the reconfiguration of the acquisition parameters for each data acquisition channel. This enables adaptive adjustment based on the frequency characteristics of the input signal of a single channel during multi-channel acquisition, and the configuration of sampling parameters for each channel can be performed independently.
[0047] Reconfiguration refers to the process of updating the sampling parameters of a data acquisition device. This can be performed by a built-in or external microprocessor. For example, a driver program for the data acquisition device can be designed using the LabVIEW development environment. Each time the data acquisition device performs data acquisition, the above steps are executed to reconfigure the acquisition parameters, forming target sampling parameters. This enables the data acquisition device to accurately acquire a target sampling signal with a preset desired number of periods for testing and calculation.
[0048] Specifically, the sampling parameter configuration method provided in this application involves acquiring a preliminary sampling signal obtained by initially sampling the electrical pulse signal output by the object under test based on preset sampling parameters. Based on this preliminary sampling signal, the frequency characteristics of the electrical pulse signal output by the object under test can be understood. Then, the sampling parameters of the data acquisition device can be reconfigured according to the reference parameters characterizing the frequency characteristics of the electrical pulse signal output by the object under test and a preset desired number of cycles to form target sampling parameters. The data acquisition device can then resample the signal of the object under test based on the target sampling parameters to obtain a target sampling signal with a preset desired number of cycles. This ensures that for electrical pulse signals of different frequencies output by the object under test, a target sampling signal with a preset desired number of cycles can be obtained. This avoids the problem of large subsequent measurement errors due to too few sampling cycles or low measurement calculation efficiency due to too many sampling cycles, thus improving measurement calculation efficiency while ensuring measurement accuracy. Furthermore, since the computational load can be reduced, the hardware's computing power requirements can be further reduced, lowering costs.
[0049] To accurately understand the frequency characteristics of the electrical pulse signal output by the object under test, it is necessary to ensure that at least one cycle of the electrical pulse signal is acquired. Therefore, the initial sampling time should be constrained and pre-configured. Considering that the frequency of the electrical pulse signal output by the object under test can vary within a certain range, the period corresponding to the minimum frequency of the electrical pulse signal can be determined based on the frequency range of the electrical pulse signal. Then, a first time length is determined that is greater than or equal to the period corresponding to the minimum frequency, thereby ensuring that the initial sampled signal includes at least one complete cycle of the electrical pulse signal. Therefore, in one embodiment, the initial sampled signal is obtained by the data acquisition device acquiring the electrical pulse signal output by the object under test based on preset sampling parameters for a first time length. The first time length is the time required to sample at least one complete electrical pulse signal, determined based on the frequency range of the electrical pulse signal output by the object under test.
[0050] For example, taking a type of active device as the object under test, the frequency range of its output electrical pulse signal is 2 to 250 Hz. Then, taking the period time of 0.5 s corresponding to the minimum frequency of 2 Hz as the benchmark, the first time length is determined. This first time length is greater than or equal to 0.5 s. For example, a first time length of 1 s can be selected for preliminary sampling. This ensures that at least one cycle of waveform signal can be collected for different frequencies of electrical pulse signals output by the object under test, which is used to determine the above benchmark parameters.
[0051] Since the length of the data acquired by the data acquisition device and the number of waveform cycles are related to the number of sampling points N in the data acquisition device configuration, it is only necessary to calculate the number of points N acquired in a single cycle. 1T Multiply by the preset expected number of cycles N TThis allows us to obtain a fixed N. T The number of sampling points N required by the data acquisition device to generate a preset desired periodic waveform. Here, N refers to the length of data read from the channel each time by the data acquisition device, which can be read from the buffer of the data acquisition device.
[0052] Therefore, in one embodiment, such as Figure 4 As shown, the reference parameters include the number of the first sampling points collected within a single cycle of the electrical pulse signal output by the object under test;
[0053] Based on the baseline parameters and the preset expected number of cycles N T Step S400, which involves reconfiguring the sampling parameters of the data acquisition device to form the target sampling parameters, includes:
[0054] S420: Based on the first sampling point number N 1T With the preset expected number of cycles N T The product of these factors determines the number of second sampling points N.
[0055] S440: Reconfigure the sampling parameters of the data acquisition device based on the second number of sampling points N to form the target sampling parameters.
[0056] Sampling parameters include sampling frequency, number of sampling points, and sampling time length. The number of sampling points in the data acquisition device can be directly configured to N based on the second number of sampling points N, allowing for a single read of data from the channel to obtain the target sampled signal. Alternatively, the sampling time length can be configured based on the second number of sampling points N. For example, if the data acquisition device is configured with 10 sampling points and the second number of sampling points N is 20, the sampling time length can be configured to the time between two reads from the channel, ensuring accurate acquisition of the target sampled signal. This simplifies complex operations such as waveform acquisition and period determination before measurement by dynamically configuring the sampling parameters of the data acquisition device through a program. This allows for the acquisition of waveforms with a fixed, preset desired number of periods from input signals of different frequencies from each channel of the data acquisition device.
[0057] Based on the examples above, such as Figure 5 As shown, in one embodiment, the target sampling parameters include sampling frequency, number of sampling points, and sampling time length; step S440 of reconfiguring the sampling parameters of the data acquisition device based on the second number of sampling points includes:
[0058] S442: Reconfigure the sampling frequency, number of sampling points, and / or sampling time length according to the second number of sampling points. The data acquisition device can be reconfigured by reconfiguring parameters in one or more dimensions.
[0059] Taking the acquisition of electrical pulse signals from the aforementioned active device as an example, it can be seen that for 2Hz and 250Hz electrical pulse signals, if the same sampling frequency is used to acquire waveform signals with a preset number of cycles of 20, the required sampling time lengths differ significantly. During waveform acquisition and testing of the object under test, it is desirable to reduce this difference to ensure acquisition efficiency. Based on this, in one embodiment, the step S442 of reconfiguring the sampling frequency according to the second number of sampling points includes:
[0060] Based on the ratio of the second number of sampling points to the second time length, the sampling frequency of the data acquisition device is determined and reconfigured. The second time length is the maximum sampling time length required to obtain the target sampled signal.
[0061] Users can preset a second time length, for example, 1 second. This means that the user expects the data acquisition device to obtain the target sampled signal under the reconfigured sampling parameters after resetting the sampling parameters based on the initial sampled signal, taking electrical pulse signals of different frequencies from the output of the object under test. By calculating the ratio of the second number of sampling points N to the second time length, the corresponding sampling frequency (i.e., the number of sampling points to be collected within 1 second) can be determined to complete the acquisition of the target sampled signal within the second time length. Based on the sampling frequency corresponding to the second time length, a final sampling frequency greater than or equal to this sampling frequency can be selected to configure the sampling frequency of the data acquisition device.
[0062] It should be noted that the electrical pulse signal with a frequency range of 2–250 Hz in the above examples is not limited to only 2 Hz and 250 Hz during operation. The object under test can output electrical pulse signals of any frequency between 2 and 250 Hz. The above examples are mainly to illustrate the beneficial effects achieved by the method provided in the embodiments of this application and do not limit the actual protection scope of this application. It should also be noted that the range of electrical pulse signals is not limited to 2–250 Hz, but depends on the frequency range of electrical pulse signals that the object under test can output.
[0063] In one embodiment, the object under test is an active device. The above-described sampling parameter configuration method is particularly suitable for situations where the object under test is an active device. As described in the above embodiments, active devices often have the characteristic of adjustable frequency of the output electrical pulse stimulation signal. The above-described sampling parameter configuration method is used to configure... Figure 2The data acquisition device 102 shown can accurately acquire the target sampling signal with a preset expected number of cycles from the output of the active instrument 106. This provides data for testers to further test whether the actual operating parameters of the active instrument 106 meet the design standards. Furthermore, since the preset expected number of cycles for the target sampling signal is configurable in advance, testers can select an expected number of cycles that meets accuracy requirements while avoiding excessive computational load. This avoids problems such as large measurement errors due to too few sampling cycles or low measurement efficiency due to too many sampling cycles, thus improving measurement efficiency while ensuring measurement accuracy.
[0064] The above sampling parameter configuration method is applicable to configuring sampling parameters for multi-channel data acquisition devices. The steps of this method can be executed for each channel to adaptively configure sampling parameters based on the frequency characteristics of the signal received by each channel. This allows each channel to acquire electrical pulse signals according to its preset desired number of cycles. This solves the problem of large errors or cumbersome calculations when calculating the average measured value during pulse signal acquisition and measurement of active implantable devices due to the variable number of cycles.
[0065] The above-mentioned sampling parameter configuration method can automatically acquire waveforms with a fixed preset expected number of cycles. This ensures that the data acquisition device can obtain waveforms with a fixed preset expected number of cycles when acquiring input signals of different frequencies. It solves the problem that in the measurement of parameters such as frequency, pulse width, and amplitude of the output pulse signal of active implantable devices, the error in calculating the average value is too large due to too few acquired waveform cycles, or the calculation becomes too large and cumbersome due to too many cycles.
[0066] This application also provides a signal testing method, such as... Figure 6 As shown, the method includes:
[0067] S20: Acquire the target sampling signal output by the data acquisition device. The target sampling signal is a sampling signal with a preset expected number of cycles obtained by the data acquisition device after acquiring the electrical pulse signal output by the object under test based on preset sampling parameters. The sampling parameters of the data acquisition device are configured by the above-mentioned sampling parameter configuration method.
[0068] S40: Determine the first parameter of each electrical pulse signal in the target sampling signal; each electrical pulse signal refers to the electrical pulse signal of each cycle.
[0069] S60: The first parameter of each electrical pulse signal in the target sampling signal is averaged to obtain the test result. Averaging the first parameter means summing the first parameters and dividing the sum by the preset expected number of cycles to obtain the average value.
[0070] The definitions of terms used in the signal testing method can be found in the definitions provided in the above-mentioned sampling parameter configuration method, and will not be repeated here. Specifically, during signal testing, a data acquisition device with sampling parameters configured using the above-mentioned sampling parameter configuration method is used to acquire the electrical pulse signal output by the object under test. Then, the target sampling signal is acquired. This target sampling signal has a preset desired number of cycles. Parameter calculations are performed for each cycle of the electrical pulse signal. The first parameter can be parameters such as the frequency, pulse width, and amplitude of the electrical pulse signal. Based on the first parameter of each cycle of the electrical pulse signal, the average value is calculated. This average value is used as the test result to evaluate whether the object under test meets the design requirements. The process of calculating the average value involves averaging parameters of the same type. For example, adding the electrical pulse signals of each cycle and dividing by the desired number of cycles yields the average frequency of the electrical pulse signal output by the object under test. This average value characterizes the frequency characteristics of the electrical pulse signal, allowing testers to determine whether its frequency dimension meets the design requirements. The process of averaging other types of parameters such as pulse width and amplitude is similar to the process of calculating the average frequency, and will not be repeated here.
[0071] This signal testing method can be applied to test the electrical pulse stimulation signals output by active devices such as ultrasonic scalpels, electrocautery devices, and stimulation pulse generators, thereby verifying whether the design of the active device meets requirements. It should be noted that the above signal testing method can be applied to the electrical pulse signals input to each channel of a multi-channel data acquisition device to obtain test results for the electrical pulse signals of different channels. For example, if an active device has multi-channel characteristics, the electrical pulse signals output by each channel of the active device can be tested simultaneously using a multi-channel data acquisition device and the above signal testing method, with each channel operating independently, improving testing efficiency.
[0072] The maximum sampling frequency of the selected data acquisition device should be greater than or equal to twice the highest frequency component of the acquired signal. In practice, a data acquisition device with a maximum sampling frequency of 5 to 10 times the highest frequency component of the acquired signal can be selected to better reproduce the electrical pulse signal waveform of the object under test and provide accurate data basis for test calculation.
[0073] To better illustrate the implementation process of the signal testing method provided in this application, an active device with a frequency range of 2-250Hz is used as the test object for explanation. However, this explanation does not limit the actual protection scope of this application. When the data acquisition device acquires the output electrical pulse signal, the first preliminary sampling can be performed for a total duration of 1 second with a preset first time length. The obtained waveform will definitely be a complete cycle. The number of cycles is calculated and used together with the expected number of cycles to calculate the required number of second sampling points N. The data acquisition device is reconfigured with this parameter and a second resampling is performed. The obtained waveform is the waveform with the preset expected number of cycles. Then, the frequency, pulse width, and amplitude of the waveform in each cycle are measured. Finally, the average value of the measurement results is calculated, and the number of samples is the fixed preset expected number of cycles. The final result is obtained in this way, which reduces the error while minimizing the amount of calculation.
[0074] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0075] Based on the same inventive concept, this application also provides a sampling parameter configuration device for implementing the sampling parameter configuration method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations in one or more sampling parameter configuration device embodiments provided below can be found in the limitations of the sampling parameter configuration method described above, and will not be repeated here.
[0076] In one embodiment, such as Figure 7 As shown, a sampling parameter configuration device includes:
[0077] The preliminary sampling signal acquisition module 200 is used to acquire the preliminary sampling signal and obtain reference parameters based on the preliminary sampling signal. The reference parameters are used to characterize the frequency characteristics of the electrical pulse signal output by the object under test. The preliminary sampling signal is obtained by the data acquisition device after acquiring the electrical pulse signal output by the object under test based on preset sampling parameters.
[0078] The sampling parameter reconfiguration module 400 is used to reconfigure the sampling parameters of the data acquisition device according to the reference parameters and the preset expected number of cycles to form target sampling parameters, so that the data acquisition device can acquire the electrical pulse signal output by the object under test to obtain a target sampling signal with the preset expected number of cycles.
[0079] Specifically, the preliminary sampling signal acquisition module 200 acquires a preliminary sampling signal and obtains reference parameters based on it. These reference parameters characterize the frequency characteristics of the electrical pulse signal output by the object under test. The preliminary sampling signal is obtained by the data acquisition device after acquiring the electrical pulse signal output by the object under test based on preset sampling parameters. Then, the sampling parameter reconfiguration module 400 reconfigures the sampling parameters of the data acquisition device according to the reference parameters and the preset desired number of cycles to form target sampling parameters. This allows the data acquisition device to acquire the electrical pulse signal output by the object under test and obtain a target sampling signal with the preset desired number of cycles. This avoids the problem of large subsequent measurement errors due to too few sampling cycles or low measurement calculation efficiency due to too many sampling cycles, thus improving measurement calculation efficiency while ensuring measurement accuracy.
[0080] In one embodiment, the preliminary sampling signal is obtained by the data acquisition device after acquiring the electrical pulse signal output by the object under test for a first time length based on preset sampling parameters. The first time length is the time for sampling at least one complete electrical pulse signal, determined based on the frequency range of the electrical pulse signal output by the object under test.
[0081] In one embodiment, the reference parameters include the number of first sampling points collected within a single cycle of the electrical pulse signal output by the object under test; the sampling parameter reconfiguration module 400 includes:
[0082] The second sampling point number determination unit 420 is used to determine the number of sampling points N based on the first sampling point number N. 1T With the preset expected number of cycles N T The product of these factors determines the number of second sampling points N.
[0083] The execution unit 440 is reconfigured to reconfigure the sampling parameters of the data acquisition device based on the second number of sampling points N, so as to form the target sampling parameters.
[0084] In one embodiment, the target sampling parameters include sampling frequency, number of sampling points, and sampling time length; the reconfiguration execution unit 440 includes:
[0085] The parameter configuration unit 442 is used to reconfigure the sampling frequency, the number of sampling points, and / or the sampling time length according to the second number of sampling points.
[0086] In one embodiment, the parameter configuration unit 442 for each dimension includes:
[0087] The sampling frequency adjustment unit is used to determine and reconfigure the sampling frequency of the data acquisition device based on the ratio of the second number of sampling points to the second time length. The second time length is the maximum sampling time length required to obtain the target sampled signal.
[0088] In one embodiment, the object under test is an active device.
[0089] Each module in the above-mentioned sampling parameter configuration device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0090] Based on the same inventive concept, this application also provides a signal testing apparatus for implementing the signal testing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more signal testing apparatus embodiments provided below can be found in the limitations of the signal testing method described above, and will not be repeated here.
[0091] In one embodiment, a signal testing device, such as Figure 8 As shown, the device includes:
[0092] The target sampling signal acquisition module 20 is used to acquire the target sampling signal output by the data acquisition device. The target sampling signal is a sampling signal with a preset expected number of cycles obtained by the data acquisition device after acquiring the electrical pulse signal output by the object under test based on preset sampling parameters. The sampling parameters of the data acquisition device are configured by the above-mentioned sampling parameter configuration method.
[0093] The single-cycle electrical pulse signal calculation module 40 is used to determine the first parameter of each electrical pulse signal in the target sampled signal;
[0094] The test result acquisition module 60 is used to perform averaging on the first parameter of each electrical pulse signal in the target sampling signal to obtain the test result.
[0095] Each module in the aforementioned signal testing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module. This signal testing device, by executing the steps of the aforementioned signal testing method, can achieve the beneficial effects of the aforementioned signal testing method, which will not be elaborated further here.
[0096] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 9 As shown. The computer device includes a processor, memory, and network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database stores data such as a preset desired number of periods, a first time length, and a second time length. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements one of the above-described sampling parameter configuration methods and / or the above-described signal testing methods.
[0097] Those skilled in the art will understand that Figure 9 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0098] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to perform the following steps:
[0099] S200: Acquire the preliminary sampling signal and obtain the reference parameters based on the preliminary sampling signal. The reference parameters are used to characterize the frequency characteristics of the electrical pulse signal output by the object under test. The preliminary sampling signal is obtained by the data acquisition device after acquiring the electrical pulse signal output by the object under test based on the preset sampling parameters.
[0100] S400: The sampling parameters of the data acquisition device are reconfigured according to the reference parameters and the preset desired number of cycles to form the target sampling parameters, so that the data acquisition device can acquire the electrical pulse signal output by the object under test to obtain the target sampling signal with the preset desired number of cycles.
[0101] And / or,
[0102] S20: Acquire the target sampling signal output by the data acquisition device. The target sampling signal is a sampling signal with a preset expected number of cycles obtained by the data acquisition device after acquiring the electrical pulse signal output by the object under test based on preset sampling parameters. The sampling parameters of the data acquisition device are configured by the above-mentioned sampling parameter configuration method.
[0103] S40: Determine the first parameter of each electrical pulse signal in the target sampling signal; each electrical pulse signal refers to the electrical pulse signal of each cycle.
[0104] S60: The first parameter of each electrical pulse signal in the target sampling signal is averaged to obtain the test result. Averaging the first parameter means summing the first parameters and dividing the sum by the preset expected number of cycles to obtain the average value.
[0105] In one embodiment, the reference parameters include the number of first sampling points collected within a single cycle of the electrical pulse signal output by the object under test; the processor also performs the following steps when executing the computer program:
[0106] S420: Based on the first sampling point number N 1T With the preset expected number of cycles N T The product of these factors determines the number of second sampling points N.
[0107] S440: Reconfigure the sampling parameters of the data acquisition device based on the second number of sampling points N to form the target sampling parameters.
[0108] In one embodiment, the target sampling parameters include sampling frequency, number of sampling points, and sampling time length. When the processor executes the computer program, it further implements the following steps:
[0109] S442: Reconfigure the sampling frequency, number of sampling points, and / or sampling time length according to the second number of sampling points. The data acquisition device can be reconfigured by reconfiguring parameters in one or more dimensions.
[0110] In one embodiment, the processor, when executing a computer program, also performs the following steps:
[0111] The sampling frequency of the data acquisition device is determined and reconfigured based on the ratio of the second number of sampling points to the second time length.
[0112] In one embodiment, the object under test is an active device.
[0113] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, the computer program performing the following steps when executed by a processor:
[0114] S200: Acquire the preliminary sampling signal and obtain the reference parameters based on the preliminary sampling signal. The reference parameters are used to characterize the frequency characteristics of the electrical pulse signal output by the object under test. The preliminary sampling signal is obtained by the data acquisition device after acquiring the electrical pulse signal output by the object under test based on the preset sampling parameters.
[0115] S400: The sampling parameters of the data acquisition device are reconfigured according to the reference parameters and the preset desired number of cycles to form the target sampling parameters, so that the data acquisition device can acquire the electrical pulse signal output by the object under test to obtain the target sampling signal with the preset desired number of cycles.
[0116] And / or,
[0117] S20: Acquire the target sampling signal output by the data acquisition device. The target sampling signal is a sampling signal with a preset expected number of cycles obtained by the data acquisition device after acquiring the electrical pulse signal output by the object under test based on preset sampling parameters. The sampling parameters of the data acquisition device are configured by the above-mentioned sampling parameter configuration method.
[0118] S40: Determine the first parameter of each electrical pulse signal in the target sampling signal; each electrical pulse signal refers to the electrical pulse signal of each cycle.
[0119] S60: The first parameter of each electrical pulse signal in the target sampling signal is averaged to obtain the test result. Averaging the first parameter means summing the first parameters and dividing the sum by the preset expected number of cycles to obtain the average value.
[0120] In one embodiment, the reference parameters include the number of first sampling points collected within a single cycle of the electrical pulse signal output by the object under test; when the computer program is executed by the processor, it also performs the following steps:
[0121] S420: Based on the first sampling point number N 1T With the preset expected number of cycles N T The product of these factors determines the number of second sampling points N.
[0122] S440: Reconfigure the sampling parameters of the data acquisition device based on the second number of sampling points N to form the target sampling parameters.
[0123] In one embodiment, the target sampling parameters include sampling frequency, number of sampling points, and sampling time length. When the computer program is executed by the processor, it also implements the following steps:
[0124] S442: Reconfigure the sampling frequency, number of sampling points, and / or sampling time length according to the second number of sampling points. The data acquisition device can be reconfigured by reconfiguring parameters in one or more dimensions.
[0125] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0126] The sampling frequency of the data acquisition device is determined and reconfigured based on the ratio of the second number of sampling points to the second time length.
[0127] In one embodiment, the object under test is an active device.
[0128] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps:
[0129] S200: Acquire the preliminary sampling signal and obtain the reference parameters based on the preliminary sampling signal. The reference parameters are used to characterize the frequency characteristics of the electrical pulse signal output by the object under test. The preliminary sampling signal is obtained by the data acquisition device after acquiring the electrical pulse signal output by the object under test based on the preset sampling parameters.
[0130] S400: The sampling parameters of the data acquisition device are reconfigured according to the reference parameters and the preset desired number of cycles, so that the data acquisition device can acquire the electrical pulse signal output by the object under test to obtain a target sampling signal with a preset desired number of cycles.
[0131] And / or,
[0132] S20: Acquire the target sampling signal output by the data acquisition device. The target sampling signal is a sampling signal with a preset expected number of cycles obtained by the data acquisition device after acquiring the electrical pulse signal output by the object under test based on preset sampling parameters. The sampling parameters of the data acquisition device are configured by the above-mentioned sampling parameter configuration method.
[0133] S40: Determine the first parameter of each electrical pulse signal in the target sampling signal; each electrical pulse signal refers to the electrical pulse signal of each cycle.
[0134] S60: The first parameter of each electrical pulse signal in the target sampling signal is averaged to obtain the test result. Averaging the first parameter means summing the first parameters and dividing the sum by the preset expected number of cycles to obtain the average value.
[0135] In one embodiment, the reference parameters include the number of first sampling points collected within a single cycle of the electrical pulse signal output by the object under test; when the computer program is executed by the processor, it also performs the following steps:
[0136] S420: Based on the first sampling point number N 1T With the preset expected number of cycles N T The product of these factors determines the number of second sampling points N.
[0137] S440: Reconfigure the sampling parameters of the data acquisition device based on the second number of sampling points N to form the target sampling parameters.
[0138] In one embodiment, the sampling parameters include sampling frequency, number of sampling points, and sampling time length. When the computer program is executed by the processor, it also performs the following steps:
[0139] S442: Reconfigure the sampling frequency, number of sampling points, and / or sampling time length according to the second number of sampling points. The data acquisition device can be reconfigured by reconfiguring parameters in one or more dimensions.
[0140] In one embodiment, when the computer program is executed by a processor, it also performs the following steps:
[0141] The sampling frequency of the data acquisition device is determined and reconfigured based on the ratio of the second number of sampling points to the second time length.
[0142] In one embodiment, the object under test is an active device.
[0143] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0144] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0145] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for configuring sampling parameters, characterized in that, The method for applying the output signal of an active implantable device includes: A preliminary sampling signal is acquired, and a reference parameter is obtained based on the preliminary sampling signal. The reference parameter is used to characterize the frequency characteristics of the electrical pulse signal output by the object under test. The reference parameter is the number of first sampling points collected within a single cycle of the electrical pulse signal output by the object under test. The preliminary sampling signal is obtained by the data acquisition device after collecting the electrical pulse signal output by the object under test based on preset sampling parameters. The sampling parameters of the data acquisition device are reconfigured according to the reference parameters and the preset expected number of cycles to form target sampling parameters, so that the data acquisition device can acquire the electrical pulse signal output by the object under test to obtain a target sampling signal with the preset expected number of cycles. The step of reconfiguring the sampling parameters of the data acquisition device according to the benchmark parameters and the preset expected number of periods to form target sampling parameters includes: The second number of sampling points is determined by multiplying the first number of sampling points by the preset expected number of periods; The sampling parameters of the data acquisition device are reconfigured based on the second number of sampling points to form the target sampling parameters.
2. The method according to claim 1, characterized in that, The preliminary sampling signal is obtained by the data acquisition device after collecting the electrical pulse signal output by the object under test for a first time length based on preset sampling parameters. The first time length is the time for sampling at least one complete electrical pulse signal, determined based on the frequency range of the electrical pulse signal output by the object under test.
3. The method according to claim 1, characterized in that, The target sampling parameters include sampling frequency, number of sampling points, and sampling time length; the step of reconfiguring the sampling parameters of the data acquisition device based on the second number of sampling points includes: The sampling frequency, number of sampling points, and / or sampling time length are reconfigured based on the second number of sampling points.
4. The method according to claim 3, characterized in that, The step of reconfiguring the sampling frequency according to the second number of sampling points includes: Based on the ratio of the second number of sampling points to the second time length, the sampling frequency of the data acquisition device is determined and reconfigured, where the second time length is the maximum sampling time length required to obtain the target sampling signal.
5. A signal testing method, characterized in that, The method includes: The target sampling signal output by the data acquisition device is obtained. The target sampling signal is a sampling signal with a preset expected number of cycles obtained by the data acquisition device after acquiring the electrical pulse signal output by the object under test based on preset sampling parameters. The sampling parameters of the data acquisition device are configured by the sampling parameter configuration method according to any one of claims 1-4. Determine the first parameter of each electrical pulse signal in the target sampled signal; The first parameter of each electrical pulse signal in the target sampling signal is averaged to obtain the test result.
6. A sampling parameter configuration device, characterized in that, The device, used for output signals of active implantable devices, includes: The preliminary sampling signal acquisition module is used to acquire a preliminary sampling signal and obtain reference parameters based on the preliminary sampling signal. The reference parameters are used to characterize the frequency characteristics of the electrical pulse signal output by the object under test. The reference parameters are the number of first sampling points collected within a single cycle of the electrical pulse signal output by the object under test. The preliminary sampling signal is obtained by the data acquisition device after acquiring the electrical pulse signal output by the object under test based on preset sampling parameters. The sampling parameter reconfiguration module is used to reconfigure the sampling parameters of the data acquisition device according to the reference parameters and the preset expected number of cycles to form target sampling parameters, so that the data acquisition device can acquire the electrical pulse signal output by the object under test to obtain a target sampling signal with the preset expected number of cycles. The sampling parameter reconfiguration module is also used for: The second number of sampling points is determined by multiplying the first number of sampling points by the preset expected number of periods; The sampling parameters of the data acquisition device are reconfigured based on the second number of sampling points to form the target sampling parameters.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the sampling parameter configuration method according to any one of claims 1 to 4 and / or the steps of the signal testing method according to claim 5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the sampling parameter configuration method according to any one of claims 1 to 4 and / or the steps of the signal testing method according to claim 5.