Filtering Method, Device, Electronic Device, and Storage Medium
By comparing the filtering effect of the sensor in different environments, determining the target filtering parameters and optimizing the filtering scheme, the problem of unstable anti-interference performance of the sensor is solved and the stability of the sensor in various environments is improved.
Patent Information
- Application Number
- CN202011555965.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-12-24
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2040-12-24
AI Technical Summary
The anti-interference performance of the sensor in different environments is unstable. The existing technology mainly relies on the analog environment adjustment in the development stage, and it is difficult to improve the software filtering performance after leaving the factory.
By acquiring the original data of the sensor, processing based on multiple sets of different filter parameters, comparing the stationarity information of the processed data, determining the target filter parameters and filtering result data, thereby optimizing the filtering scheme.
It improves the anti-interference and stability of the sensor in various environments, so that it can achieve optimized filtering effect in different working environments.
Smart Images

Figure CN114676033B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to data processing technology, and in particular to a filtering method, device, electronic device and storage medium. Background Art
[0002] The sensor is a relatively sensitive electronic component. During operation, it is easily disturbed by external environmental factors, which causes frequent jitter in the data generated by the sensor, affecting the accuracy of the detection data.
[0003] Sensors mainly achieve anti-interference performance through hardware design and software filtering. Among them, software filtering mainly processes the raw data generated by the sensor through filtering methods to reduce the amplitude of data jitter in the raw data or even make it close to stability.
[0004] However, currently, the processing capacity of software filtering is mainly adjusted and optimized by simulating the working environment of the sensor during the development phase. After leaving the factory, only the software program is upgraded, which will not improve the software filtering performance. As a result, the sensor's anti-interference performance is better in an environment similar to the simulated environment, but worse in an environment with a large difference from the simulated environment, and the sensor performance is unstable. Summary of the invention
[0005] The present application provides a filtering method, device, electronic device and storage medium, which determine a specific filtering scheme by comparing actual filtering effects, thereby improving the anti-interference and stability of the sensor in various environments.
[0006] In a first aspect, the present application provides a filtering method, comprising:
[0007] Get the raw data collected by the sensor;
[0008] Based on multiple sets of different filtering parameters, the raw data is processed to obtain corresponding multiple sets of processed data;
[0009] For the processed data corresponding to each set of different filtering parameters, determining the stationarity information of the processed data;
[0010] According to the stationarity information of the processed data corresponding to each set of filtering parameters, the target filtering parameters and the corresponding filtering result data are determined.
[0011] Optionally, the method further includes:
[0012] Determine multiple alternative filtering schemes, and for each of the multiple filtering schemes, process the original data based on a common parameter corresponding to the filtering scheme to obtain corresponding multiple processed data;
[0013] For the processed data corresponding to each filtering scheme, determining the stationarity information of the processed data;
[0014] A target filtering scheme is determined according to the stationarity information of the processed data corresponding to each filtering scheme, and the multiple groups of different filtering parameters are determined according to the target filtering scheme.
[0015] Optionally, the data stationarity information includes: data variance;
[0016] The step of determining the stationarity information of the processed data corresponding to each set of different filtering parameters includes:
[0017] For the processed data corresponding to each set of different filtering parameters, determining the data variance of the processed data;
[0018] The step of determining target filtering parameters and corresponding filtering result data according to the stationarity information of the processed data corresponding to each set of filtering parameters comprises:
[0019] According to the data variance of the processed data, target filtering parameters and corresponding filtering result data are determined.
[0020] Optionally, determining a target filtering parameter and corresponding filtering result data according to the data variance of the processed data includes:
[0021] Determine the filtering parameter corresponding to the smallest data variance among the data variances of the processed data corresponding to each set of filtering parameters as the target filtering parameter;
[0022] The processed data corresponding to the minimum data variance is determined as the target filtering result data.
[0023] Optionally, the method further includes:
[0024] Adjusting the filter parameters corresponding to the maximum stationarity information of the processed data corresponding to each set of filter parameters to determine the target filter parameters;
[0025] The original data is processed using the target filtering parameters to obtain target filtering result data.
[0026] Optionally, the method further includes:
[0027] Analyzing data features of the raw data of the sensor;
[0028] Establishing a corresponding relationship between the data features and target filtering parameters of the target filtering scheme;
[0029] After determining the corresponding relationship, if there is original data to be filtered, determining target filtering parameters of the target filtering scheme according to data features of the original data to be filtered and the corresponding relationship;
[0030] The target filtering parameters of the target filtering scheme are used to process the original data to be filtered to obtain corresponding filtering result data.
[0031] In a second aspect, the present application provides a filtering device, comprising:
[0032] An acquisition module is used to obtain the raw data collected by the sensor;
[0033] A filtering processing module, used to process the original data based on multiple groups of different filtering parameters to obtain corresponding multiple groups of processed data;
[0034] A stationarity information determination module, used for determining stationarity information of the processed data corresponding to each set of different filtering parameters;
[0035] The target filtering parameter determination module is used to determine the target filtering parameters and the corresponding filtering result data according to the stationarity information of the processed data corresponding to each set of filtering parameters.
[0036] Optionally, the filtering processing module is further used to: determine a plurality of alternative filtering schemes, and for each of the plurality of filtering schemes, process the original data based on a common parameter corresponding to the filtering scheme to obtain a plurality of corresponding processed data;
[0037] The stationarity information determination module is further used to determine the stationarity information of the processed data corresponding to each filtering scheme;
[0038] The target filtering parameter determination module is also used to determine the target filtering scheme according to the stationarity information of the processed data corresponding to each filtering scheme, and determine the multiple groups of different filtering parameters according to the target filtering scheme.
[0039] Optionally, the data stationarity information includes: data variance;
[0040] The stationarity information determination module is specifically used to determine the stationarity information of the processed data corresponding to each group of different filtering parameters:
[0041] For the processed data corresponding to each set of different filtering parameters, determining the data variance of the processed data;
[0042] The target filtering parameter determination module is specifically used to determine the target filtering parameters and the corresponding filtering result data according to the stationarity information of the processed data corresponding to each set of filtering parameters:
[0043] According to the data variance of the processed data, target filtering parameters and corresponding filtering result data are determined.
[0044] Optionally, when the target filtering parameter determination module determines the target filtering parameter and the corresponding filtering result data according to the data variance of the processed data, it is specifically used to:
[0045] Determine the filtering parameter corresponding to the smallest data variance among the data variances of the processed data corresponding to each set of filtering parameters as the target filtering parameter;
[0046] The processed data corresponding to the minimum data variance is determined as the target filtering result data.
[0047] Optionally, the target filtering parameter determination module is further used to:
[0048] Adjusting the filter parameters corresponding to the maximum stationarity information of the processed data corresponding to each set of filter parameters to determine the target filter parameters;
[0049] The original data is processed using the target filtering parameters to obtain target filtering result data.
[0050] Optionally, the device further comprises: a feature analysis module, configured to: analyze data features of the raw data of the sensor;
[0051] Establishing a corresponding relationship between the data features and target filtering parameters of the target filtering scheme;
[0052] After determining the corresponding relationship, the target filtering parameter determination module is further used to determine the target filtering parameters of the target filtering scheme according to the data characteristics of the original data to be filtered and the corresponding relationship when there is original data to be filtered;
[0053] The target filtering parameters of the target filtering scheme are used to process the original data to be filtered to obtain corresponding filtering result data.
[0054] In a third aspect, the present application provides an electronic device, comprising: a memory for storing program instructions; and a processor for calling and executing the program instructions in the memory to execute the method described in the first aspect.
[0055] In a fourth aspect, the present application provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method described in the first aspect is implemented.
[0056] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the method described in the first aspect when executed by a processor.
[0057] The present application provides a filtering method, device, electronic device and storage medium, the method comprising: obtaining raw data collected by a sensor; processing the raw data based on multiple groups of different filtering parameters to obtain corresponding multiple groups of processed data; determining the stationarity information of the processed data corresponding to each group of different filtering parameters; determining the target filtering parameters and the corresponding filtering result data according to the stationarity information of the processed data corresponding to each group of filtering parameters. Multiple groups of different filtering parameters are preset to correspond to different working environments. After the sensor collects the raw data, the raw data is processed using multiple groups of different filtering parameters respectively. By determining and comparing the stationarity information of the processed data, the actual filtering effects based on different filtering parameters are compared, and then the target filtering parameters are selected as the final filtering scheme. Selecting the best filtering scheme according to the actual filtering effect can enable the sensor to achieve the most optimized filtering effect in various working environments, thereby improving the stability of the sensor. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] In order to more clearly illustrate the technical solutions in the present application or the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0059] Figure 1 A schematic diagram of an application scenario provided for this application;
[0060] Figure 2 A flowchart of a filtering method provided in one embodiment of the present application;
[0061] Figure 3a A flowchart of a filtering process provided by an embodiment of the present application;
[0062] Figure 3b A flowchart of another filtering process provided by an embodiment of the present application;
[0063] Figure 4 A schematic diagram of the structure of a filtering device provided in one embodiment of the present application;
[0064] Figure 5 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0065] In order to make the purpose, technical solutions and advantages of this application clearer, the technical solutions in this application will be clearly and completely described below in conjunction with the drawings in this application. Obviously, the described embodiments are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0066] The sensor is a relatively sensitive electronic component, which is easily affected by external interference during operation, causing frequent jitter in the data generated by the sensor.
[0067] Generally, the detection results of the sensor are corrected by improving the hardware design or filtering the data with software to resist interference as much as possible.
[0068] At present, during the development phase of software data filtering, a large number of simulation tests are carried out to determine a more optimized filtering solution to cope with the interference of the test environment.
[0069] However, in reality, sensors may be used anywhere, and the interference in each place may be different. Moreover, the interference in the same place may change in real time at different times, which will cause different degrees of jitter in the data. The changing working environment poses a great challenge to the working stability of the sensor. In some places with little interference or in line with the software test environment, the filtered data will be relatively stable, while in places with a large difference from the software test environment, the jitter of the filtered data will be more obvious.
[0070] Therefore, the present application proposes a filtering method, device, electronic device and storage medium to reduce the data floating differences caused by complex and diverse interferences to the sensors when the sensors are installed in different scenarios, and improve the overall stability of the sensors.
[0071] Figure 1 A schematic diagram of an application scenario provided by this application. Figure 1 As shown, the temperature of a device in the target device is detected by using a sensor device. After the original temperature value is detected, an optimal filtering method is selected to filter the original temperature value to obtain filtered data, which is output to the processing device as the detection result for subsequent processing.
[0072] For the specific filtering process, please refer to the following embodiments.
[0073] Figure 2A flowchart of a filtering method provided in one embodiment of the present application is shown in FIG. Figure 2 As shown, the method of this embodiment may include:
[0074] S201. Obtaining raw data collected by the sensor.
[0075] The detection device in the sensor device detects the target device and collects raw data.
[0076] Specifically, corresponding sensor devices may be selected according to different detection targets. For example, when performing temperature detection on the target device, a corresponding temperature sensor device may be selected; when performing pressure detection on the target device, a corresponding pressure sensor device may be selected.
[0077] S202: Process the original data based on multiple groups of different filtering parameters to obtain corresponding multiple groups of processed data.
[0078] During the sensor development phase, an optimal filtering solution can be determined through simulation testing. This filtering solution has the best stability and anti-interference performance in a variety of simulated working environments compared to other filtering solutions. At the same time, by adjusting the filtering parameters, this filtering solution can achieve the best filtering effect in various simulated working environments. This filtering solution and its corresponding multiple sets of filtering parameters can be stored in the sensor device.
[0079] When the filtering method is actually implemented, the sensor device has no way of knowing the current working environment, and therefore cannot determine which set of filtering parameters to use for filtering. However, from the perspective of filtering effect, if a set of filtering parameters is suitable for the current working environment, then the filtering effect should be the best. The closer the filtered data is to the real data, the better the filtering effect.
[0080] Then, the original data can be filtered using multiple sets of different filtering parameters preset in the sensor device to obtain multiple sets of processed data. By judging which set of processed data is closer to the real data, it means that the filtering effect of this set is better.
[0081] S203. Determine the stationarity information of the processed data for each set of different filtering parameters.
[0082] If the processed data is close to the real data, it will have some characteristics of the real data, such as stable data and small variation. These characteristics are characterized by the stationarity information of the data in this application.
[0083] By performing mathematical calculations or feature extraction on the processed data, information about the stationarity of the data can be obtained.
[0084] In some embodiments, the original data and the processed data can be selected through a sliding window. For example, if the size of the sliding window is selected as 20 data, 20 consecutive original data generated at the current moment and before are selected, filtered, and the corresponding 20 processed data are generated, and the stationarity information of the 20 processed data is determined.
[0085] S204. Determine target filtering parameters and corresponding filtering result data according to the stationarity information of the processed data corresponding to each set of filtering parameters.
[0086] The stationarity information of each group of data can represent the degree to which each group of data is close to the real data. Based on this, a group of processed data closest to the real data can be determined as the filtering result data, and the filtering parameters corresponding to this group of data are the target filtering parameters.
[0087] In the present application, the target filtering parameters are used to indicate the filtering parameters finally selected for filtering, and the filtering result data are used to indicate the processed data generated after filtering by the target filtering parameters, that is, the final detection data of the sensor device.
[0088] After the filtering result data is output, it can be used for other subsequent processing. For example, in the temperature detection scenario, the temperature of the target device is detected in real time, and the cooling device is turned on when the temperature exceeds the threshold. Then, when the filtering result data is output, indicating that the temperature of the current target device exceeds the threshold, the cooling device is turned on according to the filtering result data.
[0089] The filtering method provided in this embodiment includes: obtaining the raw data collected by the sensor; processing the raw data based on multiple groups of different filtering parameters to obtain corresponding multiple groups of processed data; determining the stationarity information of the processed data corresponding to each group of different filtering parameters; determining the target filtering parameters and the corresponding filtering result data according to the stationarity information of the processed data corresponding to each group of filtering parameters. Multiple groups of different filtering parameters are preset to correspond to different working environments. After the sensor collects the raw data, the raw data is processed using multiple groups of different filtering parameters respectively. By determining and comparing the stationarity information of the processed data, the actual filtering effects based on different filtering parameters are compared, and then the target filtering parameters are selected as the final filtering scheme. Selecting the best filtering scheme according to the actual filtering effect can enable the sensor to achieve the most optimized filtering effect in various working environments, thereby improving the stability of the sensor.
[0090] In some embodiments, during the sensor development stage, multiple better filtering schemes can be determined through simulation tests. Each filtering scheme has the best stability and anti-interference performance in one or more simulated working environments. At the same time, by adjusting the filtering parameters, the filtering scheme can achieve the best filtering effect in various simulated working environments. Then, multiple filtering schemes and their corresponding multiple sets of filtering parameters can be stored in the sensor device.
[0091] Correspondingly, the above-mentioned filtering method may also include: determining a plurality of alternative filtering schemes, and for each of the plurality of filtering schemes, processing the original data based on the general parameters corresponding to the filtering scheme to obtain a plurality of corresponding processed data; for the processed data corresponding to each filtering scheme, determining the stationarity information of the processed data; determining the target filtering scheme based on the stationarity information of the processed data corresponding to each filtering scheme, and determining multiple sets of different filtering parameters based on the target filtering scheme.
[0092] When the filtering method is actually implemented, the sensor device has no way of knowing the current working environment, and therefore cannot determine which filtering scheme to use for filtering. However, from the perspective of filtering effect, if a certain filtering scheme is more suitable for the current working environment, then its filtering effect should be the best. The closer the filtered data is to the real data, the better the filtering effect.
[0093] Then, similarly, the raw data can be filtered using a variety of different filtering schemes preset in the sensor device to obtain multiple groups of processed data. Among them, the filtering parameters of each scheme select universal parameters. Universal parameters refer to a preset set of parameters with a high usage rate, or parameters with a good comprehensive filtering effect in a variety of working environments. Here, stationarity information can also be used to represent the degree to which each group of data is close to the real data. By judging which group of processed data from various groups is closer to the real data, the target filtering scheme is selected. In this application, the target filtering scheme refers to the filtering scheme finally selected.
[0094] In some implementations, the processed data obtained by filtering the universal parameters of the target filtering scheme can be directly used as the filtering result data.
[0095] In other implementations, all or part of the filtering parameters may be selected from multiple groups of filtering parameters corresponding to the preset target filtering schemes, and the above-mentioned S202-S204 may be executed to select an optimal group of filtering parameters and determine the filtering result data.
[0096] In some embodiments, the stationary information of the data may include: data variance. Accordingly, the above-mentioned determination of the stationary information of the processed data corresponding to each set of different filtering parameters includes: determining the data variance of the processed data corresponding to each set of different filtering parameters; the above-mentioned determination of the target filtering parameters and the corresponding filtering result data according to the stationary information of the processed data corresponding to each set of filtering parameters includes: determining the target filtering parameters and the corresponding filtering result data according to the data variance of the processed data.
[0097] Variance can represent the discreteness of a set of data. The smaller the variance, the better the stability of the data. Therefore, data variance can be used to characterize the stationary information of the data. Specifically, after the processed data is obtained by filtering, the data variance can be calculated, and the target filtering parameters and the corresponding filtering result data can be determined according to the data variance.
[0098] Specifically, the filtering parameter corresponding to the smallest data variance among the data variances of the processed data corresponding to each set of filtering parameters may be determined as the target filtering parameter; and the processed data corresponding to the smallest data variance may be determined as the target filtering result data.
[0099] The smaller the data variance is, the closer each data is to the mean of this set of data, the more stable this set of data is, and the closer it is to the data characteristics of real data.
[0100] The process of selecting the target filtering scheme based on stationarity information is similar to the above process and will not be repeated here.
[0101] In another embodiment, the stationarity information of the data may further include: a data mean. The data mean and a preset data mean are compared at the same time. The preset data mean may be determined based on historical data. It is understandable that for a certain target device, its temperature value should be relatively stable under specific working conditions. Therefore, a preset data mean may be determined based on historical detection data. The better the filtering effect, the closer the data mean of the processed data should be to the preset data mean. Combining the two data features of the data mean and the data variance, a filtering scheme and / or filtering parameters with the best filtering effect may be more accurately determined.
[0102] In some embodiments, the working environment of the sensor device may be relatively special, so that filtering based on the filtering scheme and filtering parameters pre-stored in the device cannot achieve a good filtering effect. For example, after analyzing the stationarity information of the data, it is found that the difference between the data mean closest to the preset data mean and the preset data mean is still greater than the first preset value, and / or the smallest data variance is still greater than the second preset value, indicating that the effect of filtering with the preset filtering parameters is unsatisfactory. In this case, the filtering parameters can be further adjusted. Specifically, the filtering parameters corresponding to the largest stationarity information in the stationarity information of the processed data corresponding to each set of filtering parameters can be adjusted to determine the target filtering parameters; the original data is processed using the target filtering parameters to obtain the target filtering result data.
[0103] The "maximum stationarity information" mentioned here corresponds to the best filtering effect, and the size of the stationarity information corresponds to the quality of the filtering effect. For example, the data mean closest to the preset data mean and / or the smallest data variance, or data features that meet other "best filtering effect" standards.
[0104] The way to adjust the filter parameters can be specifically determined based on the maximum stability information. The filter parameters can be first increased by the third preset value. If the stability information increases, the third preset value is continued to be increased. If the stability information decreases, the target filter parameters are determined within the two adjustment intervals with the fourth preset value as the adjustment interval. Among them, the fourth preset value is less than the third preset value. The filter parameters can also be first increased by the third preset value. If the stability information decreases, the filter parameters are lowered by the third preset value. If the stability information decreases, the target filter parameters are determined within the two adjustment intervals with the fourth preset value as the adjustment interval.
[0105] This is just an exemplary explanation of the adjustment of the filter parameters. In the actual adjustment process, the adjustment directions of different filter parameters for different filter schemes may be different. For example, the filtering effect will change only if one of the two filter parameters of a certain filter scheme is increased and the other is decreased. This needs to be set based on the actual application of the filter scheme.
[0106] By flexibly adjusting the filtering parameters, the anti-interference performance of the sensor equipment in different environments can be further optimized and the stability can be improved.
[0107] In some embodiments, the above-mentioned filtering method may also include: analyzing data characteristics of the sensor raw data; establishing a correspondence between the data characteristics and the target filtering parameters of the target filtering scheme; after determining the correspondence, if there is raw data to be filtered, determining the target filtering parameters of the target filtering scheme according to the data characteristics and the correspondence of the raw data to be filtered; using the target filtering parameters of the target filtering scheme, processing the raw data to be filtered to obtain corresponding filtering result data.
[0108] Although the working environments of sensor devices are not exactly the same, they may face the same working environment at some point. It is understandable that in similar working environments, the interference faced by sensor devices is also similar, and the characteristics of the collected raw data are also similar. If the sensor device can identify these same or similar working environments, it can use the same filtering scheme and / or the same filtering parameters for filtering without repeating the above comparison process, which greatly reduces the data processing volume of the sensor device and improves the processing speed.
[0109] The characteristics of the original data may include the numerical range of the data, the change characteristics of the numerical value over time (increasing, decreasing, fluctuating, etc.), the mean, the variance, etc.
[0110] Specifically, a correspondence between the original data features and the target filtering scheme and target filtering parameters can be established based on the processed data. In the subsequent detection process, it can be analyzed whether the original data to be filtered meets the data features of the processed original data. If there is historical data with matching features, the corresponding target filtering scheme and target filtering parameters are directly used for filtering.
[0111] In order to further improve the filtering accuracy, the filtering parameters may be further adjusted by using the above-mentioned filtering parameter adjustment method.
[0112] In a specific embodiment, the above filtering method can be integrated into a filtering software program, referring to Figure 3a Only one filtering scheme is used, but the filtering parameters are adjusted multiple times to obtain the filtered data, and the stability analysis of the filtered data is performed, and the data with the best filtering effect is output.
[0113] In a general environment, the sensor can always maintain the optimal filtering effect.
[0114] In another specific embodiment, the above filtering method can be integrated into a filtering software program to provide filtering solutions such as comprehensive filtering, low-frequency interference filtering, high-frequency interference filtering, white noise filtering, etc., and provide a floating range of filtering parameters for each filtering solution.
[0115] During processing, multiple schemes are used to perform filtering processing simultaneously and in real time, and the filtering results are compared, and the filtering scheme with the highest stability is used as the current optimal scheme.
[0116] Furthermore, according to the filtering result of the optimal solution, the filtering parameters of the optimal solution are fine-tuned so that the filtering result data can achieve the most ideal filtering effect.
[0117] For details, please refer to Figure 3b First, the original data of the sensor is obtained, and the original data is filtered simultaneously and in real time through multiple processing schemes to obtain the filtered value. The smoothness of the filtered data value is obtained through calculation, and the optimal filtering scheme is selected according to the smoothness; then the filtering parameters of the optimal scheme are adjusted to fine-tune the filtering effect to the best state.
[0118] This filtering method uses multiple data filtering schemes to process the raw data of the same sensor at the same time, compare and switch between them, so that the sensor has targeted filtering schemes for different working environments, improving the effect of sensor filtering. At the same time, by adjusting the filtering parameters of the optimal scheme in real time, the sensor can always maintain the optimal filtering effect in a constantly changing working environment.
[0119] Figure 4 A structural diagram of a filtering device provided in one embodiment of the present application is shown in FIG. Figure 4 As shown, the filtering device 400 of this embodiment may include: an acquisition module 401, a filtering processing module 402, a stationarity information determination module 403 and a target filtering parameter determination module 404.
[0120] An acquisition module 401 is used to acquire raw data collected by the sensor;
[0121] The filtering processing module 402 is used to process the original data based on multiple sets of different filtering parameters to obtain corresponding multiple sets of processed data;
[0122] A stationarity information determination module 403, for determining stationarity information of processed data corresponding to each set of different filtering parameters;
[0123] The target filtering parameter determination module 404 is used to determine the target filtering parameters and the corresponding filtering result data according to the stationarity information of the processed data corresponding to each set of filtering parameters.
[0124] Optionally, the filtering processing module 402 is further used to: determine multiple alternative filtering schemes, and for each of the multiple filtering schemes, process the original data based on the common parameters corresponding to the filtering scheme to obtain corresponding multiple processed data;
[0125] The stationarity information determination module 403 is further used to determine the stationarity information of the processed data corresponding to each filtering scheme;
[0126] The target filtering parameter determination module 404 is further used to determine the target filtering scheme according to the stationarity information of the processed data corresponding to each filtering scheme, and determine multiple groups of different filtering parameters according to the target filtering scheme.
[0127] Optionally, the stationarity information of the data includes: data variance;
[0128] When determining the stationarity information of the processed data corresponding to each set of different filtering parameters, the stationarity information determination module 403 is specifically used to:
[0129] For the processed data corresponding to each set of different filtering parameters, determine the data variance of the processed data;
[0130] The target filtering parameter determination module 404 is specifically used to determine the target filtering parameters and the corresponding filtering result data according to the stationarity information of the processed data corresponding to each set of filtering parameters:
[0131] According to the data variance of the processed data, the target filtering parameters and the corresponding filtering result data are determined.
[0132] Optionally, when the target filtering parameter determination module 404 determines the target filtering parameter and the corresponding filtering result data according to the data variance of the processed data, it is specifically used to:
[0133] Determine the filtering parameter corresponding to the smallest data variance among the data variances of the processed data corresponding to each set of filtering parameters as the target filtering parameter;
[0134] The processed data corresponding to the minimum data variance is determined as the target filtering result data.
[0135] Optionally, the target filtering parameter determination module 404 is further used to:
[0136] Adjust the filter parameter corresponding to the maximum stationary information among the stationary information of the processed data corresponding to each set of filter parameters to determine the target filter parameter;
[0137] The original data is processed using the target filtering parameters to obtain the target filtering result data.
[0138] Optionally, the device further includes: a feature analysis module 405, configured to: analyze data features of raw data of the sensor;
[0139] Establishing the corresponding relationship between the data features and the target filtering parameters of the target filtering scheme;
[0140] After determining the corresponding relationship, the target filtering parameter determination module 404 is further used to determine the target filtering parameters of the target filtering scheme according to the data characteristics and the corresponding relationship of the original data to be filtered when there is original data to be filtered;
[0141] The target filtering parameters of the target filtering scheme are used to process the original data to be filtered to obtain corresponding filtering result data.
[0142] The device of this embodiment can be used to execute the method of any of the above embodiments. Its implementation principle and technical effects are similar and will not be described in detail here.
[0143] Figure 5 A schematic diagram of the structure of an electronic device provided in one embodiment of the present application is shown in FIG. Figure 5 As shown, the electronic device 500 of this embodiment may include: a memory 501 and a processor 502 .
[0144] The memory 501 is used to store program instructions.
[0145] The processor 502 is used to call and execute the program instructions in the memory 501. The implementation principle and technical effect of the method in any of the above embodiments are similar and will not be repeated here.
[0146] The electronic device 500 may be a sensor device, or a computer device connected to the sensor device and having storage and computing functions.
[0147] The present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method of any of the above embodiments is implemented.
[0148] The present application also provides a computer program product, including a computer program, which implements the method of any of the above embodiments when executed by a processor.
[0149] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0150] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.
Claims
1. A filtering method, characterized in that, it includes: Obtain the original data collected by the sensor; Based on a preset set of different filtering parameters, process the original data to obtain a corresponding set of processed data, where the preset set of different filtering parameters corresponds to different working environments; For the processed data corresponding to each set of different filtering parameters, determine the stationarity information of the processed data; According to the stationarity information of the processed data corresponding to each set of filtering parameters, determine the target filtering parameters and the corresponding filtered result data; Determine multiple alternative filtering schemes. For each filtering scheme among the multiple filtering schemes, based on the general parameters corresponding to the filtering scheme, process the original data to obtain corresponding multiple sets of processed data, where the general parameters refer to a preset set of parameters with a relatively high usage rate, or parameters with better comprehensive filtering effects in multiple working environments; For the processed data corresponding to each filtering scheme, determine the stationarity information of the processed data; According to the stationarity information of the processed data corresponding to each filtering scheme, determine the target filtering scheme, and determine the set of different filtering parameters according to the target filtering scheme.
2. The method according to claim 1, characterized in that, the stationarity information of the data includes: data variance; The step of determining the stationarity information of the processed data for the processed data corresponding to each set of different filtering parameters includes: For the processed data corresponding to each set of different filtering parameters, determine the data variance of the processed data; The step of determining the target filtering parameters and the corresponding filtered result data according to the stationarity information of the processed data corresponding to each set of filtering parameters includes: Determine the target filtering parameters and the corresponding filtered result data according to the data variance of the processed data.
3. The method according to claim 2, characterized in that, the step of determining the target filtering parameters and the corresponding filtered result data according to the data variance of the processed data includes: Determine the filtering parameters corresponding to the minimum data variance among the data variances of the processed data corresponding to each set of filtering parameters as the target filtering parameters; Determine the processed data corresponding to the minimum data variance as the target filtered result data.
4. The method according to any one of claims 1 - 3, characterized in that, it further includes: Adjust the filtering parameters corresponding to the maximum stationarity information in the stationarity information of the processed data corresponding to each set of filtering parameters to determine the target filtering parameters; Use the target filtering parameters to process the original data to obtain the target filtered result data.
5. The method according to any one of claims 1 - 3, characterized in that, it further includes: Analyze the data characteristics of the original data of the sensor; Establish the corresponding relationship between the data characteristics and the target filtering parameters of the target filtering scheme; After determining the corresponding relationship, if there is original data to be filtered, determine the target filtering parameters of the target filtering scheme according to the data characteristics of the original data to be filtered and the corresponding relationship. Process the original data to be filtered by using the target filtering parameters of the target filtering scheme to obtain corresponding filtered result data.
6. A filtering device characterized in that it includes: an acquisition module configured to acquire the original data collected by a sensor; a filtering processing module configured to process the original data based on a preset plurality of different filtering parameters to obtain corresponding multiple sets of processed data, wherein the preset plurality of different filtering parameters correspond to different working environments; a stationarity information determination module configured to determine the stationarity information of the processed data corresponding to each set of different filtering parameters; a target filtering parameter determination module configured to determine the target filtering parameters and corresponding filtered result data according to the stationarity information of the processed data corresponding to each set of filtering parameters; the filtering processing module is further configured to determine a plurality of alternative filtering schemes, and for each filtering scheme in the plurality of filtering schemes, process the original data based on the general parameters corresponding to the filtering scheme to obtain corresponding multiple sets of processed data, wherein the general parameters refer to a preset set of parameters with a relatively high usage rate or parameters with a relatively good comprehensive filtering effect in multiple working environments; determine the stationarity information of the processed data corresponding to each filtering scheme; determine the target filtering scheme according to the stationarity information of the processed data corresponding to each filtering scheme, and determine the plurality of different filtering parameters according to the target filtering scheme.
7. An electronic device characterized in that it includes: a memory configured to store program instructions; a processor configured to call and execute the program instructions in the memory and execute the method according to any one of claims 1-5.
8. A computer-readable storage medium characterized in that the storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1-5 is implemented.
9. A computer program product including a computer program characterized in that when the computer program is executed by a processor, the method according to any one of claims 1-5 is implemented.
Citation Information
Patent Citations
Self-adaptation inertial filtering method with PID exponential factor
CN103684351A
Method for improving accuracy of UWB ranging in firearm off-location alarm system
CN109655824A