Adaptive filtering method and device, household equipment and storage medium

By introducing weighting processing methods of density weight and perturbation weights into traditional filtering algorithms, the problem of poor processing capabilities of traditional filtering algorithms when processing complex sampled data is solved, and more accurate and stable filtering results are achieved.

CN119995561APending Publication Date: 2025-05-13GREE ELECTRIC APPLIANCE INC OF ZHUHAI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510063879.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-15
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

Traditional filtering algorithms are difficult to take into account local outliers in short-term fluctuations in complex sampled data and global fluctuations in long-term trends, resulting in poor processing capabilities.

Method used

By calculating the density weight and perturbation weight of the sampled data, the sampled data is weighted to reduce the impact of outliers and make global corrections, thereby obtaining a smoother and more accurate filtering result.

Benefits of technology

The processing capability of complex sampling data accompanied by short-term fluctuations and long-term trend changes is improved, and the accuracy and stability of filtering results are enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119995561A_ABST
    Figure CN119995561A_ABST
Patent Text Reader

Abstract

The invention relates to a self-adaptive filtering method and device, home equipment and a storage medium. The method comprises the following steps: acquiring N sampling data sets; determining the density weight of each piece of sampling data in the nth sampling data set; wherein the density weight is used for describing the distribution condition of the sampling data in the nth sampling data set; determining the disturbance weight of the nth sampling data set; wherein the disturbance weight is used for describing the disturbance condition of the nth sampling data set relative to the N sampling data sets; and weighting the sampling data in the nth sampling data set according to the density weight of each sampling data in the nth sampling data set and the disturbance weight of the nth sampling data set to obtain a filtering result of the nth sampling data set. Through the technical scheme provided by the invention, the technical problem that a traditional filtering algorithm is poor in processing capability for complex sampling data along with short-term fluctuation and long-term trend change is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing, and in particular to an adaptive filtering method, device, household appliance and storage medium. Background Art

[0002] In application scenarios such as environmental monitoring, industrial control, and sensor networks, sampled data is often affected by noise and external interference. For example, when sensors collect parameters such as temperature, humidity, and gas concentration, sampled data may produce abnormal values ​​due to sudden environmental fluctuations or equipment accuracy issues. These abnormal values ​​will have a negative impact on subsequent data analysis and system decision-making, and may even lead to reduced system operating efficiency or wrong decisions.

[0003] In the prior art, noise and outliers in sampled data can be processed by traditional filtering algorithms such as average filtering algorithm, moving average algorithm or Kalman filtering algorithm. However, in some scenarios, sampled data is accompanied by short-term fluctuations and long-term trend changes, and the expression of sampled data is complex. If complex sampled data is processed by traditional filtering algorithms, it is difficult to take into account the local outliers in short-term fluctuations and the global fluctuations in long-term trends, resulting in poor processing capabilities of traditional filtering algorithms for complex sampled data. Summary of the invention

[0004] The present application provides an adaptive filtering method, device, household appliance and storage medium to solve the technical problem that traditional filtering algorithms have poor processing capabilities for complex sampled data accompanied by short-term fluctuations and long-term trend changes.

[0005] In a first aspect, the present application provides an adaptive filtering method, the method comprising:

[0006] Obtain N sampling data sets; wherein the nth sampling data set includes sampling data obtained by sampling at the same sampling point at the nth sampling time, N is an integer greater than or equal to 1, and n is an integer less than or equal to N;

[0007] Determine the density weight of each of the sampled data in the nth sampled data set; wherein the density weight is used to describe the distribution of the sampled data in the nth sampled data set;

[0008] Determining a disturbance weight of the nth sample data set; wherein the disturbance weight is used to describe the disturbance of the nth sample data set relative to the N sample data sets;

[0009] The sampling data in the nth sampling data set are weighted according to the density weight of each sampling data in the nth sampling data set and the disturbance weight of the nth sampling data set to obtain a filtering result of the nth sampling data set.

[0010] In a feasible embodiment of the present application, determining the density weight of each of the sampling data in the nth sampling data set includes:

[0011] Determine the data density of each of the sampling data in the nth sampling data set;

[0012] The density weight of each of the sampling data in the nth sampling data set is determined according to the data density of each of the sampling data in the nth sampling data set.

[0013] In a feasible embodiment of the present application, determining the disturbance weight of the nth sample data set includes:

[0014] Determine a short-term disturbance state value of each of the sample data sets; wherein the short-term disturbance state value is the median of the sample data in the sample data set;

[0015] Determining the long-term disturbance state value of the N sample data sets according to the short-term disturbance state value of each sample data set; wherein the long-term disturbance state value is the median of each short-term disturbance state value;

[0016] The disturbance weight of the nth sampling data set is determined according to the short-term disturbance state value and the long-term disturbance state value of the nth sampling data set.

[0017] In a feasible embodiment of the present application, determining the data density of each sample data in the nth sample data set includes:

[0018] The data density of each of the sampling data in the nth sampling data set is obtained by processing each of the sampling data in the nth sampling data set using a first calculation formula; wherein the first calculation formula is:

[0019]

[0020] Among them, ρ i is the data density of the i-th sample data in the n-th sample data set, x i is the i-th sample data in the n-th sample data set, x jis the jth sampling data in the nth sampling data set, σ is the standard deviation of all the sampling data in the nth sampling data set, e is a natural constant, and M is the total number of the sampling data in the nth sampling data set.

[0021] In a feasible embodiment of the present application, determining the density weight of each of the sampling data in the nth sampling data set according to the data density of each of the sampling data in the nth sampling data set includes:

[0022] The data density of each of the sampling data in the nth sampling data set is processed by a second calculation formula to obtain the density weight of each of the sampling data in the nth sampling data set; wherein the second calculation formula is:

[0023]

[0024] Among them, w i is the density weight of the ith sampling data in the nth sampling data set.

[0025] In a feasible embodiment of the present application, determining the disturbance weight of the nth sampling data set according to the local disturbance state value and the global disturbance state value of the nth sampling data set includes:

[0026] The short-term disturbance state value and the long-term disturbance state value of the n-th sampling data set are processed by a third calculation formula to obtain the disturbance weight of the n-th sampling data set; wherein the third calculation formula is:

[0027]

[0028] Wherein, u is the perturbation weight of the nth sampling data set, D short is the short-term disturbance state value of the nth sampling data set, D long is the long-term disturbance state value, α is the preset adjustment coefficient, and T is the preset disturbance degree threshold.

[0029] In a feasible embodiment of the present application, weighted processing is performed on the sampled data in the nth sampled data set according to the density weight of each sampled data in the nth sampled data set and the disturbance weight of the nth sampled data set to obtain a filtering result of the nth sampled data set, including:

[0030] The density weight of each of the sampling data in the nth sampling data set, the disturbance weight of the nth sampling data set, and each of the sampling data in the nth sampling data set are processed by a fourth calculation formula to obtain the filtering result; wherein the fourth calculation formula is:

[0031]

[0032] Wherein, y is the filtering result of the nth sampling data set.

[0033] In a second aspect, the present application provides an adaptive filtering device, the device comprising:

[0034] An acquisition module is used to acquire N sampling data sets; wherein the nth sampling data set includes sampling data obtained by sampling at the same sampling point at the nth sampling time, N is an integer greater than or equal to 1, and n is an integer less than or equal to N;

[0035] A first determination module is used to determine the density weight of each of the sampled data in the nth sampled data set; wherein the density weight is used to describe the distribution of the sampled data in the nth sampled data set;

[0036] A second determination module is used to determine a disturbance weight of the nth sample data set; wherein the disturbance weight is used to describe the disturbance of the nth sample data set relative to the N sample data sets;

[0037] A processing module is used to perform weighted processing on the sampling data in the nth sampling data set according to the density weight of each sampling data in the nth sampling data set and the disturbance weight of the nth sampling data set to obtain a filtering result of the nth sampling data set.

[0038] In a third aspect, the present application provides a household device, comprising: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor connected to the at least one bus; and at least one memory connected to the at least one bus, wherein the processor is configured to execute an adaptive filtering method described in the first aspect of the present application.

[0039] In a fourth aspect, the present application further provides a computer storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute an adaptive filtering method described in the first aspect of the present application.

[0040] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:

[0041] The method provided in the embodiment of the present application calculates the density weight of each sampling data in the sampling data set, thereby describing the distribution of each sampling data in the sampling data set, focusing on the local data characteristics of the sampling data set; calculates the disturbance weight of the sampling data set, thereby describing the disturbance of the sampling data set relative to the entire sampling data set, focusing on the global data characteristics of the sampling data set. For any sampling data set, the sampling data in the sampling data set are processed based on the density weight and the disturbance weight, the influence of a single outlier in the sampling data set is weakened, and a global correction is performed at the same time, so that the obtained filtering result is more stable and accurate. The technical solution provided by the present application solves the technical problem that the traditional filtering algorithm has poor processing ability for complex sampling data accompanied by short-term fluctuations and long-term trend changes. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0044] One or more embodiments are exemplarily described by pictures in the corresponding drawings, and these exemplified descriptions do not constitute limitations on the embodiments. Elements with the same reference numerals in the drawings represent similar elements, and unless otherwise stated, the figures in the drawings do not constitute proportional limitations.

[0045] Figure 1 A schematic diagram of a flow chart of an adaptive filtering method provided in an embodiment of the present application;

[0046] Figure 2 A schematic diagram of a flow chart of determining density weight in an adaptive filtering method provided in an embodiment of the present application;

[0047] Figure 3 A schematic diagram of a flow chart of determining a disturbance weight in an adaptive filtering method provided in an embodiment of the present application;

[0048] Figure 4 A schematic diagram of the overall process of an adaptive filtering method provided in an embodiment of the present application;

[0049] Figure 5 A schematic diagram of the structure of an adaptive filtering device provided in an embodiment of the present application;

[0050] Figure 6 A schematic diagram of the structure of a household appliance provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0052] The disclosure below provides many different embodiments or examples to realize the different structures of the present application. In order to simplify the disclosure of the present application, the parts and settings of specific examples are described below. Of course, they are only examples, and the purpose is not to limit the present application. In addition, the present application can repeat reference numbers and / or letters in different examples. This repetition is for the purpose of simplification and clarity, and does not itself indicate the relationship between the various embodiments and / or settings discussed.

[0053] In order to solve the technical problem that traditional filtering algorithms have poor processing capabilities for complex sampling data accompanied by short-term fluctuations and long-term trend changes, the present application provides an adaptive filtering method, device, home appliance and storage medium, which can effectively process complex sampling data accompanied by short-term fluctuations and long-term trend changes.

[0054] Figure 1 A schematic diagram of a flow chart of an adaptive filtering method provided in an embodiment of the present application, referring to Figure 1 , an adaptive filtering method provided in an embodiment of the present application specifically comprises the following steps:

[0055] S1: Obtain N sampling data sets; wherein the nth sampling data set includes sampling data obtained by sampling at the same sampling point at the nth sampling time, N is an integer greater than or equal to 1, and n is an integer less than or equal to N;

[0056] Specifically, the execution subject of an adaptive filtering method provided in an embodiment of the present application may be a backend server, which is connected to a sensor for data sampling and obtains sampled data from the sensor.

[0057] The backend server controls the sensor to perform data sampling at the sampling time. At the sampling time, the backend server controls the sensor to perform multiple samplings at the sampling point, thereby obtaining multiple sampling data at the sampling time. The multiple sampling data obtained at any sampling time form a sampling data set. The sampling data set is repeatedly obtained at N sampling times to obtain N sampling data sets.

[0058] The technicians can set the sampling time of the sensor by themselves. For example, you can set every 1s as a sampling time, and the sensor will sample data at the 1s, 2s, ... Ns.

[0059] The technician can set the sampling frequency of the sensor at the sampling moment by himself. The sampling frequency of the sensor at the sampling moment determines the number of sampled data in the sampled data set obtained at the sampling moment. For example, if the sampling frequency of the sensor is set to 100HZ, the sampled data set obtained at the sampling moment includes 100 sampled data.

[0060] S2: Determine the density weight of each sampling data in the nth sampling data set; wherein the density weight is used to describe the distribution of the sampling data in the nth sampling data set;

[0061] Specifically, for the nth sampling data set, the density weight of each sampling data in the nth sampling data set is determined, and the density weight is used to describe the distribution of the sampling data in the nth sampling data set.

[0062] In a feasible embodiment of the present application, determining the density weight of each sampling data in the nth sampling data set includes:

[0063] Determine the data density of each sampling data in the nth sampling data set;

[0064] The density weight of each sampling data in the nth sampling data set is determined according to the data density of each sampling data in the nth sampling data set.

[0065] Specifically, the density weight of the sampled data is determined according to the data density of the sampled data, that is, the density of the points corresponding to the sampled data in the entire sampled data set.

[0066] In a feasible embodiment of the present application, determining the data density of each sampling data in the nth sampling data set includes:

[0067] The data density of each sampling data in the nth sampling data set is obtained by processing each sampling data in the nth sampling data set using the first calculation formula; wherein the first calculation formula is:

[0068]

[0069] Among them, ρ i is the data density of the ith sampling data in the nth sampling data set, x i is the i-th sample data in the n-th sample data set, x j is the jth sampling data in the nth sampling data set, σ is the standard deviation of all sampling data in the nth sampling data set, e is a natural constant, and M is the total number of sampling data in the nth sampling data set.

[0070] Specifically, the greater the data density of a sampling data, the denser the points corresponding to other sampling data distributed around the point corresponding to the sampling data; the smaller the data density of a sampling data, the sparser the points corresponding to other sampling data distributed around the point corresponding to the sampling data.

[0071] Based on this, if the data density of a sampling data is larger, it means that the sampling data is more outlier, and the corresponding sampling data is more likely to be an outlier. If the data density of a sampling data is smaller, it means that the sampling data is more social, and the corresponding sampling data is less likely to be an outlier.

[0072] In a feasible embodiment of the present application, determining the density weight of each sampling data in the nth sampling data set according to the data density of each sampling data in the nth sampling data set includes:

[0073] The data density of each sampling data in the nth sampling data set is processed by the second calculation formula to obtain the density weight of each sampling data in the nth sampling data set; wherein the second calculation formula is:

[0074]

[0075] Among them, w i is the density weight of the i-th sampling data in the n-th sampling data set.

[0076] Specifically, for sampling data that is highly likely to be an outlier, its influence on the overall data should be eliminated during processing. Therefore, the density weight corresponding to the sampling data that is highly likely to be an outlier is smaller, that is, the greater the data density of the sampling data, the smaller the density weight corresponding to the sampling data; for sampling data that is less likely to be an outlier, its influence on the overall data should be enhanced during processing. Therefore, the density weight corresponding to the sampling data that is less likely to be an outlier is larger, that is, the smaller the data density of the sampling data, the larger the density weight corresponding to the sampling data.

[0077] Figure 2 A schematic diagram of a flow chart for determining density weight in an adaptive filtering method provided in an embodiment of the present application, referring to Figure 2In S2, the density weight of the sampling data is calculated specifically by the following process.

[0078] S201: Obtain a sampling data set X = {x1, x2, ..., x m};

[0079] S202: Calculate x i The data density ρ i , and the cycle continues until ρ is calculated. m ;

[0080] S203: Calculate x i The density weight w i , and the loop continues until w is calculated. m .

[0081] Through the technical solutions provided in the above-mentioned embodiments of S2, the possibility that the sampled data is an outlier in the sampled data set is identified based on the data density of the sampled data, and a density weight is assigned to the sampled data based on the data density of the sampled data, thereby minimizing the impact of outliers on the overall data.

[0082] S3: Determine the perturbation weight of the nth sample data set; wherein the perturbation weight is used to describe the perturbation of the nth sample data set relative to the N sample data sets;

[0083] Specifically, for the nth sampling data set, a disturbance weight of the nth sampling data set is determined, and the disturbance weight is used to describe the disturbance of the nth sampling data set relative to the N sampling data sets.

[0084] In a feasible embodiment of the present application, determining the disturbance weight of the nth sample data set includes:

[0085] Determine the short-term disturbance state value of each sampling data set; wherein the short-term disturbance state value is the median of the sampling data in the sampling data set;

[0086] Determine the long-term disturbance state value of N sampling data sets according to the short-term disturbance state value of each sampling data set; wherein the long-term disturbance state value is the median of each short-term disturbance state value;

[0087] The disturbance weight of the nth sampling data set is determined according to the short-term disturbance state value and the long-term disturbance state value of the nth sampling data set.

[0088] Specifically, the short-term disturbance state value is used to reflect the short-term trend of a single sample data set. In a feasible embodiment of the present application, the median of each sample data in the sample data set can be used as the short-term disturbance state value of the sample data set. In some other embodiments of the present application, the average or mode of each sample data in the sample data set can also be used as the short-term disturbance state value of the sample data set.

[0089] The long-term disturbance state value is used to reflect the long-term trend of the N sample data sets. In a feasible embodiment of the present application, the median of the short-term disturbance state values ​​of the N sample data sets can be used as the long-term disturbance state value. In some other embodiments of the present application, the average or mode of the short-term disturbance state values ​​of the N sample data sets can also be used as the long-term disturbance state value.

[0090] In a feasible embodiment of the present application, for the nth sampling data set, when determining the disturbance weight of the nth sampling data set, it can be set according to how many sampling data sets before the nth sampling data set to determine the long-term disturbance state value. For example, if the currently newly acquired sampling data set is the 10th sampling data set, it can be set to determine the long-term disturbance state value according to the 5th to 10th sampling data sets, or it can be set to determine the long-term disturbance state value according to the 8th to 10th sampling data sets.

[0091] In a feasible embodiment of the present application, determining the disturbance weight of the nth sample data set according to the local disturbance state value and the global disturbance state value of the nth sample data set includes:

[0092] The short-term disturbance state value and the long-term disturbance state value of the n-th sampling data set are processed by the third calculation formula to obtain the disturbance weight of the n-th sampling data set; wherein the third calculation formula is:

[0093]

[0094] Among them, u is the perturbation weight of the nth sample data set, D short is the short-term disturbance state value of the nth sampling data set, D long is the long-term disturbance state value, α is the preset adjustment coefficient, and T is the preset disturbance threshold.

[0095] Specifically, the perturbation degree of the nth sample data set is defined as D, D = |D short -D long |.

[0096] It can be seen that when the difference between the short-term disturbance state value and the long-term disturbance state value is larger, the disturbance degree D of the nth sampling data set is larger, indicating that the change trend of the nth sampling data set is less consistent with the overall change trend of the N sampling data sets. At this time, the smaller the disturbance weight of the nth sampling data set is set, the smaller the impact of the nth sampling data set on the overall data.

[0097] When the difference between the short-term disturbance state value and the long-term disturbance state value is smaller, the disturbance degree D of the nth sampling data set is smaller, indicating that the change trend of the nth sampling data set is more consistent with the overall change trend of the N sampling data sets. At this time, the larger the disturbance weight of the nth sampling data set is set, the greater the impact of the nth sampling data set on the overall data.

[0098] Figure 3 A schematic diagram of a flow chart for determining a disturbance weight in an adaptive filtering method provided in an embodiment of the present application, referring to Figure 3 In S3, the disturbance weight is calculated specifically according to the following process.

[0099] S301: Obtain a sampling data set X = {x1, x2, ..., x m};

[0100] S302: Calculate the short-term disturbance state value D of X short ;

[0101] S303: Calculate the long-term disturbance state value D of X long ;

[0102] S304: Calculate the disturbance weight u of X.

[0103] Through the technical solutions provided in the various embodiments in S3 above, the degree of fit between the change trend of the nth sampling data set and the overall change trend of the N sampling data sets is defined based on the disturbance degree, and a disturbance weight is assigned to the sampling data set based on the disturbance degree of the nth sampling data set, thereby minimizing the impact of global fluctuations on the overall data.

[0104] S4: performing weighted processing on the sampled data in the nth sampled data set according to the density weight of each sampled data in the nth sampled data set and the disturbance weight of the nth sampled data set to obtain a filtering result of the nth sampled data set;

[0105] Specifically, the sampling data in the nth sampling data set are weighted according to the density weight of each sampling data in the nth sampling data set and the disturbance weight of the nth sampling data set. The density weight is used to eliminate the influence of the outliers in the nth sampling data set on the overall data. The disturbance weight is used to reflect the overall fluctuation trend of the nth sampling data set, and corrections are made when the overall fluctuation is large.

[0106] In a feasible embodiment of the present application, the sampling data in the nth sampling data set is weighted according to the density weight of each sampling data in the nth sampling data set and the disturbance weight of the nth sampling data set to obtain the filtering result of the nth sampling data set, including:

[0107] The density weight of each sampling data in the nth sampling data set, the disturbance weight of the nth sampling data set, and each sampling data in the nth sampling data set are processed by the fourth calculation formula to obtain a filtering result; wherein the fourth calculation formula is:

[0108]

[0109] Among them, y is the filtering result of the nth sampling data set.

[0110] Specifically, for multiple sampling data in the nth sampling data set, a corresponding filtering result is obtained, which eliminates the influence of the outliers in the nth sampling data set and realizes global correction, and can comprehensively reflect the multiple sampling data in the nth sampling data set.

[0111] For N sample data sets, N filtering results are obtained after processing, thus realizing the processing of the overall data.

[0112] The method provided in the embodiment of the present application calculates the density weight of each sampling data in the sampling data set, thereby describing the distribution of each sampling data in the sampling data set, focusing on the local data characteristics of the sampling data set; calculates the disturbance weight of the sampling data set, thereby describing the disturbance of the sampling data set relative to the entire sampling data set, focusing on the global data characteristics of the sampling data set. For any sampling data set, the sampling data in the sampling data set are processed based on the density weight and the disturbance weight, the influence of a single outlier in the sampling data set is weakened, and a global correction is performed at the same time, so that the obtained filtering result is more stable and accurate. The technical solution provided by the present application solves the technical problem that the traditional filtering algorithm has poor processing ability for complex sampling data accompanied by short-term fluctuations and long-term trend changes.

[0113] Figure 4 This is a schematic diagram of the overall process of an adaptive filtering method provided in an embodiment of the present application, referring to Figure 4 When an adaptive filtering method provided in an embodiment of the present application is implemented, it specifically includes the following steps:

[0114] S401: Obtain a sampling data set X = {x1, x2, ..., x m};

[0115] S402: Calculate each sample data (x1-x m )’s density weight w i ;

[0116] S403: Calculate the disturbance weight u of the sample data set X;

[0117] S404: According to each sampling data (x1-x m ) and the perturbation weight u of the sampled data set X to calculate the filtering result y.

[0118] It is understandable that in order to improve processing efficiency, e.g. Figure 4 As shown in , when an adaptive filtering method provided by an embodiment of the present application is implemented, S402 and S403 can be performed simultaneously.

[0119] Figure 5 The schematic diagram of the structure of an adaptive filtering device provided in the embodiment of the present application corresponds to the above method embodiment. The embodiment of the present application also provides an adaptive filtering device, referring to Figure 5 , the device comprises:

[0120] The acquisition module 501 is used to acquire N sampling data sets; wherein the nth sampling data set includes sampling data obtained by sampling at the same sampling point at the nth sampling time, N is an integer greater than or equal to 1, and n is an integer less than or equal to N;

[0121] A first determination module 502 is used to determine the density weight of each sample data in the nth sample data set; wherein the density weight is used to describe the distribution of the sample data in the nth sample data set;

[0122] The second determination module 503 is used to determine the disturbance weight of the nth sample data set; wherein the disturbance weight is used to describe the disturbance of the nth sample data set relative to the N sample data sets;

[0123] The processing module 504 is used to perform weighted processing on the sampled data in the nth sampled data set according to the density weight of each sampled data in the nth sampled data set and the disturbance weight of the nth sampled data set to obtain a filtering result of the nth sampled data set.

[0124] In a feasible embodiment of the present application, the first determining module 502 includes:

[0125] A first determining unit, used to determine the data density of each sampling data in the nth sampling data set;

[0126] The second determining unit is used to determine the density weight of each sampling data in the nth sampling data set according to the data density of each sampling data in the nth sampling data set.

[0127] In a feasible embodiment of the present application, the second determining module 503 includes:

[0128] A third determining unit is used to determine the short-term disturbance state value of each sampling data set; wherein the short-term disturbance state value is the median of the sampling data in the sampling data set;

[0129] A fourth determining unit is used to determine the long-term disturbance state value of N sample data sets according to the short-term disturbance state value of each sample data set; wherein the long-term disturbance state value is the median of each short-term disturbance state value;

[0130] The fifth determining unit is used to determine the disturbance weight of the nth sampling data set according to the short-term disturbance state value and the long-term disturbance state value of the nth sampling data set.

[0131] In a feasible embodiment of the present application, the first determining unit includes:

[0132] The first calculation subunit is used to process each sampling data in the nth sampling data set by using a first calculation formula to obtain the data density of each sampling data in the nth sampling data set; wherein the first calculation formula is:

[0133]

[0134] Among them, ρ i is the data density of the ith sampling data in the nth sampling data set, x i is the i-th sample data in the n-th sample data set, x j is the jth sampling data in the nth sampling data set, σ is the standard deviation of all sampling data in the nth sampling data set, e is a natural constant, and M is the total number of sampling data in the nth sampling data set.

[0135] In a feasible embodiment of the present application, the second determining unit includes:

[0136] The second calculation subunit is used to process the data density of each sampling data in the nth sampling data set by using a second calculation formula to obtain the density weight of each sampling data in the nth sampling data set; wherein the second calculation formula is:

[0137]

[0138] Among them, w i is the density weight of the i-th sampling data in the n-th sampling data set.

[0139] In a feasible embodiment of the present application, the fifth determining unit includes:

[0140] The third calculation subunit is used to process the short-term disturbance state value and the long-term disturbance state value of the n-th sampling data set by a third calculation formula to obtain the disturbance weight of the n-th sampling data set; wherein the third calculation formula is:

[0141]

[0142] Among them, u is the perturbation weight of the nth sample data set, D short is the short-term disturbance state value of the nth sampling data set, D long is the long-term disturbance state value, α is the preset adjustment coefficient, and T is the preset disturbance threshold.

[0143] In a feasible embodiment of the present application, the processing module 504 includes:

[0144] A calculation unit is used to process the density weight of each sampling data in the nth sampling data set, the disturbance weight of the nth sampling data set, and each sampling data in the nth sampling data set by a fourth calculation formula to obtain a filtering result; wherein the fourth calculation formula is:

[0145]

[0146] Among them, y is the filtering result of the nth sampling data set.

[0147] like Figure 6 As shown, the embodiment of the present application provides a home appliance, including a processor 601, a communication interface 602, a memory 603 and a communication bus 604, wherein the processor 601, the communication interface 602, and the memory 603 communicate with each other through the communication bus 604.

[0148] Memory 603, used for storing computer programs;

[0149] In one embodiment of the present application, the processor 601 is used to execute a program stored in the memory 603 to implement an adaptive filtering method provided by any of the above method embodiments, for example, including:

[0150] Obtain N sampling data sets; wherein the nth sampling data set includes sampling data obtained by sampling at the same sampling point at the nth sampling time, N is an integer greater than or equal to 1, and n is an integer less than or equal to N;

[0151] Determine the density weight of each sampling data in the nth sampling data set; wherein the density weight is used to describe the distribution of the sampling data in the nth sampling data set;

[0152] Determine a perturbation weight of the nth sample data set; wherein the perturbation weight is used to describe the perturbation of the nth sample data set relative to the N sample data sets;

[0153] The sampling data in the nth sampling data set are weighted according to the density weight of each sampling data in the nth sampling data set and the disturbance weight of the nth sampling data set to obtain a filtering result of the nth sampling data set.

[0154] In some specific examples, the household device may be an air conditioner, refrigerator, dehumidifier, or the like that has data collection requirements.

[0155] An embodiment of the present application further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of an adaptive filtering method provided in any of the aforementioned method embodiments are implemented.

[0156] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0157] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a general hardware platform, and of course, by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0158] It should be understood that the terms used herein are only for the purpose of describing specific example embodiments and are not intended to be limiting. Unless the context clearly indicates otherwise, the singular forms "one", "an" and "said" as used herein may also be meant to include plural forms. The terms "include", "comprise", "contain", and "have" are inclusive, and therefore specify the existence of stated features, steps, operations, elements and / or parts, but do not exclude the existence or addition of one or more other features, steps, operations, elements, parts, and / or combinations thereof. The method steps, processes, and operations described herein are not interpreted as necessarily requiring them to be performed in the specific order described or illustrated, unless the execution order is clearly indicated. It should also be understood that additional or alternative steps may be used.

[0159] The above description is only a specific implementation of the present application, so that those skilled in the art can understand or implement the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest range consistent with the principles and novel features applied for herein.

Claims

1. An adaptive filtering method, characterized in that: The method comprises: Obtain N sampling data sets; wherein the nth sampling data set includes sampling data obtained by sampling at the same sampling point at the nth sampling time, N is an integer greater than or equal to 1, and n is an integer less than or equal to N; Determine the density weight of each of the sampled data in the nth sampled data set; wherein the density weight is used to describe the distribution of the sampled data in the nth sampled data set; Determining a disturbance weight of the nth sample data set; wherein the disturbance weight is used to describe the disturbance of the nth sample data set relative to the N sample data sets; The sampling data in the nth sampling data set are weighted according to the density weight of each sampling data in the nth sampling data set and the disturbance weight of the nth sampling data set to obtain a filtering result of the nth sampling data set.

2. The method according to claim 1, characterized in that Determining the density weight of each of the sampling data in the nth sampling data set includes: Determine the data density of each of the sampling data in the nth sampling data set; The density weight of each of the sampling data in the nth sampling data set is determined according to the data density of each of the sampling data in the nth sampling data set.

3. The method according to claim 1, characterized in that: Determining the disturbance weight of the nth sampling data set includes: Determine a short-term disturbance state value of each of the sample data sets; wherein the short-term disturbance state value is the median of the sample data in the sample data set; Determining the long-term disturbance state value of the N sample data sets according to the short-term disturbance state value of each sample data set; wherein the long-term disturbance state value is the median of each short-term disturbance state value; The disturbance weight of the nth sampling data set is determined according to the short-term disturbance state value and the long-term disturbance state value of the nth sampling data set.

4. The method according to claim 2, characterized in that: Determining the data density of each of the sampling data in the nth sampling data set includes: The data density of each of the sampling data in the nth sampling data set is obtained by processing each of the sampling data in the nth sampling data set using a first calculation formula; wherein the first calculation formula is: Among them, ρ i is the data density of the i-th sample data in the n-th sample data set, x i is the i-th sample data in the n-th sample data set, x j is the jth sampling data in the nth sampling data set, σ is the standard deviation of all the sampling data in the nth sampling data set, e is a natural constant, and M is the total number of the sampling data in the nth sampling data set.

5. The method according to claim 4, characterized in that Determining the density weight of each of the sampling data in the nth sampling data set according to the data density of each of the sampling data in the nth sampling data set includes: The data density of each of the sampling data in the nth sampling data set is processed by a second calculation formula to obtain the density weight of each of the sampling data in the nth sampling data set; wherein the second calculation formula is: Among them, w i is the density weight of the ith sampling data in the nth sampling data set.

6. The method according to claim 3, characterized in that Determining the disturbance weight of the nth sampling data set according to the local disturbance state value and the global disturbance state value of the nth sampling data set comprises: The short-term disturbance state value and the long-term disturbance state value of the n-th sampling data set are processed by a third calculation formula to obtain the disturbance weight of the n-th sampling data set; wherein the third calculation formula is: Wherein, u is the perturbation weight of the nth sample data set, D short is the short-term disturbance state value of the nth sampling data set, D long is the long-term disturbance state value, α is the preset adjustment coefficient, and T is the preset disturbance degree threshold.

7. The method according to any one of claims 2 or 3, characterized in that: The sampling data in the nth sampling data set are weighted according to the density weight of each sampling data in the nth sampling data set and the disturbance weight of the nth sampling data set to obtain a filtering result of the nth sampling data set, including: The density weight of each of the sampling data in the nth sampling data set, the disturbance weight of the nth sampling data set, and each of the sampling data in the nth sampling data set are processed by a fourth calculation formula to obtain the filtering result; wherein the fourth calculation formula is: Wherein, y is the filtering result of the nth sampling data set.

8. An adaptive filtering device, characterized in that: The device comprises: An acquisition module is used to acquire N sampling data sets; wherein the nth sampling data set includes sampling data obtained by sampling at the same sampling point at the nth sampling time, and N is an integer greater than or equal to 1; A first determination module is used to determine the density weight of each of the sampled data in the nth sampled data set; wherein the density weight is used to describe the distribution of the sampled data in the nth sampled data set; A second determination module is used to determine a disturbance weight of the nth sample data set; wherein the disturbance weight is used to describe the disturbance of the nth sample data set relative to the N sample data sets; A processing module is used to perform weighted processing on the sampling data in the nth sampling data set according to the density weight of each sampling data in the nth sampling data set and the disturbance weight of the nth sampling data set to obtain a filtering result of the nth sampling data set.

9. A household appliance, characterized in that: include: at least one communication interface; at least one bus connected to the at least one communication interface; at least one processor coupled to the at least one bus; At least one memory connected to the at least one bus, wherein the processor is configured to implement an adaptive filtering method as described in any one of claims 1-7.

10. A computer storage medium, characterized in that: Computer executable instructions are stored, and the computer executable instructions are used to execute an adaptive filtering method as described in any one of claims 1-7.