Processing Method and Processing Device for Time-Series Data of Sensor for Needle-Free Injection Device
By preprocessing and feature extraction of the time series data of the sensor for the needle-free injection device, and determining the start and end points of the injection using sliding window technology, the problem of difficulty in extracting meaningful data in the prior art is solved, and efficient and accurate data processing is achieved.
Patent Information
- Application Number
- CN202410076582.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-18
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2044-01-18
AI Technical Summary
It is difficult for the prior art to effectively extract meaningful data from the time series data of sensors for needle-free injection devices by manual operation, such as peak pressure, injection start time and termination time.
By preprocessing the collected time series data, the peak point and the related reference segment, the starting point search segment and the end point search segment are determined, the characteristics of the time series data are calculated using sliding window technology, and the starting point and the end point are determined by comparing the characteristic values.
The batch processing of sensor time series data for needle-free injection devices is realized, and the target signals are accurately extracted, such as the start point, the end point, the peak point and the stationary section, etc., which improves the efficiency and accuracy of data processing.
Smart Images

Figure CN117909715B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and particularly to a method and a device for processing time series data of a sensor for a needleless injection device. Background Art
[0002] A needleless injection device is used to provide needleless injection into the intradermal, subcutaneous, or intramuscular region under the skin through the skin, and has broad application prospects in the fields of vaccination, diabetes treatment, skin beauty, drug infusion, etc. Since the skin is a barrier between the outside and the body, the needleless jet of the needleless injection device should penetrate the skin of the target area, and the jet pressure index of the needleless injection is an important parameter for evaluating whether the needleless jet can penetrate the skin. Usually, by detecting the jet pressure at the outlet of the medicine tube with a sensor (specifically, a high-frequency force sensor), time series data of the sensor can be obtained (that is, a sequence of voltage values detected by the sensor arranged in the order of their occurrence).
[0003] However, it is very difficult to obtain meaningful data (such as peak pressure, injection start time, and termination time, etc.) from the time series data of the sensor manually. At present, signal processing technologies can perform various operations such as preprocessing, filtering, transformation, compression, encoding, and decoding on the data collected by the sensor. However, the existing signal processing programs cannot be adaptively adjusted for specific problems, and thus, meaningful data in the time series data of the sensor for the needleless injection device cannot be obtained.
[0004] The above statement of the background art is only for facilitating the in-depth understanding of the technical solution of the present invention (such as the technical means used, the technical problems solved, and the technical effects produced, etc.), and should not be regarded as an admission or any form of implication that this information constitutes the prior art known to those skilled in the art. Summary of the Invention
[0005] The object of the present invention is to provide a method and a device for processing time series data of a sensor for a needleless injection device, which can extract meaningful data from the time series data.
[0006] According to an embodiment of the present invention, a method for processing time series data of a sensor for a needleless injection device is provided, which includes the following steps: inputting the collected time series data of the sensor for the needleless injection device and preprocessing the collected time series data; determining peak points from the preprocessed time series data and determining a reference segment, a starting point search segment, and an ending point search segment according to the peak points; setting the length of a sliding window and the length of each movement of the sliding window so that the sliding window moves at least in the reference segment, the starting point search segment, and the ending point search segment; calculating the characteristics of the time series data in the sliding window each time the sliding window moves; by comparing the characteristics of the time series data in the sliding window of the reference segment with the characteristics of the time series data in the sliding window of the starting point search segment, determining a first target sliding window including a starting point in the time series data in the starting point search segment; determining the change type of the time series data in the ending point search segment; according to the determined change type, determining the second target sliding window including an ending point in the time series data as: a sliding window in which the time series data in the ending point search segment has the same characteristics as the time series data in the sliding window of the reference segment or the characteristics of the time series data change by a predetermined amount.
[0007] The step of determining a reference segment, a starting point search segment, and an ending point search segment according to the peak points may include: based on the time point where the peak point is located as X0, determining the time range of the reference segment as (X0 - X) to (X0 - X + A), the time range of the starting point search segment as (X0 - Y) to (X0 - Y + B), and the time range of the ending point search segment as (X0 + Z) to (X0 + Z + C), and making (X0 - X) < (X0 - X + A) < (X0 - Y) < (X0 - Y + B) < X0 < (X0 + Z) < (X0 + Z + C), where X, Y, Z, A, B, and C are reference times determined by weight coefficients and data lengths.
[0008] The step of determining the first target sliding window may include: calculating the slope of the time series data in the sliding window each time the sliding window moves in the reference segment, taking each calculated slope as a reference slope, determining the maximum value among the reference slopes, and further calculating the average value of the reference slopes according to the reference slopes; calculating the slope of the time series data in the sliding window each time the sliding window moves starting from the head end of the starting point search segment, taking each calculated slope as a first comparison slope; determining the first target sliding window as the sliding window in which the first comparison slope of the time series data is greater than twice the average value of the reference slopes and greater than the maximum value among the reference slopes for the first time.
[0009] The steps of determining the change type of the time series data of the termination point search segment may include: determining whether the time series data of the termination point search segment is of the type with a steady segment after a peak point; after determining that the time series data of the termination point search segment is of the type with a steady segment after a peak point, determining whether the time series data of the termination point search segment is of the type with a sharp drop after the steady segment or of the type with a gradual drop after the steady segment.
[0010] The steps of determining whether the time series data of the termination point search segment is of the type with a steady segment after a peak point may include: calculating the range of the time series data in the sliding window each time the sliding window moves from the head end of the termination point search segment; when each calculated range is continuously less than the first range threshold, determining that the time series data of the termination point search segment is of the type with a steady segment after a peak point; when there is no calculated range that is continuously less than the first range threshold, determining that the time series data of the termination point search segment is of the type with continuous decline after a peak point.
[0011] The steps of determining whether the time series data of the termination point search segment is of the type with a sharp drop after the steady segment or of the type with a gradual drop after the steady segment may include: after each calculated range is continuously less than the first range threshold appears, as the sliding window moves further, when at least one calculated range is greater than the second range threshold, determining that the time series data of the termination point search segment is of the type with a sharp drop after the steady segment; when each calculated range is less than or equal to the second range threshold, determining that the time series data of the termination point search segment is of the type with a gradual drop after the steady segment, where the second range threshold is greater than the first range threshold.
[0012] The steps of determining the second target sliding window may include: when it is determined that the time series data of the termination point search segment is of the type with continuous decline after a peak point, calculating the slope of the time series data in the sliding window each time the sliding window moves from the head end of the termination point search segment, taking each calculated slope as the second comparison slope, and determining the second target sliding window as the sliding window when the second comparison slope of the time series data first falls within the range of the average value of the reference slope.
[0013] The steps of determining the second target sliding window may include: when it is determined that the time series data of the termination point search segment is of the type with a steady segment after a peak point and a gradual drop after the steady segment, after each calculated range is continuously less than the first range threshold appears, as the sliding window moves further, calculating the slope of the time series data in the sliding window each time the sliding window moves, taking each calculated slope as the second comparison slope, and determining the second target sliding window as the sliding window when the second comparison slope of the time series data first falls within the range of the average value of the reference slope.
[0014] The steps for determining the second target sliding window may include: when it is determined that the time series data of the termination point search segment has a steady segment after the peak point and then drops sharply, after each calculated range difference is continuously less than the first range threshold, as the sliding window moves further, calculate the slope of the time series data in the sliding window each time the sliding window moves, and use each calculated slope as the second comparison slope. The second target sliding window is determined as the sliding window in which the second comparison slope of the time series data changes from negative to positive.
[0015] The method for processing the time series data of the sensor for the needle-free injection device may further include: after determining the reference segment according to the peak point, before determining the starting point search segment and the termination point search segment according to the peak point, perform zeroing processing on all the time series data, and the steps of the zeroing processing include: calculate the average value of the time series data of the reference segment; subtract the calculated average value of the time series data of the reference segment from all the time series data, so as to obtain the time series data after zeroing processing.
[0016] The steps for preprocessing the collected time series data may include: eliminating the trend amount by a linear method, performing FIR filtering on the waveform after eliminating the trend amount, and performing smoothing processing by a robust linear regression method.
[0017] The characteristics of the time series data in the sliding window may at least include the variance, average value, derivative, slope and range difference of the time series data in the sliding window.
[0018] The method for processing the time series data of the sensor for the needle-free injection device may further include: after obtaining the starting point and the termination point, calculate the difference between the time corresponding to the starting point and the time before the time corresponding to the termination point, so as to obtain the injection time of the needle-free injection device.
[0019] According to another embodiment of the present invention, there is provided a processing device for the time series data of the sensor for the needle-free injection device, which includes: at least one data processor; and at least one memory, which stores instructions, and when the instructions are executed by the at least one data processor, the above-mentioned method for processing the time series data of the sensor for the needle-free injection device is executed.
[0020] The present invention adopts the above technical solutions, and has the following beneficial effects: The present invention can realize batch processing of sensor signals, and finally can extract target signals (such as starting point, termination point, peak point, steady segment, etc.) in the sensor signals. Description of the Drawings
[0021] The exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. For clarity, the same components in different drawings are denoted by the same reference numerals. It should be noted that the drawings are only schematic and are not necessarily drawn to scale. In these drawings:
[0022] Figure 1 is a flowchart of a method for processing time series data of a sensor for a needleless injection device according to an embodiment of the present invention.
[0023] Figure 2A and Figure 2B is a detailed flowchart of a method for processing time series data of a sensor for a needleless injection device according to an exemplary embodiment of the present invention.
[0024] Figure 3 shows the time series data of a sensor for a needleless injection device.
[0025] Figure 4 shows Figure 3 a part of the time series data of the reference segment in
[0026] Figure 5 shows Figure 3 a part of the time series data of the starting point search segment in
[0027] Figures 6A to 6C shows the time series data of three types of end point search segments. Detailed Embodiment
[0028] The embodiments of the present invention will be described in detail below. These embodiments are implemented on the premise of the technical solution of the present invention, and detailed implementation manners and specific operation procedures are given. However, the protection scope of the present invention is not limited to the following embodiments.
[0029] Figure 1 is a flowchart of a method for processing time series data of a sensor for a needleless injection device according to an embodiment of the present invention. As Figure 1 shown, the method for processing time series data of a sensor for a needleless injection device according to an embodiment of the present invention includes the following steps:
[0030] Step S10: Input the collected time series data of the sensor for the needleless injection device and preprocess the collected time series data.
[0031] Step S20: Determine peak points from the preprocessed time series data, and determine a reference segment, a starting point search segment, and an ending point search segment based on the peak points.
[0032] Step S30: Set the length of the sliding window and the length of each movement of the sliding window so that the sliding window moves at least in the reference segment, the starting point search segment, and the ending point search segment.
[0033] Step S40: Calculate the characteristics of the time series data in the sliding window each time the sliding window moves.
[0034] Step S50: By comparing the characteristics of the time series data in the sliding window of the reference segment with the characteristics of the time series data in the sliding window of the starting point search segment, determine a first target sliding window in the starting point search segment that includes the starting point in the time series data.
[0035] Step S60: Determine the change type of the time series data in the ending point search segment.
[0036] Step S70: According to the determined change type, determine the second target sliding window including the ending point in the time series data as the sliding window in which the time series data in the sliding window of the ending point search segment and the reference segment have the same characteristics or the characteristics of the time series data change by a predetermined amount.
[0037] Figure 2A and Figure 2B is a specific flowchart of a method for processing time series data of a sensor for a needleless injection device according to an exemplary embodiment of the present invention. Hereinafter, steps S10 to S70 will be described in detail in conjunction with Figure 2A and Figure 2B to describe steps S10 to S70 in detail.
[0038] In step S10, an input / output path of a data file (which stores time series data generated by a sensor for a needleless injection device) can be created (S11), and each data file in the input path in a specified format can be traversed to obtain the data file (S12), so as to input the collected time series data of the sensor for the needleless injection device.
[0039] In addition, the step of preprocessing the collected time series data (S13) may include: eliminating the trend amount by a linear method, performing finite impulse response (FIR) filtering on the waveform after eliminating the trend amount, and performing smoothing processing by a robust linear regression method.
[0040] Figure 3 shows the time series data of the sensor for the needleless injection device, and Figure 3The time series data shown has undergone the above-mentioned preprocessing process.
[0041] Taking Figure 3 as an example, in S20, from the Figure 3 time series data shown, the peak point M (S21) can be determined, and thus the time point X0 where the peak point is located can be determined.
[0042] According to an embodiment of the present invention, a reference segment can be determined based on the peak point (S22). Specifically, based on the time point where the peak point is located as X0 (i.e., the abscissa of the peak point), the time range (i.e., the abscissa range) of the reference segment is determined to be from (X0 - X) to (X0 - X + A), and (X0 - X) < (X0 - X + A) < X0. Wherein, X and A are reference times determined by the weight coefficient and the data length. For example, Figure 3 the box ① in Figure 3 is the reference segment of the time series data shown.
[0043] Due to the characteristics of the sensor itself, zero drift phenomenon will occur during the data acquisition process, and this process is random both in time and in the drift value. Therefore, it is necessary to reduce the interference of zero drift and make the ordinate values of the data points return to the zero baseline. Therefore, in a preferred embodiment, after determining the reference segment according to the peak point (S22), and before determining the starting point search segment and the ending point search segment according to the peak point (S23), all the time series data are subjected to zeroing processing (S81), and the steps of this zeroing processing (S81) include: calculating the average value of the time series data of the reference segment, and subtracting the calculated average value of the time series data of the reference segment from all the time series data, so as to obtain the time series data after zeroing processing. Since the steps of zeroing processing make the ordinate values of the data points return to the zero baseline, the abscissa of the peak point determined in step S21 remains unchanged before and after zeroing processing, that is, the time point where the peak point is located is still X0. After zeroing processing (S81), the starting point search segment and the ending point search segment can be determined according to the peak point (specifically, the time point X0 where the peak point is located) (S23).
[0044] The starting point refers to the start of the needle-free injection device injection, and the starting point appears after the reference segment and before the time point where the peak point is located. Therefore, the time range of the starting point search segment is from (X0 - Y) to (X0 - Y + B), and (X0 - X) < (X0 - X + A) < (X0 - Y) < (X0 - Y + B) < X0. Wherein, Y and B are reference times determined by the weight coefficient and the data length. For example, Figure 3 the box ② in Figure 3The starting point search segment of the time series data shown. The end point refers to the end of the injection by the needle-free injection device, and the end point appears after the time point of the peak point. Therefore, the time range of the end point search segment is from (X0 + Z) to (X0 + Z + C), and it is ensured that X0 < (X0 + Z) < (X0 + Z + C). Among them, Z and C are reference times determined by the weight coefficient and the data length.
[0045] In step S30, in a specific example, the length of the sliding window is set to 5, and the length of each movement of the sliding window is set to 1 (S31). That is, the sliding window includes five data and moves one data each time.
[0046] The sliding window can move at least in the reference segment, the starting point search segment, and the end point search segment. The sliding window can move at least in the reference segment (S32). Figure 4 Shows Figure 3 Part of the time series data of the reference segment in. As Figure 4 Shown, when the sliding window moves in the reference segment, the sliding window can include the data -0.0342, -0.3674, -0.03769, -0.3232, -0.3421. After the sliding window moves once, the sliding window includes the time series data -0.3674, -0.03769, -0.3232, -0.3421, -0.3548. In this case, after the sliding window moves once again, the sliding window includes the time series data -0.03769, -0.3232, -0.3421, -0.3548, -0.02917. In this case, after the sliding window moves once again, the sliding window includes the time series data -0.3232, -0.3421, -0.3548, -0.02917, -0.3232. In this case, after the sliding window moves once again, the sliding window includes the time series data -0.3421, -0.3548, -0.02917, -0.3232, -0.03201. The sliding window can move at least in the starting point search segment (S33). Figure 5 Shows Figure 3 Part of the time series data of the starting point search segment in. Similarly, when the sliding window moves in the starting point search segment, the sliding window can include the data -0.02475, 0.040894, 0.031426, 0.021328, 0.041209. After the sliding window moves once, the sliding window includes the time series data 0.040894, 0.031426, 0.021328, 0.041209, 0.095805. In the same way, the sliding window can move at least in the end point search segment (S34).
[0047] The design where the sliding window includes five data and moves one data each time can effectively extract the feature information in the time series data. And since the sliding window moves only one data each time, the sliding window can exactly traverse all the time series data in the reference segment, the starting point search segment, and the ending point search segment. However, the length of the sliding window in the present invention is not limited to 5, and the length that the sliding window moves each time is not limited to 1. In addition, in order to traverse all the time series data in the reference segment, the starting point search segment, and the ending point search segment, the time series data in the sliding window can include the time series data other than the head or tail of the reference segment, the starting point search segment, or the ending point search segment.
[0048] In step S40, the features of the time series data in the sliding window can include the variance, average value, derivative, slope, and range of the time series data in the sliding window, etc. In an exemplary embodiment of the present invention, the slope is used as the feature, but the present invention is not limited thereto.
[0049] Figure 4 Shows the slope of the time series data in the sliding window calculated when the sliding window moves in the reference segment. For example, as Figure 4 shown, when the sliding window includes the time series data -0.0342, -0.3674, -0.03769, -0.3232, -0.3421, these five time series data can be fitted into a straight line ( Figure 4 the dashed line in), so that the slope of the straight line can be obtained as 4.4181, and 4.4181 is used as the slope of the five time series data in the sliding window. Therefore, each time the sliding window moves, the slope of the time series data in the sliding window can be calculated. For example, when the sliding window moves in the Figure 4 shown reference segment, the calculated slopes can include 4.418, 5.996, 13.886, 5.0493, 7.5739, and -7.8895.
[0050] Figure 5 Shows the slope of the time series data in the sliding window calculated when the sliding window moves in the starting point search segment. Similarly, by fitting the time series data in the sliding window into a straight line, the slope of the fitted straight line is used as the slope of the time series data in the sliding window. For example, when the sliding window moves in the Figure 5 shown starting point search segment, the calculated slopes can include 112.35, 119.61, 436.13, and 788.32.
[0051] In step S40, calculate the slopes K1, K2, K3, …, K of the time series data in the sliding window each time the sliding window moves (S32) in the reference segment n, each calculated slope is used as a reference slope (S41). Calculate the slopes k1, k2, k3, …, k of the time series data in the sliding window each time the sliding window moves (S33) starting from the head of the starting point search segment m , and each calculated slope is used as a first comparison slope (S42).
[0052] According to step S50, it is necessary to determine the first target sliding window including the starting point in the time series data by comparing the reference slopes K1, K2, K3, …, K n and the first comparison slopes k1, k2, k3, …, k m .
[0053] Specifically, the characteristics of the reference slopes K1, K2, K3, …, K n can be extracted first, that is, determine the maximum value among the reference slopes K1, K2, K3, …, K n , that is, the maximum value K max = max(K1, K2, K3, …, K n ), and further calculate the average value of the reference slopes according to the reference slopes K1, K2, K3, …, K n , that is, the average value of the reference slopes Then, by comparing the maximum value K max among the reference slopes and the average value of the reference slopes with the first comparison slopes k1, k2, k3, …, k m to determine the first target sliding window.
[0054] Since the effective waveform starts with a significant jump process and the interference of jumping noise points needs to be excluded, the first target sliding window can be determined as the sliding window where the first comparison slope of the time series data is greater than twice the average value of the reference slopes and greater than the maximum value K max of the reference slopes. That is, among the first comparison slopes k1, k2, k3, …, k m , determine whether the first comparison slope is greater than twice the average value of the reference slopes for the first time and greater than the maximum value K max of the reference slopes (S51). When it is determined that the first comparison slope k m appears for the first time among the first comparison slopes k1, k2, k3, …, k x , such that k x satisfies the conditions: and k x > K max at this time (the "yes" of S51), then the first comparison slope k xThe corresponding sliding window is the first target sliding window. For example, Figure 3 the circular frame ③ in Figure 3 is the first target sliding window of the time series data shown. Any one of the five time series data included in the first target sliding window can be used as the starting point (S52).
[0055] In step S60, the change types of the time series data in the termination point search segment include the type of continuously decreasing after the peak point and the type of having a flat segment after the peak point, and the type of having a flat segment after the peak point further includes the type of slowly decreasing after the flat segment and the type of suddenly decreasing after the flat segment. Figures 6A to 6C shows the time series data of these three types of termination point search segments. Specifically, Figure 6A shows the type of continuously decreasing after the peak, as Figure 6A shown, the time series data gradually decreases after reaching the peak point. Figure 6B shows the type of having a flat segment after the peak point and suddenly decreasing after the flat segment, as Figure 6B shown, the time series data decreases to a stable stage after reaching the peak, and sharply decreases after maintaining for a period of time in the stable stage. Figure 6C shows the type of having a flat segment after the peak point and slowly decreasing after the flat segment, as Figure 6C shown, the time series data decreases to a stable stage after reaching the peak, and slowly decreases after maintaining for a period of time in the stable stage.
[0056] According to an embodiment of the present invention, the step of determining the change type of the time series data in the termination point search segment includes: determining whether the time series data in the termination point search segment is of the type of having a flat segment after the peak point (S61). Since the waveform change of the time series data with a flat segment is relatively gentle, the existence of the flat segment can be determined by this feature of the range.
[0057] Specifically, calculate the range of the time series data in the sliding window each time the sliding window moves from the head end of the termination point search segment. Specifically, the range refers to the absolute value of the difference between the maximum value and the minimum value of the time series data in the sliding window.
[0058] When each calculated range is continuously less than the first range threshold, it is determined that the time series data in the termination point search segment is of the type of having a flat segment after the peak point. When there is no case where each calculated range is continuously less than the first range threshold, that is, when it is determined that the time series data in the termination point search segment is not of the type of having a flat segment after the peak point (the "no" in S61), it is determined that the time series data in the termination point search segment is of the type of continuously decreasing after the peak point (S62).
[0059] For example, when the first range threshold is set to the first set value, as the sliding window moves in the L1 segment of Figure 6B and the L3 segment of Figure 6C , the range of the time series data in each calculated sliding window is less than the first set value, thereby determining that the time series data of the termination point search segments of Figure 6B and Figure 6C is of the type with a steady segment after the peak point. As the sliding window moves in the entire termination point search segment of Figure 6A , most of the ranges of the time series data in each calculated sliding window are greater than the first set value, and there is no case where the range of the time series data in each sliding window is less than the first set value when the sliding window moves in a certain segment, thereby determining that the time series data of the termination point search segment of Figure 6A is of the type with continuous decline after the peak point.
[0060] After determining that the time series data of the termination point search segment is of the type with a steady segment (Yes in S61), determine whether the time series data of the termination point search segment is of the type with a sharp decline after the steady segment (S63) or of the type with a gradual decline after the steady segment (S64). In this case, the sharp decline type or the gradual decline type can also be determined by this feature of the range.
[0061] After each calculated range continuously becomes less than the first range threshold, as the sliding window further moves, when at least one calculated range is greater than the second range threshold (which is greater than the first range threshold), determine that the time series data of the termination point search segment is of the type with a sharp decline after the steady segment (S63). When each calculated range is less than or equal to the second range threshold, determine that the time series data of the termination point search segment is of the type with a gradual decline after the steady segment (S64).
[0062] For example, when the second range threshold is set to the second set value, as the sliding window moves in the L2 segment of Figure 6B (which is after the L1 segment), the range of the time series data in at least one calculated sliding window is greater than the second set value, thereby determining that the time series data of the termination point search segment of Figure 6B is of the type with a sharp decline after the steady segment. As the sliding window moves in the L4 segment of Figure 6C (which is after the L2 segment), the range of the time series data in each calculated sliding window is less than or equal to the second set value, thereby determining that the time series data of the termination point search segment of Figure 6C is of the type with a gradual decline after the steady segment.
[0063] According to step S70, the second target sliding window in the time series data that includes the termination point depends on the change type of the time series data of the determined termination point search segment.
[0064] For time series data that continuously decreases after the peak point or time series data that has a steady segment after the peak point and slowly decreases after the steady segment, when the flatness of the waveform of the tail segment (i.e., the termination point search segment) of the time series data is consistent with the flatness of the waveform of the head segment (i.e., the reference segment), it can be considered that the termination point is reached. The flatness can be reflected by the feature of the slope.
[0065] Therefore, when it is determined that the time series data in the termination point search segment is of the type that continuously decreases after the peak point (S62), calculate the slopes z1, z2, z3,... of the time series data in the sliding window each time the sliding window moves starting from the head end of the termination point search segment. Take each calculated slope as the second comparison slope, and determine the second target sliding window as the sliding window when the second comparison slope of the time series data first lies within the average value of the reference slopes range.
[0066] That is, move the sliding window backward from the peak point (i.e., in the termination point search segment) (S34), calculate the slopes z1, z2, z3,... of the time series data in the sliding window, and take each calculated slope as the second comparison slope (S71). Compare the second comparison slopes z1, z2, z3,... with the average value of the reference slopes for comparison. Preferably, the average value of the reference slopes can be extended to the range of the average value of the reference slopes , and the range of the average value of the reference slopes is to where a is the first preset slope and b is the second preset slope.
[0067] Determine whether the second comparison slope first lies within the range of the average value of the reference slopes among the second comparison slopes z1, z2, z3,... (S72). When it is determined that the second comparison slope z x (1 ≤ x) that first appears among the second comparison slopes z1, z2, z3,... satisfies the condition: x when (S72's "yes"), then the sliding window corresponding to the second comparison slope z x is the second target sliding window. Any one of the five time series data included in the second target sliding window can be used as the termination point (S74).
[0068] Similarly, when it is determined that the time series data of the termination point search segment is of the type with a flat segment after the peak point and a gradual decline after the flat segment (S64), after each calculated range continuously becomes smaller than the first range threshold, as the sliding window further moves (S34), the slopes z1, z2, z3, … of the time series data in the sliding window are calculated each time the sliding window moves, and each calculated slope is used as the second comparison slope (S71). The second target sliding window is determined as the sliding window when the second comparison slope of the time series data first lies within the range of the average of the reference slopes (Yes in S72), thereby determining the termination point (S74).
[0069] For the time series data with a flat segment after the peak point and a sharp decline after the flat segment, the lowest point of the tail segment can be considered as the termination point. According to the slope of the time series data in the sliding window changing from negative to positive, the lowest point of the tail segment can be determined. The lowest point can also be reflected by this feature of the slope.
[0070] Therefore, when it is determined that the time series data of the termination point search segment is of the type with a flat segment after the peak point and a sharp decline after the flat segment (S63), similarly, after each calculated range continuously becomes smaller than the first range threshold, as the sliding window further moves (S34), the slopes z1, z2, z3, … of the time series data in the sliding window are calculated each time the sliding window moves, and each calculated slope is used as the second comparison slope (S71). The second target sliding window is determined as the sliding window when the second comparison slope of the time series data changes from negative to positive.
[0071] That is, it is determined whether the second comparison slope changes from negative to positive among the second comparison slopes z1, z2, z3, … (S73). When it is determined that the second comparison slope z x (1 ≤ x) such that z x satisfies the condition: z x > 0 and z x-1 < 0 (Yes in S73), then the sliding window corresponding to the second comparison slope z x is the second target sliding window, thereby determining the termination point (S74).
[0072] Thus, the starting point and the termination point are obtained according to the above method. The method for processing the time series data of the sensor of the needleless injection device may further include: after obtaining the starting point and the termination point, by calculating the difference between the time point where the starting point is located and the time point where the termination point is located, the injection time of the needleless injection device can be obtained.
[0073] In addition, by calculating the difference between the time point where the peak point is located and the time point where the starting point is located, the peak time of the needle-free injection device can be obtained. By calculating the product of the maximum value of the time series data (i.e., the ordinate value of the peak point after zeroing processing) and the conversion coefficient, the peak pressure of the needle-free injection device can be obtained.
[0074] When the time series data of the sensor for the needle-free injection device is of the type with a stable segment after the peak point, the stable segment time range can be determined according to the time point where the peak point is located and the time point where the termination point is located. Specifically, the stable segment time range can be from (X0 + D) to (X1 - E), where X0 is the time point where the peak point is located, X1 is the time point where the termination point is located, and D and E are reference times determined by the weight coefficient and the data length. By calculating the average value of the time series data in the stable segment time range and multiplying the calculated average value of the time series data in the stable segment time range by the conversion coefficient, the stable pressure of the needle-free injection device can be obtained.
[0075] Finally, the calculation results of the traversed data files are written into an excel file (S82) in sequence, output as a result document, and a dialog box is popped up to display the information of the starting point, termination point, and peak point found by the program on the original waveform, that is, visualization processing is performed (S83), and the calculation results are output in matrix form (S84) for easy viewing.
[0076] The processing method of the time series data of the sensor for the needle-free injection device according to the embodiments of the present invention can realize batch processing of the sensor signal (i.e., the time series data of the sensor), and finally, the target signals (such as the starting point, termination point, peak point, and stable segment, etc.) in the sensor signal can be extracted.
[0077] In addition, the present invention also provides a processing device for the time series data of the sensor for the needle-free injection device, which includes at least one data processor and at least one memory. The at least one memory stores instructions, and when the instructions are executed by the at least one data processor, the above-mentioned processing method of the time series data of the sensor for the needle-free injection device is executed.
[0078] The various embodiments of the present invention are not an exhaustive list of all possible combinations, but are intended to describe the representative aspects of the present invention, and the content described in the various embodiments can be applied independently or in combinations of two or more.
[0079] The description presented in the above exemplary embodiments is only for illustrating the technical solutions of the present invention, and is not intended to be exhaustive or to limit the present invention to the precise forms described. Obviously, many changes and variations are possible for those of ordinary skill in the art according to the above teachings. The selection of the exemplary embodiments and the description are for explaining the specific principles of the present invention and its practical applications, so that other technical personnel in the art can easily understand, implement and utilize various exemplary embodiments of the present invention and their various alternative forms and modified forms. The protection scope of the present invention is intended to be defined by the appended claims and their equivalent forms.
Claims
1. A method for processing time series data of a sensor for a needle-free injection device, comprising the following steps: Inputting the collected time series data of the sensor for the needle-free injection device and preprocessing the collected time series data; Determine the peak point from the preprocessed time series data, and determine the reference segment, the start point search segment and the end point search segment according to the peak point; Set the length of the sliding window and the length of each movement of the sliding window so that the sliding window moves at least in the reference segment, the starting point search segment and the end point search segment; Calculate the characteristics of the time series data in the sliding window each time the sliding window moves; By comparing the characteristics of the time series data in the sliding window of the reference segment with the characteristics of the time series data in the sliding window of the starting point search segment, a first target sliding window including the starting point in the time series data is determined in the starting point search segment; Determine the change type of the time series data of the end point search segment; According to the determined change type, the second target sliding window including the end point in the time series data is determined as: a sliding window in which the time series data in the sliding window of the end point search segment and the reference segment have the same characteristics or the characteristics of the time series data undergo a predetermined change; Among them, the step of determining the reference segment, the starting point search segment and the ending point search segment according to the peak point includes: according to the time point where the peak point is located as X0, determining that the time range of the reference segment is (X0-X) to (X0-X+A), the time range of the starting point search segment is (X0-Y) to (X0-Y+B), and the time range of the ending point search segment is (X0+Z) to (X0+Z+C), and making (X0-X)<(X0-X+A)<(X0-Y)<(X0-Y+B)<X0<(X0+Z)<(X0+Z+C), wherein X, Y, Z, A, B and C are reference times determined by weight coefficients and data lengths.
2. The method for processing time series data of a sensor for a needle-free injection device according to claim 1, wherein: The step of determining the first target sliding window includes: Calculate the slope of the time series data in the sliding window each time the sliding window moves in the reference segment, use each calculated slope as a reference slope, determine the maximum value among the reference slopes, and further calculate the average value of the reference slopes based on the reference slopes; Calculate the slope of the time series data in the sliding window each time the sliding window moves from the beginning of the starting point search segment, and use each calculated slope as the first comparison slope; The first target sliding window is determined as a sliding window in which the first comparison slope of the time series data is greater than twice the average value of the reference slope and greater than the maximum value among the reference slopes for the first time.
3. The method for processing time series data of a sensor for a needle-free injection device according to claim 2, wherein: The steps for determining the change type of the time series data of the end point search segment include: Determine whether the time series data of the end point search segment is of the type with a stable segment after the peak point; After determining that the time series data of the termination point search segment is of the type with a plateau after a peak point, determine whether the time series data of the termination point search segment is of the type with a sudden drop after the plateau or of the type with a gradual drop after the plateau.
4. The method for processing time series data of a sensor for a needle-free injection device according to claim 3, wherein: The steps of determining whether the time series data of the end point search segment is a type having a stable segment after a peak point include: Calculate the range of the time series data in the sliding window each time the sliding window moves from the beginning of the end point search segment; When each calculated range is continuously smaller than the first range threshold, it is determined that the time series data of the end point search segment is a type having a stable segment after the peak point; When there is no situation where each of the calculated extreme differences is continuously smaller than the first extreme difference threshold, it is determined that the time series data of the termination point search segment is of a type that continuously decreases after the peak point.
5. The method for processing time series data of a sensor for a needle-free injection device according to claim 4, wherein: The steps of determining whether the time series data of the end point search segment is of the type of sudden drop after a stable segment or of the type of gradual drop after a stable segment include: After each calculated range is continuously smaller than the first range threshold, as the sliding window moves further, when at least one calculated range is larger than the second range threshold, it is determined that the time series data of the end point search segment is a type of sudden drop after a stable segment; When each calculated range is less than or equal to the second range threshold, it is determined that the time series data of the termination point search segment is a type of slowly decreasing after a stable segment, and the second range threshold is greater than the first range threshold.
6. The method for processing time series data of a sensor for a needle-free injection device according to claim 5, wherein: The step of determining the second target sliding window includes: When it is determined that the time series data of the termination point search segment is of the type that continues to decline after the peak point, the slope of the time series data in the sliding window is calculated each time the sliding window moves from the beginning of the termination point search segment, and each calculated slope is used as the second comparison slope. The second target sliding window is determined as the sliding window in which the second comparison slope of the time series data is within the range of the average value of the reference slope for the first time.
7. The method for processing time series data of a sensor for a needle-free injection device according to claim 5, wherein: The step of determining the second target sliding window includes: When it is determined that the time series data of the termination point search segment is of the type that has a plateau after a peak point and a slow decline after the plateau, after each calculated range is continuously less than the first range threshold, as the sliding window moves further, the slope of the time series data in the sliding window is calculated each time the sliding window moves, and each calculated slope is used as the second comparison slope. The second target sliding window is determined as the sliding window in which the second comparison slope of the time series data is within the range of the average value of the reference slope for the first time.
8. The method for processing time series data of a sensor for a needle-free injection device according to claim 5, wherein: The step of determining the second target sliding window includes: When it is determined that the time series data of the termination point search segment is of the type that has a plateau after a peak point and a sharp drop after the plateau, after each calculated range is continuously less than the first range threshold, as the sliding window moves further, the slope of the time series data in the sliding window is calculated each time the sliding window moves, and each calculated slope is used as the second comparison slope. The second target sliding window is determined as a sliding window in which the second comparison slope of the time series data changes from a negative number to a positive number.
9. The method for processing time series data of a sensor for a needle-free injection device according to claim 1, further comprising: After determining the reference segment according to the peak point and before determining the start point search segment and the end point search segment according to the peak point, all time series data are reset to zero, and the steps of the reset to zero include: Calculate the average value of the time series data for the benchmark period; The calculated average value of the time series data of the reference segment is subtracted from all the time series data to obtain the time series data after zeroing.
10. The method for processing time series data of a sensor for a needle-free injection device according to claim 1, wherein: The steps for preprocessing the collected time series data include: The trend is eliminated by a linear method, the waveform after the trend is eliminated is subjected to FIR filtering, and smoothed by a robust linear regression method.
11. The method for processing time series data of a sensor for a needle-free injection device according to claim 1, wherein: The characteristics of the time series data in the sliding window include at least the variance, mean, derivative, slope and range of the time series data in the sliding window.
12. The method for processing time series data of a sensor for a needle-free injection device according to claim 1, further comprising: After the start point and the end point are obtained, the injection time of the needle-free injection device is obtained by calculating the difference between the time corresponding to the start point and the time corresponding to the end point.
13. A device for processing time series data of a sensor for a needle-free injection device, comprising: at least one data processor; as well as At least one memory storing instructions, which, when executed by the at least one data processor, enable execution of the method for processing time series data of a sensor for a needle-free injection device according to any one of claims 1 to 12.
Citation Information
Patent Citations
Nanopore via event detection method and device, electronic equipment and storage medium
CN116908242A