A signal processing method, apparatus and electronic device
By calculating and updating the alignment position in real time during the sensor signal acquisition process, the problem of multi-sensor signal alignment delay is solved, enabling real-time signal alignment and result prediction during the experiment, thus improving experimental efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SAIC GM WULING AUTOMOBILE CO LTD
- Filing Date
- 2023-09-15
- Publication Date
- 2026-07-28
AI Technical Summary
In existing technologies, multiple sensor signals can only be aligned after all data acquisition is completed, making it difficult to predict experimental results during the experiment and affecting the experimental progress.
During the sensor signal acquisition process, sensor signals are periodically acquired, and the alignment position between signals is calculated and updated in real time to achieve signal alignment.
This technology enables real-time alignment of multiple sensor signals during data acquisition, improving experimental efficiency and allowing for prediction of experimental results during the experiment, thus avoiding the delay of signal alignment only after the experiment is completed.
Smart Images

Figure CN117235543B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of signal processing technology, and more specifically to a signal processing method, apparatus, and electronic device. Background Technology
[0002] Currently, many data measurement methods rely on asynchronous acquisition from multiple sensors, meaning multiple sensors simultaneously collect data from various aspects of an experimental process. This method can improve data acquisition efficiency and reduce data transmission latency, but it requires solving the data alignment problem. Because the signals acquired by the sensors are discrete data, even if the sampling frequency is the same, the signals acquired by multiple sensors are not in a unified time domain and lack a common time reference. This necessitates aligning the signals from multiple sensors. In related technologies, signal alignment methods align multiple signals by calculating similarity functions.
[0003] However, the current method of using similarity functions to process signal data is a post-processing method, which can only be performed after all the collected data is obtained after the experiment. This method cannot obtain the aligned sensor curves during the experiment, making it difficult to predict the experimental results during the experiment, which in turn can easily affect the progress of the experiment. Summary of the Invention
[0004] In view of this, this application provides a signal processing method, apparatus, and electronic device to help solve the problem in the prior art that signals from multiple sensors can only be aligned after all acquisitions are completed.
[0005] In a first aspect, embodiments of this application provide a signal processing method, comprising the following steps:
[0006] During the process of sensor signal acquisition, target signals from at least two sensors are periodically acquired.
[0007] Based on the target signals acquired by the sensor during the current sampling period, calculate the first alignment position between the target signals;
[0008] Based on the first alignment position and the target alignment position determined within the first sampling period, determine whether to update the target alignment position; wherein, the first sampling period is the sampling period prior to the current sampling period;
[0009] If the target alignment position is determined to be updated, the first alignment position is updated to the target alignment position, and at least a portion of the signals acquired by the sensors are aligned at the updated target alignment position; the signals acquired by at least a portion of the sensors include the target signal.
[0010] In one possible implementation, periodically acquiring the target signal collected by at least two sensors includes: for the current sampling period, acquiring a first signal located within a first time period corresponding to the current sampling period from the signals already collected by at least two sensors, and using the first signal as the target signal collected by at least two sensors within the current sampling period; the first time period is the duration of the signal used to calculate the alignment position.
[0011] In one possible implementation, the first moment includes the start time of the current sampling period, and the second moment includes the end time of the current sampling period.
[0012] In one possible implementation, the first time period is a time period that starts at the third time point and ends at the fourth time point, where the third time point is earlier than the current sampling period and the fourth time point is within the current sampling period.
[0013] In one possible implementation, calculating the first alignment position between target signals based on the target signals acquired by the sensor during the current sampling period includes:
[0014] Based on the target signal acquired by the sensor in the current sampling period, the similarity of the target signal at multiple alignment positions is calculated, and the alignment position with the highest similarity among the target signals is determined as the first alignment position.
[0015] In one possible implementation, determining whether to update the target alignment position based on the first alignment position and the target alignment position determined within the first sampling period includes:
[0016] Obtain the similarity of at least two signals at the first alignment position, and obtain the similarity of at least two signals at the target alignment position determined within the first sampling period;
[0017] If the similarity at the first alignment position is greater than the similarity at the target alignment position, then the target alignment position is updated.
[0018] In one possible implementation, if the similarity at the first alignment position is less than or equal to the similarity at the target alignment position, then it is determined not to update the target alignment position.
[0019] In one possible implementation, the method further includes, if it is determined that the target alignment position should not be updated, then at least two signals remain aligned at the current target alignment position.
[0020] Secondly, embodiments of this application provide a signal processing apparatus, comprising:
[0021] The acquisition unit is used to periodically acquire target signals acquired by at least two sensors during the process of sensor signal acquisition;
[0022] The alignment unit is used to calculate the first alignment position between target signals based on the target signals acquired by the sensor in the current sampling period.
[0023] The comparison unit is used to determine whether to update the target alignment position based on the first alignment position and the target alignment position determined within the first sampling period; wherein the first sampling period is the sampling period before the current sampling period;
[0024] An optimization unit is configured to, if it is determined that the target alignment position needs to be updated, update the current alignment position to the target alignment position and align at least the signals acquired by the sensors at the updated target alignment position; the signals acquired by the sensors include the target signal.
[0025] Thirdly, embodiments of this application provide an electronic device, including a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method described in the first aspect.
[0026] Fourthly, embodiments of this application provide a computer-readable storage medium including a stored program, wherein the program, when running, controls the device where the computer-readable storage medium is located to execute the method described in the first aspect.
[0027] The scheme provided in this application calculates the first alignment position within the current sampling period, and determines whether to update the target alignment position based on the first alignment position and the target alignment position determined in the first sampling period. This allows for the alignment of target signals acquired by multiple sensors during data acquisition, without waiting for the measurement to end. Furthermore, as the measurement progresses, the alignment positions between the target signals are continuously updated, eliminating the need to wait for the experiment to end before signal processing can begin. This allows for the prediction of experimental results during the experiment, ensuring its smooth operation. Attached Figure Description
[0028] To more clearly illustrate the technical solutions of the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 This is a schematic diagram of a signal processing method provided in an embodiment of this application;
[0030] Figure 2 A schematic diagram of a first time period provided in an embodiment of this application;
[0031] Figure 3 A schematic diagram of a first time period provided in an embodiment of this application;
[0032] Figure 4 A schematic diagram of a first time period provided in an embodiment of this application;
[0033] Figure 5 This is a schematic diagram illustrating a method for determining whether to update the target alignment position, provided in an embodiment of this application.
[0034] Figure 6 This is a schematic diagram of a signal processing method provided in an embodiment of this application;
[0035] Figure 7 This application provides a schematic diagram of an exemplary method for testing road emissions gases in an embodiment of the present application.
[0036] Figure 8 for Figure 7 The diagram shows two misaligned exhaust emission signals in a road emission gas test experiment.
[0037] Figure 9 This is a schematic diagram of a signal processing apparatus provided in an embodiment of this application;
[0038] Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0039] To better understand the technical solution of this application, the embodiments of this application will be described in detail below with reference to the accompanying drawings.
[0040] It should be understood that the described embodiments are merely some, not all, of the embodiments in this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0041] The terminology used in the embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. The singular forms “a,” “the,” and “the” used in the embodiments of this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.
[0042] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, or B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.
[0043] In related technologies, when multiple sensors simultaneously collect data from various aspects of an experimental process, it is necessary to solve the alignment problem between the signals collected by the multiple sensors. Currently, related technologies achieve signal alignment by calculating similarity functions between multiple signals. However, the current method of processing signals using similarity functions is a post-processing method, meaning it can only be performed after all the collected signals are obtained after the experiment. This method cannot obtain the aligned sensor curves during the experiment, making it difficult to predict the experimental results and potentially affecting the experimental progress.
[0044] To address the aforementioned issues, this application provides a signal processing method that calculates a first alignment position within the current sampling period and determines whether to update the target alignment position based on the first alignment position and the target alignment position determined in the first sampling period. This allows for the alignment of target signals acquired by multiple sensors during data acquisition, eliminating the need to wait for the measurement to complete. Furthermore, as the sensors acquire signals, the alignment positions between the target signals iterate continuously, resulting in increasingly higher accuracy. This eliminates the need to wait for the experiment to end before signal processing can begin, allowing for prediction of experimental results during the experiment and ensuring its smooth operation. A detailed description follows.
[0045] See Figure 1 This is a schematic diagram of a signal processing method provided in an embodiment of this application. Figure 1 As shown, the signal processing method includes the following steps:
[0046] Step S101: During the process of sensor signal acquisition, periodically acquire target signals acquired by at least two sensors.
[0047] In other words, during the process of acquiring signals from at least two sensors, the target signals are periodically acquired from at least two sensors without waiting for the sensors to acquire all the signals. This allows for alignment of the target signals during the signal acquisition process, enabling the prediction of experimental results during the experiment, thus facilitating the smooth progress of the experiment and improving experimental efficiency.
[0048] In some embodiments, among the target signals collected by at least two sensors, one is a reference signal, and the remaining signals are other signals. The signal processing method in this embodiment can align the other signals with the reference signal respectively. For example, when there are n+1 sensors, the signal data of one sensor is taken as the reference signal, and the signal data of the remaining sensors are called remaining signal 1, remaining signal 2, ..., remaining signal n, etc. In this way, the reference signal can be unchanged during the signal alignment process. The relative position deviation between each remaining signal and the reference signal is calculated, and the signal alignment is completed based on the deviation.
[0049] In some embodiments, a reference signal can be randomly selected from the target signals collected by at least two sensors, or a reference signal can be specified by the experimenter, or the reference signal can be determined according to preset rules, such as preset priority for the target signal.
[0050] In step S101, periodically acquiring the target signal collected by at least two sensors includes: for the current sampling period, acquiring the first signal located in the first time period corresponding to the current sampling period from the signals already collected by at least two sensors, and using the first signal as the target signal collected by at least two sensors in the current sampling period; the first time period is the duration of the signal used to calculate the alignment position.
[0051] That is, since the alignment position can be calculated from the signals collected by at least two sensors for any time period, the first signal collected in the first time period can be obtained in the current sampling period, and the first signal can be used as the target signal collected by at least two sensors in the current sampling period, so as to determine the signal that can be used to calculate the alignment position, and thus facilitate the subsequent calculation of the alignment position using the first signal as the target signal.
[0052] In some embodiments, the first time period can be a time period of equal length, for example, a time period of fixed length is preset. The first time period can also be a time period of varying lengths. For example, when a large extreme value is found within the current sampling period, the first time period can be relatively long to avoid interference from the large extreme value in signal processing. It should be noted that when the first time period is a time period of equal length, the computational load is usually smaller; when the first time period is a time period of varying lengths, the calculated alignment position may be more accurate.
[0053] In some embodiments, obtaining the first signal located within the first time period corresponding to the current sampling period includes: obtaining the two endpoint times of the first time period corresponding to the current sampling period, determining the first time period based on the two endpoint times, and obtaining the first signal within the first time period.
[0054] The following examples illustrate the first time period under different circumstances:
[0055] In some embodiments, such as Figure 2 As shown, the first time period is the time period that starts at the first moment and ends at the second moment. Both the first moment and the second moment are within the current sampling period.
[0056] That is, the first time period is the time period within the current sampling period, and the first signal is the part of the newly added signal collected within the current sampling period. In this way, the first signal can be directly determined from the newly added signal within the current sampling period, with a small amount of computation.
[0057] In some embodiments, the first moment and the second moment are relatively fixed times within the current sampling period. For example, the first moment is defined as the quarter-th moment within the current sampling period. That is, when the current sampling period is 0-10s, the first moment is the 2.5s moment, and when the current sampling period is 10-20s, the first moment is the 12.5s moment.
[0058] In some embodiments, the first time point / second time point can be determined based on the second time point / first time point and the duration of the first time period, and the duration of the first time period is less than the duration of the current sampling period. For example, if the first time point is 2.5s and the duration of the first time period is 5s, then the second time point is 7.5s.
[0059] In some embodiments, the first time and the second time are relatively variable times within the current sampling period. For example, the first time period and / or the first time and the second time are determined within the current sampling period.
[0060] In some embodiments, such as Figure 3 As shown, the first moment includes the start time of the current sampling period, and the second moment includes the end time of the current sampling period.
[0061] That is, the first time period is the same as the current sampling period, and the first signal is all the target signals collected in the current sampling period. In this way, the newly added signal in the current sampling period can be directly used as the first signal. Moreover, the first time and the second time are fixed relative to the current sampling period, and there is no need to add extra steps to determine the first time and the second time, which further reduces the amount of calculation.
[0062] In some embodiments, obtaining the first signal located within the first time period corresponding to the current sampling period includes: obtaining the two endpoint times of the current sampling period, determining the first time period based on the two endpoint times, and obtaining the first signal within the first time period.
[0063] In some embodiments, such as Figure 4 As shown, the first time period is the period that starts at the third time and ends at the fourth time. The third time is earlier than the current sampling period, and the fourth time is within the current sampling period.
[0064] That is, the first time period includes at least a portion of the time period within the current sampling period and at least a portion of the time period before the current sampling period, and the first signal includes at least a portion of the signal before the current sampling period and at least a portion of the signal within the current sampling period. In this way, the length of the signal interval used to calculate the alignment position can be increased, and the risk of inaccurate alignment position calculation due to the influence of large extreme values within the current sampling period can be reduced, so as to better predict the experimental results.
[0065] In some embodiments, the third time and the fourth time are fixed times relative to the current sampling period. For example, the third time is defined as the time 3 seconds before the current sampling period. When the current sampling period is 10-20 seconds, the third time is the 7th second. When the current sampling period is 20-30 seconds, the third time is the 17th second.
[0066] In some embodiments, the third moment is a time that is not fixed relative to the current sampling period before the current sampling period, and the fourth moment is a time that is not fixed relative to the current sampling period. For example, the third moment is determined from the start time of the initial sampling period to the start time of the current sampling period, and the fourth moment is determined from the current sampling period.
[0067] In some embodiments, the current sampling period may only acquire newly added signals, and the first signal is obtained by superimposing the acquired signals saved in one or more first sampling periods with the newly added signals in the current sampling period.
[0068] In some embodiments, the third moment includes the start time of the initial sampling period.
[0069] That is, the first time period includes at least a portion of the current sampling period and all time periods before the current sampling period, and the first signal includes at least a portion of the signal in the current sampling period and all signals before the current sampling period. In this way, the signal length used to calculate the alignment position can be increased, reducing the risk of inaccurate alignment position calculation due to the influence of large extreme values in the current sampling period, so as to better predict the experimental results.
[0070] It should be noted that when the third moment includes the start time of the initial sampling period, the duration of the first time period is not fixed. That is, the later the current sampling period, the longer the duration of the first time period.
[0071] In some embodiments, the fourth moment is a relatively fixed time within the current sampling period. For example, the fourth moment is defined as the quarter-th moment within the current sampling period. When the current sampling period is 10-20s, the fourth moment is the 12.5s, and the duration of the first time period is 12.5s.
[0072] In some embodiments, the fourth moment is a relatively variable moment within the current sampling period. For example, the fourth moment can be determined within the current sampling period. Furthermore, if there are many large extreme values at the beginning of the current sampling period, the fourth moment can be determined at the end of the current sampling period to avoid large extreme values having a significant impact on signal processing.
[0073] In some embodiments, the current sampling period may only acquire newly added signals, and the first signal is obtained by superimposing the signals acquired before the current sampling period with the newly added signals in the current sampling period.
[0074] In some embodiments, the fourth moment includes the end time of the current sampling period.
[0075] That is, the first time period includes the entire time period of the current sampling period and at least a portion of the time period before the current sampling period, and the first signal includes the entire signal of the current sampling period and at least a portion of the signal before the current sampling period. In this way, the signal length used to calculate the alignment position can be increased, reducing the risk of inaccurate alignment position calculation due to the influence of large extreme values within the current sampling period, so as to better predict the experimental results.
[0076] In some embodiments, the third moment is a time that is relatively fixed before the current sampling period. For example, the third moment is defined as 4 seconds before the current sampling period. For example, when the current sampling period is 10-20 seconds, the third moment is the 6th second.
[0077] In some embodiments, the third time point can be determined based on the fourth time point and the duration of the first time period, and the duration of the first time period is longer than the duration of the current sampling period. For example, if the duration of the first time period is 14 seconds, the third time point is the 6th second when the current sampling period is 10-20 seconds.
[0078] In some embodiments, the third moment is a relatively variable time before the current sampling period, for example, the third moment is determined from the start time of the initial sampling period to the start time of the current sampling period.
[0079] In some embodiments, the current sampling period may only acquire newly added signals, and the saved acquired signals are superimposed with the newly added signals in the current sampling period to obtain the first signal.
[0080] In some embodiments, the third time point includes the start time of the initial sampling period, and the fourth time point includes the end time of the current sampling period.
[0081] That is, the first time period includes the entire time period of the current sampling period and all time periods before the current sampling period, and the first signal includes all signals of the current sampling period and all signals before the current sampling period. In this way, the signal length used to calculate the alignment position can be increased to the greatest extent, and the risk of inaccurate alignment position calculation due to the influence of large extreme values in the current sampling period can be reduced to the greatest extent, so as to better predict the experimental results.
[0082] It should be noted that when the third moment includes the start time of the initial sampling period and the fourth moment includes the end time of the current sampling period, the duration of the first time period is not fixed. That is, the later the current sampling period is, the longer the duration of the first time period is.
[0083] It should also be noted that the meaning of the first time period can be different within multiple sampling periods. For example, in the time period of the acquired signal, the first time period at the beginning is the period with the third time as the start time and the fourth time as the end time. The third time includes the start time of the initial sampling period, and the fourth time is within the current sampling period, in order to improve the accuracy of the alignment position calculation. The first time period at the end is the period with the first time as the start time and the second time as the end time. The first time includes the start time of the current sampling period, and the second time includes the end time of the current sampling period, in order to reduce the amount of calculation.
[0084] It should also be noted that the above are just some examples of possible first time periods, and are not exhaustive. In fact, any time period that can be used to calculate the alignment position can be used as the first time period in the embodiments of this application.
[0085] Step S102: Calculate the first alignment position between target signals based on the target signals acquired by the sensor during the current sampling period.
[0086] That is, based on the target signal acquired by the sensor in step S101, the first alignment position between the target signals can be calculated. The first alignment position can be used in subsequent steps to compare with the target alignment position before the current sampling period to determine whether to update the target alignment position.
[0087] In embodiments of this application, the first alignment position between targets can be calculated by combining similarity. For example, in step S102, calculating the first alignment position between target signals based on the target signals acquired by the sensor in the current sampling period includes:
[0088] Based on the target signal acquired by the sensor in the current sampling period, the similarity of the target signal at multiple alignment positions is calculated, and the alignment position with the highest similarity among the target signals is determined as the first alignment position.
[0089] That is, since the similarity of the target signals at the alignment position can determine the accuracy of the signal alignment position of the target signals acquired by at least two sensors, the alignment position with the highest similarity among multiple alignment positions is determined as the first alignment position. Thus, the first alignment position can be identified as the alignment position with the highest accuracy among multiple alignment positions of the target signals acquired by the sensors in the current sampling period.
[0090] In some embodiments, calculating the similarity of the target signals at multiple alignment positions includes: calculating the similarity of the target signals at multiple alignment positions based on a similarity function between the target signals, a first time period, etc.
[0091] In some embodiments, calculating the similarity of the target signals at multiple alignment positions and determining the alignment position with the highest similarity among the target signals as the first alignment position includes: defining the similarity function between the target signal f(t) and the target signal g(t) as:
[0092]
[0093] Where f(t) and g(t) are both target signals, k is the first time interval, and t0 is the end time of the first time interval. Similarity function S n (τ) represents the similarity of the signals acquired by the two sensors during the first time period k. When aligning signals, max(S) is selected. n The relative position τ of (τ) is used as a reference to align the two target signals.
[0094] This involves calculating the similarity function between target signals, using the alignment position as a variable and the similarity as a dependent variable to obtain the similarity function curve. Multiple alignment positions can be obtained from the horizontal axis, and the similarity value can be obtained from the vertical axis corresponding to the multiple alignment positions. The maximum similarity is determined from the multiple similarity values, and the first alignment position is determined from the horizontal axis corresponding to the maximum similarity. Specifically, the first alignment position can be determined from the maximum value of the similarity function curve.
[0095] It should be noted that, as mentioned above, the alignment position can be the time of signal acquisition, for example, time t+τ is the alignment position.
[0096] In some embodiments, calculating the similarity of the target signal at multiple alignment positions includes: normalizing the target signal and calculating the similarity of the normalized target signal at multiple positions. For example, the similarity function between target signal f(t) and target signal g(t) is defined as:
[0097]
[0098] Where f(t) and g(t) are both target signals, k is the first time interval, and t0 is the end time of the first time interval. Similarity function S n (τ) represents the similarity of the signals collected by the two sensors during the first time period k. Thus, normalizing the target signal can reduce the inaccuracy in the alignment position calculation caused by extreme values. In other words, normalizing the target signal can reduce the influence of large extreme values, thereby improving the accuracy of the first alignment position calculation.
[0099] In some embodiments, when there are multiple sensors, the signal collected by one of the sensors can be used as a reference signal. For example, the reference signal can be defined as the target signal f(t), and the remaining signals can be defined as target signals g(t). The similarity function between the reference signal and each of the remaining signals is calculated, and max(S) is selected when aligning the signals. n Using the relative position τ of (τ) as a reference, multiple target signals are aligned.
[0100] Step S103: Based on the first alignment position and the target alignment position determined within the first sampling period, determine whether to update the target alignment position; wherein, the first sampling period is the sampling period before the current sampling period.
[0101] That is, since the target signal used to determine the target alignment position in the first sampling period is different from the target signal used to determine the first alignment position in the current sampling period, the target alignment position determined in the first sampling period is usually different from the target alignment position determined in the current sampling period. Therefore, there is usually a more accurate alignment position between the first alignment position and the target alignment position determined in the first sampling period. The target alignment position can be updated based on the accuracy between the two.
[0102] It should be noted that the target signal used to determine the target alignment position in the first sampling period can be the same length or different length from the target signal used to determine the first alignment position in the current period. The length of the target signal used to determine the alignment position depends on the length of the first time period in step S101. That is, the longer the first time period, the longer the corresponding first signal, which in turn means the longer the corresponding target signal.
[0103] In some embodiments, the first sampling period is the previous sampling period of the current sampling period. In this way, a more accurate target alignment position can be compared within every two adjacent sampling periods, which can improve the accuracy of target alignment position iteration.
[0104] As mentioned earlier, the first alignment position can be calculated by combining similarity within the current period. Clearly, the target alignment position can also be calculated by combining similarity within the first sampling period. Therefore, the accuracy of the first alignment position and the target alignment position within the first sampling period can be judged by combining similarity. For example, ... Figure 5 As shown, in step S103, determining whether to update the target alignment position based on the first alignment position and the target alignment position determined within the first sampling period includes:
[0105] S131: Obtain the similarity of at least two target signals at the first alignment position, and obtain the similarity of at least two target signals at the target alignment position determined within the first sampling period; determine whether the similarity at the first alignment position is greater than the similarity at the target alignment position. If yes, proceed to step S132a; if no, proceed to step S132b.
[0106] S132a: If the similarity at the first alignment position is greater than the similarity at the target alignment position, then determine to update the target alignment position.
[0107] That is, since the greater the similarity, the more accurate the alignment position between the signals, if the similarity of the target signal at the first alignment position is greater than that at the target alignment position, it means that the first alignment position is more accurate than the target alignment position. Therefore, the target alignment position is updated. In this way, a more accurate target alignment position can be determined in the current period, so that the alignment position between the target signals becomes more accurate as the current sampling period progresses, thus better predicting the experimental results.
[0108] S132b: If the similarity at the first alignment position is less than or equal to the similarity at the target alignment position, then the target alignment position is not updated.
[0109] That is, since the greater the similarity, the more accurate the alignment position between the signals, if the similarity of the target signal at the first alignment position is greater than that at the target alignment position, it means that the target alignment position is more accurate than the first alignment position. Therefore, it is determined not to update the target alignment position. In this way, a more accurate target alignment position can be determined in the current period, so that the alignment position between the target signals becomes more accurate as the current sampling period progresses, thus better predicting the experimental results.
[0110] In some embodiments, the similarity calculation method for at least two target signals at the first alignment position is the same as the similarity calculation method for at least two target signals at the target alignment position in the first sampling period, so as to further reduce the error in the similarity comparison between target signals.
[0111] Step S104: If it is determined that the target alignment position needs to be updated, the first alignment position is updated to the target alignment position, and at least some of the signals acquired by the sensors are aligned at the updated target alignment position; the signals acquired by at least some of the sensors include the target signal.
[0112] In other words, if the target alignment position is determined to be updated, it means that the first alignment position is more accurate than the current target alignment position. Updating the first alignment position to the target alignment position can obtain a more accurate aligned signal, thereby more accurately predicting the experimental results.
[0113] In some embodiments, aligning at least a portion of the signals acquired by the sensors at the updated target alignment position includes: shifting at least a portion of the signals acquired by the sensors to the updated target position.
[0114] In some embodiments, among the target signals acquired by at least two sensors, one is a reference signal and the remaining signals are other signals. Aligning at least some of the signals acquired by the sensors at the updated target alignment position includes: keeping the reference signal at its original position and shifting the other signals to the updated target position.
[0115] See Figure 6 This is a schematic diagram of a signal processing method provided in an embodiment of this application. Figure 6 As shown, the signal processing method includes the following steps:
[0116] Step S201: During the process of sensor signal acquisition, periodically acquire the target signals acquired by at least two sensors.
[0117] For details, please refer to step S101, which will not be repeated here.
[0118] Step S202: Based on the target signal acquired by the sensor in the current sampling period, calculate the first alignment position between the target signals, and determine whether the current period is the first sampling period. If yes, proceed to step S203a; otherwise, proceed to step S203b.
[0119] For details on the remaining content, please refer to step S102, which will not be repeated here.
[0120] Step S203a: If the current sampling period is the first sampling period, then the first alignment position is taken as the target alignment position.
[0121] In other words, if the current sampling period is the first sampling period, then there is no corresponding first sampling period in the current period, and therefore it is impossible to compare the alignment accuracy of the two alignment positions. So, the first alignment position can be directly used as the target alignment position. If the current sampling period is the first sampling period, then the next sampling period is obviously no longer the first sampling period. In the next sampling period, the two alignment positions are compared again to obtain the target alignment position for the next period.
[0122] It should be noted that if step S203a is executed, there is no need to perform subsequent steps. In the next sampling period, step S201 will be executed again.
[0123] Step S203b: If the current sampling period is not the first sampling period, then based on the first alignment position and the target alignment position determined within the first sampling period, determine whether to update the target alignment position. If yes, then execute step S204a; otherwise, execute step S204b. Wherein, the first sampling period is the sampling period before the current sampling period.
[0124] That is, if the current sampling period is not the first sampling period, then the current period obviously has a corresponding first sampling period. As mentioned above, by comparing the first alignment position with the target position determined by the first sampling period, a more accurate target alignment position can be determined.
[0125] For details on the remaining content, please refer to step S102, which will not be repeated here.
[0126] Step S204a: If it is determined that the target alignment position needs to be updated, the current alignment position is updated to the target alignment position, and at least the signals acquired by the sensor are aligned at the updated target alignment position; the signals acquired by the sensor include the target signal.
[0127] For details, please refer to step S104, which will not be repeated here.
[0128] In step S204b, if it is determined that the target alignment position will not be updated, then at least two signals remain aligned at the current target alignment position.
[0129] In other words, if it is determined not to update the target alignment position, it means that the current target alignment position is more accurate than the first alignment position. Maintaining the current target alignment position can obtain a more accurate aligned signal, thereby more accurately predicting the experimental results.
[0130] See Figure 7 This is a schematic diagram illustrating an exemplary method for testing road emissions gases according to an embodiment of this application. Figure 7 As shown, the method for road emission gas testing includes the following steps:
[0131] Step S701: Periodically acquire exhaust emission signals using the engine ECU sensor and the vehicle exhaust emission sensor, and obtain the following... Figure 8 The two misaligned exhaust emission signals shown are from an engine ECU sensor and a vehicle exhaust emission sensor that operate independently.
[0132] Step S702: Based on the exhaust emission signals acquired by the engine ECU sensor and the vehicle exhaust emission sensor in the current sampling period, calculate the first alignment position between the exhaust emission signals.
[0133] Step S703: Based on the first alignment position and the target alignment position determined within the first sampling period, determine whether to update the target alignment position; wherein, the first sampling period is the sampling period prior to the current sampling period.
[0134] Step S704: If it is determined that the target alignment position needs to be updated, the current alignment position is updated to the target alignment position, and the signals collected by the vehicle exhaust sensor are aligned at the updated target alignment position.
[0135] Figure 9 This is a schematic diagram of a signal processing apparatus provided in an embodiment of this application. This apparatus can serve as a specific device to implement the signal processing method provided in the embodiments of this invention, such as... Figure 9 As shown, the device includes:
[0136] The acquisition unit 901 is used to periodically acquire target signals acquired by at least two sensors during the process of sensor signal acquisition;
[0137] Alignment unit 902 is used to calculate the first alignment position between target signals based on the target signals acquired by the sensor in the current sampling period;
[0138] The comparison unit 903 is used to determine whether to update the target alignment position based on the first alignment position and the target alignment position determined within the first sampling period; wherein the first sampling period is the sampling period before the current sampling period;
[0139] The optimization unit 904 is configured to, if it is determined that the target alignment position needs to be updated, update the current alignment position to the target alignment position and align at least the signals acquired by the sensor at the updated target alignment position; the signals acquired by the sensor include the target signal.
[0140] The acquisition unit 901 is further configured to, for the current sampling period, acquire a first signal located within a first time period corresponding to the current sampling period from the signals acquired by the at least two sensors, and use the first signal as the target signal acquired by the at least two sensors within the current sampling period; the first time period is the duration of the signal used to calculate the alignment position.
[0141] Alignment unit 902 is also used to calculate the similarity of the target signal at multiple alignment positions based on the target signal acquired by the sensor in the current sampling period, and determine the alignment position with the maximum similarity among the target signals as the first alignment position.
[0142] The comparison unit 903 is also used to obtain the similarity of at least two target signals at the first alignment position, and to obtain the similarity of at least two target signals at the target alignment position determined in the first sampling period; if the similarity at the first alignment position is greater than the similarity at the target alignment position, then the target alignment position is determined to be updated.
[0143] The comparison unit 903 is further configured to determine that the target alignment position is not updated if the similarity at the first alignment position is less than or equal to the similarity at the target alignment position.
[0144] The optimization unit 904 is further configured to maintain the at least two signals aligned at the current target alignment position if it is determined that the target alignment position should not be updated.
[0145] Corresponding to the above embodiments, this application also provides an electronic device. Figure 10 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. The electronic device 110 may include a processor 111, a memory 112, and a communication unit 113. These components communicate through one or more buses. Those skilled in the art will understand that the structure of the electronic device shown in the figure does not constitute a limitation on the embodiments of the present invention. It may be a bus-shaped structure or a star-shaped structure, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0146] The communication unit 113 is used to establish a communication channel, enabling the electronic device to communicate with other devices. It can receive user data sent by other devices or send user data to other devices.
[0147] The processor 111 serves as the control center of the electronic device, connecting various parts of the device via various interfaces and lines. It executes software programs and / or modules stored in the memory 112, and calls data stored in the memory to perform various functions and / or process data. The processor can be composed of integrated circuits (ICs), such as a single packaged IC or multiple packaged ICs with the same or different functions connected together. For example, the processor 111 may consist only of a central processing unit (CPU). In this embodiment, the CPU may have a single processing core or include multiple processing cores.
[0148] The memory 112 is used to store the execution instructions of the processor 111. The memory 112 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk or optical disk.
[0149] When the execution instructions in memory 112 are executed by processor 111, the electronic device 110 is able to perform... Figure 9 Some or all of the steps in the illustrated embodiments.
[0150] In a specific implementation, the present invention also provides a computer storage medium, wherein the computer storage medium may store a program, which, when executed, may include some or all of the steps of the signal processing method provided by the present invention in various embodiments. The storage medium may be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0151] Those skilled in the art will clearly understand that the techniques in the embodiments of the present invention can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in various embodiments or certain parts of the embodiments of the present invention.
[0152] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the device embodiments and terminal embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.
Claims
1. A signal processing method, characterized in that, Includes the following steps: During the process of sensor signal acquisition, target signals from at least two sensors are periodically acquired. Based on the target signals acquired by the sensor during the current sampling period, calculate the first alignment position between the target signals; Based on the first alignment position and the target alignment position determined within the first sampling period, it is determined whether to update the target alignment position; wherein, the first sampling period is the sampling period prior to the current sampling period; If it is determined that the target alignment position needs to be updated, then the first alignment position is updated to the target alignment position, and at least a portion of the signals acquired by the sensors are aligned at the updated target alignment position; the at least a portion of the signals acquired by the sensors include the target signal; Specifically, determining whether to update the target alignment position based on the first alignment position and the target alignment position determined within the first sampling period includes: Obtain the similarity of at least two target signals at the first alignment position, and obtain the similarity of at least two target signals at the target alignment positions determined within the first sampling period; If the similarity at the first alignment position is greater than the similarity at the target alignment position, then the target alignment position is updated.
2. The method according to claim 1, characterized in that, The periodic acquisition of target signals collected by at least two sensors includes: for the current sampling period, acquiring a first signal located within a first time period corresponding to the current sampling period from the signals already collected by the at least two sensors, and using the first signal as the target signal collected by the at least two sensors within the current sampling period; the first time period is the duration of the signal used to calculate the alignment position.
3. The method according to claim 2, characterized in that, The first time period is a time period that starts at a first moment and ends at a second moment. The first moment includes the start time of the current sampling period, and the second moment includes the end time of the current sampling period.
4. The method according to claim 2, characterized in that, The first time period is a time period that starts at the third time and ends at the fourth time. The third time is earlier than the current sampling period, and the fourth time is within the current sampling period.
5. The method according to claim 1, characterized in that, The calculation of the first alignment position between the target signals acquired by the sensor based on the current sampling period includes: Based on the target signal acquired by the sensor in the current sampling period, the similarity of the target signal at multiple alignment positions is calculated, and the alignment position with the highest similarity among the target signals is determined as the first alignment position.
6. The method according to claim 1, characterized in that, The method further includes: If the similarity at the first alignment position is less than or equal to the similarity at the target alignment position, then it is determined that the target alignment position will not be updated.
7. The method according to claim 1 or 6, characterized in that, The method further includes: If it is determined that the target alignment position will not be updated, then the at least two signals remain aligned at the current target alignment position.
8. A signal processing apparatus, characterized in that, include: The acquisition unit is used to periodically acquire target signals acquired by at least two sensors during the process of sensor signal acquisition; An alignment unit is used to calculate the first alignment position between the target signals based on the target signals acquired by the sensor in the current sampling period. The comparison unit is configured to determine whether to update the target alignment position based on the first alignment position and the target alignment position determined within the first sampling period; wherein the first sampling period is the sampling period prior to the current sampling period; An optimization unit is configured to, if it is determined that the target alignment position needs to be updated, update the first alignment position to the target alignment position and align at least a portion of the signals acquired by the sensors at the updated target alignment position; the signals acquired by at least a portion of the sensors include the target signal; wherein, the comparison unit is specifically configured to obtain the similarity of at least two target signals at the first alignment position and obtain the similarity of at least two target signals at the target alignment position determined within the first sampling period; If the similarity at the first alignment position is greater than the similarity at the target alignment position, then the target alignment position is updated.
9. An electronic device, characterized in that, The device includes a memory for storing computer program instructions and a processor for executing the program instructions, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to perform the method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the method of any one of claims 1-7.