A data acquisition method for Internet of Things data

By performing segmentation and adaptive fitting of IoT data sequences and adjusting the fitting parameters according to the fluctuation degree and continuity of each segment, the problem of poor fitting effect in traditional methods is solved, and more efficient polynomial filtering is achieved.

CN120151375BActive Publication Date: 2025-07-22INSPUR SMART SUPPLY CHAIN TECH (SHANDONG) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510614566.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-05-14
Publication Date
2025-07-22
Estimated Expiration
2045-05-14

AI Technical Summary

Technical Problem

The traditional polynomial smoothing filtering method sets a globally fixed polynomial order in the IoT data sequence, resulting in poor fitting effect of data segments with large fluctuations or overfitting data segments with small fluctuations, resulting in poor overall fitting filtering effect.

Method used

The IoT data sequence is segmented, and the number of fits and fit weights are obtained according to the core fluctuation degree of each segment and the continuity of adjacent segments are adaptively obtained. Each segment of data is fitted through the weighted least squares method to achieve polynomial filtering.

Benefits of technology

It improves the polynomial filtering effect of IoT data sequences, ensures that the fit of each segment of data conforms to its fluctuation characteristics and maintains continuity between segments, and improves the accuracy of data filtering.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120151375B_ABST
    Figure CN120151375B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of data processing. More specifically, the present invention relates to a data acquisition method for Internet of Things data. The method includes collecting each Internet of Things data sequence and segmenting it to obtain the core fluctuation degree of each segment of each Internet of Things data sequence; based on the core fluctuation degree, obtaining the fitting times of each segment of each Internet of Things data sequence; obtaining the continuity of adjacent segments in each Internet of Things data sequence; according to the continuity, obtaining the final fitting weight of each data in each segment of each Internet of Things data sequence, and according to the final fitting weight and the fitting times, performing polynomial fitting on the data in each segment of each Internet of Things data sequence to obtain the polynomial of each segment, and based on the polynomial, performing polynomial filtering on each segment of each Internet of Things data sequence. The present invention improves the accuracy of data filtering.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing. More specifically, the present invention relates to a data acquisition method for Internet of Things (IoT) data. Background Art

[0002] In traditional industrial scenarios, enterprises generally face problems such as data islands (e.g., the separation of production data and management data) and the lack of intelligent top-level design. For example, although industrial devices can collect operation data through sensors, due to poor protocol compatibility and insufficient data processing capabilities, the quality of the collected data is difficult to guarantee, which poses an obstacle to subsequent data processing. Therefore, it is necessary to perform filtering processing on the operation data of the collected industrial devices.

[0003] In the process of filtering and cleaning IoT data sequences using polynomial smoothing filtering, usually a globally fixed polynomial order is set for local polynomial fitting of the IoT data sequences. Due to the different states of IoT data, that is, there are data segments with large fluctuations and data segments with small fluctuations in the IoT data sequence. Therefore, setting a globally fixed polynomial order for local polynomial fitting in polynomial smoothing filtering will result in that the data segments with large fluctuations cannot achieve a proper fitting effect, while the data segments with small fluctuations are prone to overfitting, resulting in a poor overall fitting and filtering effect of the IoT data sequence. Summary of the Invention

[0004] In order to solve the problem that when polynomial smoothing filtering sets a globally fixed polynomial order for local polynomial fitting, it may cause that the data segments with large fluctuations cannot achieve a proper fitting effect or the data segments with small fluctuations are prone to overfitting, the present invention proposes a data acquisition method for IoT data, and the method includes the following steps:

[0005] Collect each IoT data sequence; segment each IoT data sequence; obtain the core fluctuation degree of each segment of each IoT data sequence; based on the core fluctuation degree, obtain the fitting times of each segment of each IoT data sequence;

[0006] Obtain the adjacent data segments of each segment in adjacent segments of each IoT data sequence; obtain the average weighted slope of the adjacent data segments of each segment in adjacent segments of each IoT data sequence; according to the difference between the average weighted slopes of the adjacent data segments of two segments in adjacent segments, obtain the continuity of adjacent segments of each IoT data sequence;

[0007] According to the continuity, obtain the fitting weight of each data in each segment of each Internet of Things data sequence; according to the fitting weight, obtain the final fitting weight of each data in each segment of each Internet of Things data sequence; according to the final fitting weight and the number of fitting times, perform weighted least squares fitting on the data in each segment of each Internet of Things data sequence to obtain the polynomial of each segment of each Internet of Things data sequence; based on the polynomial, perform polynomial filtering on each segment of each Internet of Things data sequence to obtain the filtered Internet of Things data sequence for each item.

[0008] The innovation of the present invention lies in dividing each Internet of Things data sequence into several segments, which is convenient for subsequent separate fitting of the data in each segment, and can take into account the fluctuation situation of the data in each segment; by analyzing the fluctuation situation of the data in each segment of each Internet of Things data sequence, the core fluctuation degree of each segment of each Internet of Things data sequence is obtained; based on the core fluctuation degree, the number of fitting times of each segment of each Internet of Things data sequence is adaptively obtained, so that when performing polynomial fitting on each segment subsequently, the fluctuation situation of the data in each segment can be taken into account; then when the present invention performs fitting on each segment, it analyzes the continuity between adjacent segments to obtain the final fitting weight of each data in each segment of each Internet of Things data sequence, so that the continuity can be maintained after fitting between segments. Finally, according to the final fitting weight and the number of fitting times, weighted least squares fitting is performed on the data in each segment to obtain the polynomial of each segment of each Internet of Things data sequence for polynomial filtering, improving the filtering effect.

[0009] Preferably, the segmentation of each Internet of Things data sequence includes:

[0010] Preset the minimum length L of the data segment, and form a data segment with the L data before and after each data in the j-th Internet of Things data sequence as the adjacent data segment of each data in the j-th Internet of Things data sequence. According to the adjacent data segments of each data in the j-th Internet of Things data sequence, obtain the coefficient of variation of each data in the j-th Internet of Things data sequence;

[0011] Preset the difference threshold T. If the absolute value of the difference between the coefficients of variation of any two adjacent data in the j-th Internet of Things data sequence is greater than the difference threshold T, one of the data is recorded as a segmentation point to obtain multiple segmentation points in the j-th Internet of Things data sequence. According to the multiple segmentation points in the j-th Internet of Things data sequence, divide the j-th Internet of Things data sequence into several segments.

[0012] It is convenient for subsequent analysis of the fluctuation situation of the data in each segment to obtain the number of fitting times of each segment.

[0013] Preferably, the obtaining of the core fluctuation degree of each segment of each Internet of Things data sequence includes:

[0014] ;

[0015] wherein, represents the core fluctuation degree of the k-th segment of the j-th Internet of Things data sequence; represents the number of data in the k-th segment of the j-th Internet of Things data sequence; represents the index of the m-th data in the k-th segment of the j-th Internet of Things data sequence; represents the mean value of all data in the k-th segment of the j-th Internet of Things data sequence; represents the value of the m-th data in the k-th segment of the j-th Internet of Things data sequence; exp() represents the exponential function with the natural constant as the base; || represents the absolute value symbol.

[0016] It is convenient to adaptively obtain the fitting times of each segment of each Internet of Things data sequence according to the core fluctuation degree of each segment.

[0017] Preferably, the obtaining of the fitting times of each segment of each Internet of Things data sequence includes:

[0018] ;

[0019] wherein, represents the fitting times of the k-th segment of the j-th Internet of Things data sequence; represents the core fluctuation degree of the k-th segment of the j-th Internet of Things data sequence; represents the minimum value among the core fluctuation degrees of all segments of the j-th Internet of Things data sequence; represents the logarithmic function with 2 as the base.

[0020] Preferably, the obtaining of the adjacent data segments of each segment in the adjacent segments of each Internet of Things data sequence includes:

[0021] For the j-th Internet of Things data sequence, the k-th segment and the (k + 1)-th segment are adjacent segments. Denote the number of all data in the k-th segment as a, and denote the downward integer value of the product of 0.5 and a as b. Denote the data segment formed by the last data in the k-th segment and the previous b data as the adjacent data segment of the k-th segment; Denote the number of all data in the (k + 1)-th segment as c, and denote the downward integer value of the product of 0.5 and c as d; Denote the data segment formed by the first data in the (k + 1)-th segment and the d-th data as the adjacent data segment of the (k + 1)-th segment.

[0022] Preferably, the obtaining of the average weighted slope of the adjacent data segments of each segment in the adjacent segments of each Internet of Things data sequence includes:

[0023] ;

[0024] In the formula, represents the average weighted slope of the adjacent data segments of the k-th segment; represents the index difference of the x-th data in the adjacent data segments of the k-th segment; represents the number of all data in the adjacent data segments of the k-th segment; represents the value of the x-th data in the adjacent data segments of the k-th segment; represents the value of the (x - 1)-th data in the adjacent data segments of the k-th segment; exp() represents the exponential function with the natural constant as the base; According to the method for obtaining the average weighted slope of the adjacent data segments of the k-th segment, obtain the average weighted slope of the adjacent data segments of the (k + 1)-th segment.

[0025] It is convenient to subsequently obtain the continuity of adjacent segments in each item of the Internet of Things data sequence according to the difference in the average weighted slopes of the adjacent data segments of adjacent segments.

[0026] Preferably, the obtaining of the continuity of adjacent segments in each item of the Internet of Things data sequence includes:

[0027] ;

[0028] In the formula, represents the continuity of the -th segment and the -th segment of the j-th item of the Internet of Things data sequence; represents the average value of all data in the adjacent data segments of the -th segment; represents the average value of all data in the adjacent data segments of the -th segment; represents the average weighted slope of the adjacent data segments of the -th segment; represents the average weighted slope of the adjacent data segments of the -th segment; represents taking the absolute value; exp() represents the exponential function with the natural constant as the base.

[0029] It is convenient to subsequently adaptively obtain the fitting weight of each data in each segment of each item of the Internet of Things data sequence according to the continuity of adjacent segments.

[0030] Preferably, the obtaining of the fitting weight of each data in each segment of each item of the Internet of Things data sequence includes:

[0031] ;

[0032] In the formula, represents the fitting weight of the m-th data in the k-th segment of the j-th item of the Internet of Things data sequence; represents the number of data in the k-th segment of the j-th Internet of Things data sequence; represents the index of the m-th data in the k-th segment of the j-th Internet of Things data sequence; represents the standard deviation of the data in the k-th segment of the j-th Internet of Things data sequence; represents the continuity between the k-th segment and the (k + 1)-th segment of the j-th Internet of Things data sequence; represents the continuity between the k-th segment and the (k - 1)-th segment of the j-th Internet of Things data sequence.

[0033] Preferably, obtaining the final fitting weight of each data in each segment of each Internet of Things data sequence includes:

[0034] ;

[0035] In the formula, represents the final fitting weight of the m-th data in the k-th segment of the j-th Internet of Things data sequence; represents the fitting weight of the m-th data in the k-th segment of the j-th Internet of Things data sequence; represents the number of data in the k-th segment of the j-th Internet of Things data sequence.

[0036] Preferably, collecting each Internet of Things data sequence includes:

[0037] Collect each piece of Internet of Things data in the past month from the database. Each piece of Internet of Things data contains several items of data, namely the current data, voltage data, and vibration data of the device at each sampling time in the Internet of Things; arrange each item of data of all the collected Internet of Things data in the order of sampling time, and obtain each Internet of Things data sequence.

[0038] The present invention has the following beneficial effects: The object of the present invention is to divide each Internet of Things data sequence into several segments, which is convenient for subsequently fitting the data in each segment separately, and the fluctuations of the data in each segment can be taken into account; by analyzing the fluctuations of the data in each segment of each Internet of Things data sequence, the core fluctuation degree of each segment of each Internet of Things data sequence is obtained; based on the core fluctuation degree, the fitting times of each segment of each Internet of Things data sequence are adaptively obtained, so that when performing polynomial fitting on each segment subsequently, the fluctuations of the data in each segment can be considered; then when the present invention fits each segment, the continuity between adjacent segments is analyzed to obtain the final fitting weight of each data in each segment of each Internet of Things data sequence, so that the continuity can be maintained after fitting between segments, and finally, according to the final fitting weight and the fitting times, the data in each segment is fitted by weighted least squares to obtain the polynomial of each segment of each Internet of Things data sequence for polynomial filtering, improving the filtering effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] By referring to the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the drawings, several embodiments of the present invention are shown by way of example and not limitation, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:

[0040] Figure 1 is a flowchart of the steps of a data acquisition method for Internet of Things data according to an embodiment of the present invention;

[0041] Figure 2 is a schematic diagram of an adjacent data segment of adjacent segments. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0042] The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0043] The following will describe in detail the specific embodiments of the present invention with reference to the accompanying drawings.

[0044] Please refer to Figure 1 , which shows a flowchart of the steps of a data acquisition method for Internet of Things data provided by an embodiment of the present invention. The method includes the following steps:

[0045] S001. Collect each Internet of Things data sequence.

[0046] In an embodiment of the present invention, each piece of Internet of Things data in the past month is collected from a database. Each piece of Internet of Things data includes several items of data, that is, each piece of Internet of Things data includes the current data, voltage data, and vibration data of the device at each sampling time in the Internet of Things.

[0047] Arrange each item of data of all the collected Internet of Things data in the order of sampling time, so as to construct each item of Internet of Things data sequence.

[0048] S002. Segment each item of Internet of Things data sequence to obtain the core fluctuation degree of each segment of each item of Internet of Things data sequence; based on the core fluctuation degree, obtain the fitting times of each segment of each item of Internet of Things data sequence.

[0049] It should be noted that in the process of filtering and cleaning the Internet of Things data sequence by polynomial smoothing filtering, due to the different states of the Internet of Things data, if a globally fixed polynomial order is set for polynomial smoothing filtering for local polynomial fitting, it will cause data segments with a large fluctuation degree to fail to achieve a proper fitting effect, while data segments with a small fluctuation degree are prone to overfitting, resulting in a poor overall fitting and filtering effect of the Internet of Things data sequence. Therefore, the present invention first segments each item of Internet of Things data sequence, analyzes the fluctuation of the data in each segment of each item of Internet of Things data sequence, obtains the fitting times of each segment of each item of Internet of Things data sequence, considers the fluctuation situation of the data in the segment, then obtains the fitting weight of each data in each segment according to the continuity between segments, and finally uses the least squares method to perform polynomial fitting on the data in each segment according to the fitting times of each segment and the fitting weight of each data in each segment.

[0050] It should be further noted that first, obtain the adjacent data segments of each data in each item of Internet of Things data sequence. According to the adjacent data segments, obtain the coefficient of variation of each data in each item of Internet of Things data sequence. If the difference in the coefficients of variation of adjacent data in the Internet of Things data sequence is larger, it means that there are significant changes in the fluctuation of the surrounding data of the adjacent data, that is, the characteristics of the data have changed significantly. At this time, it is more appropriate to divide the adjacent data. Therefore, each item of Internet of Things data sequence is segmented according to this feature.

[0051] In an embodiment of the present invention, the minimum length L of the preset data segment is 50. In other embodiments, the implementer can preset the value of the minimum length L of the data segment according to the specific implementation situation.

[0052] The process of segmenting each item of Internet of Things data sequence is as follows:

[0053] For each data in the j-th Internet of Things data sequence, the data segment composed of the L data before and after it is used as the adjacent data segment of each data in the j-th Internet of Things data sequence. According to the adjacent data segments of each data in the j-th Internet of Things data sequence, the coefficient of variation of each data in the j-th Internet of Things data sequence is obtained.

[0054] It should be noted that the method for obtaining the coefficient of variation is a well-known technology, and in the embodiments of the present invention, it will not be elaborated too much.

[0055] A preset difference threshold T = 0.3. If the absolute value of the difference between the coefficients of variation of any two adjacent data in the j-th Internet of Things data sequence is greater than the difference threshold T, one of the data is recorded as a segmentation point, and multiple segmentation points in the j-th Internet of Things data sequence are obtained. According to the multiple segmentation points in the j-th Internet of Things data sequence, the j-th Internet of Things data sequence is divided into several segments.

[0056] Similarly, each Internet of Things data sequence is divided into several segments.

[0057] It should be noted that if the data in any segment of any Internet of Things data sequence fluctuates more, then the number of fitting times required for this segment is larger to satisfy the accurate fitting of its fluctuating part. Therefore, in the present invention, the data fluctuation in this segment of this Internet of Things data sequence is analyzed to obtain the core fluctuation degree of this segment of this Internet of Things data sequence, and then the number of fitting times of this segment of this Internet of Things data sequence is adaptively obtained.

[0058] If the difference between the value of each data in the segment and the mean value of all data is larger, it indicates that the core fluctuation degree of the segment is larger. Also, since the edges between segments need to maintain continuity during the fitting of data segments, the determination of the number of fitting times should be mainly based on the fluctuation of the data near the middle in the segment. Because the difference between the value of each data and the mean value of all data is corrected according to the degree of each data approaching the middle. If the degree of a data approaching the middle is larger, then more attention is paid to the difference between the value of this data and the mean value of all data.

[0059] In the embodiments of the present invention, the core fluctuation degree of each segment of each Internet of Things data sequence is obtained:

[0060] ;

[0061] In the formula, represents the core fluctuation degree of the k-th segment of the j-th Internet of Things data sequence; represents the number of data in the k-th segment of the j-th Internet of Things data sequence; represents the index of the m-th data in the k-th segment of the j-th Internet of Things data sequence; represents the mean of all data in the k-th segment of the j-th Internet of Things data sequence; represents the value of the m-th data in the k-th segment of the j-th Internet of Things data sequence; exp() represents the exponential function with the natural constant as the base; || represents the absolute value symbol; The larger the value of, the greater the core fluctuation degree of the k-th segment of the j-th Internet of Things data sequence;

[0062] The larger the value of, the greater the degree that the m-th data in the k-th segment of the j-th Internet of Things data sequence is close to the middle. At this time, more attention should be paid to the difference between the m-th data and the mean of all data in the k-th segment.

[0063] Obtain the fitting times of each segment of each Internet of Things data sequence:

[0064] ;

[0065] In the formula, represents the fitting times of the k-th segment of the j-th Internet of Things data sequence; represents the core fluctuation degree of the k-th segment of the j-th Internet of Things data sequence; represents the minimum value among the core fluctuation degrees of all segments of the j-th Internet of Things data sequence; Since the greater the core fluctuation degree of the k-th segment of the j-th Internet of Things data sequence, the greater the fitting times of the k-th segment of the j-th Internet of Things data sequence are required to meet the accurate fitting of its fluctuating part.

[0066] S003. Obtain the average weighted slope of the adjacent data segments of each segment in each Internet of Things data sequence. According to the difference between the average weighted slopes of the adjacent data segments of two segments in the adjacent segments and the difference in the data values in the adjacent data segments, obtain the continuity of the adjacent segments in each Internet of Things data sequence; According to the continuity, obtain the final fitting weight of each data in each segment of each Internet of Things data sequence.

[0067] It should be noted that when fitting each segment in each Internet of Things data sequence, the adjacent data segments between adjacent segments should be kept continuous as much as possible. If the continuity of the adjacent data segments between adjacent segments is poor, it means that the change trends of the adjacent data segments between adjacent segments are inconsistent. Then, when fitting the segments, it is necessary to set lower fitting weights for the data at the adjacent data segments of the segments (that is, the edge data), so that the edge data of the segments with low continuity are allowed to have higher errors, so that the continuity between the segments is ensured as much as possible after fitting. Therefore, the present invention needs to first obtain the adjacent data segments of two adjacent segments, then obtain the continuity of the two adjacent segments according to the difference between the adjacent data segments of the two adjacent segments, and finally set appropriate fitting weights for the data in the segments according to the continuity of the two adjacent segments;

[0068] First, it is necessary to obtain the adjacent data segments of two adjacent segments. The schematic diagram of the adjacent data segments is as shown in Figure 2 Figure. If data segment 1 is adjacent to data segment 2, then the adjacent data segment of data segment 1 and the adjacent data segment in data segment 2 are the data in the green box in Figure 2 Figure.

[0069] In the embodiment of the present invention, for the k-th segment and the (k + 1)-th segment of the j-th item of Internet of Things data sequence, the number of all data in the k-th segment is denoted as a, the downward rounded value of the product between 0.5 and a is denoted as b, and the data segment formed by the last data in the k-th segment and the previous b data is denoted as the adjacent data segment of the k-th segment; the number of all data in the (k + 1)-th segment is denoted as c, and the downward rounded value of the product between 0.5 and c is denoted as d; the data segment formed by the first data in the (k + 1)-th segment and the d-th data is denoted as the adjacent data segment of the (k + 1)-th segment;

[0070] It should be noted that when analyzing the continuity of adjacent segments, first, it is necessary to analyze the change trend of the data values in the adjacent data segments of each segment in the adjacent segments, obtain the average weighted slope of the adjacent data segments of each segment in the adjacent segments, and use the weighted method in the calculation. If the data in the neighborhood data segment of one segment in the adjacent segments is closer to another segment, a greater weight is assigned to this data.

[0071] In the embodiment of the present invention, for any data in the adjacent data segment of the k-th segment of the j-th item of Internet of Things data sequence, the absolute value of the difference between the index value of the data and the total number of data in the k-th segment is denoted as the index difference of the data; for any data in the adjacent data segment of the (k + 1)-th segment, the absolute value of the difference between the index value of the data and 1 is denoted as the index difference of the data; it should be noted that the k-th segment and the (k + 1)-th segment of the j-th item of Internet of Things data sequence are adjacent segments;

[0072] Obtain the average weighted slope of the adjacent data segment of the k-th segment:

[0073] ;

[0074] In the formula, represents the average weighted slope of the adjacent data segment of the k-th segment; represents the index difference of the x-th data in the adjacent data segment of the k-th segment; represents the number of all data in the adjacent data segment of the k-th segment; represents the value of the x-th data in the adjacent data segment of the k-th segment; represents the value of the (x - 1)-th data in the adjacent data segment of the k-th segment; exp() represents the exponential function with the natural constant as the base;

[0075] The value represents the difference between the x-th data and the (x - 1)-th data in the adjacent data segment of the k-th segment, representing the slope between adjacent data in the adjacent data segment; It represents the inverse proportional value of the index difference of the x-th data in the adjacent data segment of the k-th segment. The larger its value, the closer the x-th data in the adjacent data segment of the k-th segment is to the (k + 1)-th segment. At this time, more attention should be paid to the difference between the x-th data and the (x - 1)-th data in the adjacent data segment of the k-th segment. Therefore, after weighted summation of the slopes between adjacent data according to the index difference, the average weighted slope of the neighborhood data segment is obtained.

[0076] Similarly, the average weighted slope of the adjacent data segment of the (k + 1)-th segment is obtained by the above method.

[0077] It should be noted that when the difference in the average weighted slope between the adjacent data segments of adjacent segments is smaller, it indicates that the continuity of adjacent segments is greater. And when the difference in the average value of all data in the adjacent data segments of adjacent segments is smaller, it indicates that the continuity of adjacent segments is greater. Therefore, the present invention obtains the continuity of adjacent segments according to the difference in the average value of all data in the adjacent data segments of adjacent segments and the difference in the average weighted slope between the adjacent data segments of adjacent segments.

[0078] In the embodiment of the present invention, the continuity between the k-th segment and the (k + 1)-th segment of the j-th item of Internet of Things data sequence is obtained:

[0079] ;

[0080] In the formula, represents the continuity between the -th segment and the -th segment of the j-th item of Internet of Things data sequence; represents the average value of all data in the adjacent data segment of the -th segment; represents the average value of all data in the adjacent data segment of the -th segment; represents the average weighted slope of the adjacent data segment of the -th segment; represents the average weighted slope of the adjacent data segment of the -th segment; represents taking the absolute value; exp() represents the exponential function with the natural constant as the base; When the value of

[0081] It should be noted that when fitting each segment in each Internet of Things data sequence, the fitting weight of each data is obtained according to the position of each data in the segment. Generally, the fitting weight of the middle data in the segment is larger, and the fitting weight of the edge data in the segment is smaller. However, in order to ensure the continuity between segments after fitting, it is necessary to combine the continuity of adjacent segments to obtain the fitting weight of the data in each segment, so that the fitting weight of the middle data in the segment with poor continuity is even larger and the fitting weight of the edge data is even smaller.

[0082] If the continuity of any segment in any Internet of Things data sequence with its two adjacent segments is poor, it is necessary to set a larger fitting weight for the middle data of the segment and a lower fitting weight for the edge data of the segment, so that the edge data of the segment with low continuity is allowed to have a higher error, and the continuity between segments is ensured as much as possible after fitting. If the continuity of the segment with its two adjacent segments is good, then fitting is performed with a more average fitting weight.

[0083] In the embodiment of the present invention, the fitting weight of the m-th data in the k-th segment of the j-th Internet of Things data sequence is obtained:

[0084] ;

[0085] In the formula, represents the fitting weight of the m-th data in the k-th segment of the j-th Internet of Things data sequence; represents the number of data in the k-th segment of the j-th Internet of Things data sequence; represents the index of the m-th data in the k-th segment of the j-th Internet of Things data sequence; represents the standard deviation of the data in the k-th segment of the j-th Internet of Things data sequence; represents the continuity between the k-th segment and the (k + 1)-th segment of the j-th Internet of Things data sequence; represents the continuity between the k-th segment and the (k - 1)-th segment of the j-th Internet of Things data sequence;

[0086] represents the position situation of the m-th data in the k-th segment of the j-th Internet of Things data sequence. The larger its value, the more the position of the m-th data is at the edge of the k-th segment, and the smaller its value, the more the position of the m-th data is in the middle of the k-th segment;

[0087] It is known that the smaller the value of, the smaller the continuity between the k-th segment of the j-th Internet of Things data sequence and its two adjacent segments. At this time, is adjusted smaller, so that The value is large. At this time, the fitting weight of the middle data of the k-th segment needs to be set larger and the fitting weight of the edge data of the k-th segment needs to be set lower. Therefore, if the position of the m-th data in the k-th segment is at the edge of the k-th segment, it can be based on The value is adjusted larger, making the value larger, then the value is smaller; if the position of the m-th data in the k-th segment is at the middle of the k-th segment, according to The value is adjusted less, making the value change little, then the value is larger;

[0088] It is known that the larger the value, the greater the continuity between the k-th segment of the j-th item of IoT data sequence and its two adjacent segments. At this time, is adjusted larger, making the value smaller. Therefore, if the position of the m-th data in the k-th segment is at the edge of the k-th segment, it can be based on The value is adjusted smaller, making the value smaller; if the position of the m-th data in the k-th segment is at the middle of the k-th segment, according to The value is adjusted smaller, making the value smaller. Therefore, for the data in the segment with greater continuity, the fitting weights of the data in the segment can be adjusted more towards being average according to the continuity.

[0089] Obtain the final fitting weight of the m-th data in the k-th segment of the j-th item of IoT data sequence:

[0090] ;

[0091] In the formula, represents the final fitting weight of the m-th data in the k-th segment of the j-th item of IoT data sequence; represents the fitting weight of the m-th data in the k-th segment of the j-th item of IoT data sequence; represents the number of data in the k-th segment of the j-th item of IoT data sequence; is used to normalize the value.

[0092] S004. According to the final fitting weight of each data in each segment of each Internet of Things data sequence and the fitting times of each segment of each Internet of Things data sequence, perform polynomial fitting on the data in each segment of each Internet of Things data sequence to obtain the polynomial of each segment of each Internet of Things data sequence, and based on the polynomial, perform polynomial filtering on each segment of each Internet of Things data sequence.

[0093] It should be noted that in the present invention, the fitting times of each segment are obtained through the fluctuation of the data in each segment of each Internet of Things data sequence, and the final fitting weight of each data in each segment is confirmed by analyzing the continuity between adjacent segments. Therefore, then, according to the final fitting weight of each data in each segment of each Internet of Things data sequence and the fitting times of each segment of each Internet of Things data sequence, perform fitting on the data in each segment of each Internet of Things data sequence.

[0094] In the embodiment of the present invention, according to the final fitting weight of each data in each segment of each Internet of Things data sequence and the fitting times of each segment of each Internet of Things data sequence, perform weighted least squares fitting on each segment of each Internet of Things data sequence to obtain the polynomial of each segment of each Internet of Things data sequence;

[0095] According to the polynomial of each segment of each Internet of Things data sequence, perform polynomial filtering on each segment of each Internet of Things data sequence to obtain each Internet of Things data sequence after filtering.

[0096] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the principles of the present invention shall be included within the protection scope of the present invention.

Claims

1. A data acquisition method for Internet of Things data, characterized in that Including: Collect each Internet of Things data sequence; Segment each Internet of Things data sequence; Obtain the core fluctuation degree of each segment of each Internet of Things data sequence, including: ; Wherein, represents the core fluctuation degree of the k-th segment of the j-th Internet of Things data sequence; represents the number of data in the k-th segment of the j-th Internet of Things data sequence; represents the index of the m-th data in the k-th segment of the j-th Internet of Things data sequence; represents the mean value of all data in the k-th segment of the j-th Internet of Things data sequence; represents the value of the m-th data in the k-th segment of the j-th Internet of Things data sequence; exp() represents the exponential function with the natural constant as the base; || represents the absolute value symbol; based on the core fluctuation degree, the fitting times of each segment of each Internet of Things data sequence are obtained; Obtain the adjacent data segments of each segment in the adjacent segments of each Internet of Things data sequence; obtain the average weighted slope of the adjacent data segments of each segment in the adjacent segments of each Internet of Things data sequence; obtain the continuity of the adjacent segments in each Internet of Things data sequence according to the difference between the average weighted slopes of the adjacent data segments of two segments in the adjacent segments; Obtain the fitting weight of each data in each segment of each Internet of Things data sequence according to the continuity; obtain the final fitting weight of each data in each segment of each Internet of Things data sequence according to the fitting weight; perform weighted least squares fitting on the data in each segment of each Internet of Things data sequence according to the final fitting weight and the number of fitting times to obtain the polynomial of each segment of each Internet of Things data sequence; perform polynomial filtering on each segment of each Internet of Things data sequence based on the polynomial to obtain the filtered Internet of Things data sequence of each item.

2. The data acquisition method for Internet of Things data according to claim 1, wherein The segmenting of each Internet of Things data sequence includes: Preset the minimum length L of the data segment, and form a data segment with the L data before and after each data in the j-th Internet of Things data sequence as the adjacent data segment of each data in the j-th Internet of Things data sequence. Obtain the coefficient of variation of each data in the j-th Internet of Things data sequence according to the adjacent data segment of each data in the j-th Internet of Things data sequence; Preset the difference threshold T. If the absolute value of the difference between the coefficients of variation of any two adjacent data in the j-th Internet of Things data sequence is greater than the difference threshold T, record one of the data as the segmentation point to obtain multiple segmentation points in the j-th Internet of Things data sequence. Divide the j-th Internet of Things data sequence into several segments according to the multiple segmentation points in the j-th Internet of Things data sequence.

3. The data acquisition method for Internet of Things data according to claim 1, characterized in that, The obtaining of the number of fitting times of each segment of each Internet of Things data sequence includes: ; In the formula, represents the fitting times of the k-th segment of the j-th IoT data sequence; represents the core fluctuation degree of the k-th segment of the j-th IoT data sequence; represents the minimum value among the core fluctuation degrees of all segments of the j-th IoT data sequence; represents the logarithmic function with base 2.

4. The data acquisition method for Internet of Things data according to claim 1, characterized in that, The obtaining of the adjacent data segments of each segment in the adjacent segments of each Internet of Things data sequence includes: For the k-th segment and the (k + 1)-th segment of the j-th Internet of Things data sequence as adjacent segments, record the number of all data in the k-th segment as a, record the downward rounded value of the product between 0.5 and a as b, and record the data segment formed by the last data in the k-th segment and the previous b data as the adjacent data segment of the k-th segment; record the number of all data in the (k + 1)-th segment as c, and record the downward rounded value of the product between 0.5 and c as d; record the data segment formed by the first data in the (k + 1)-th segment and the d-th data as the adjacent data segment of the (k + 1)-th segment.

5. The data acquisition method for Internet of Things data according to claim 1, characterized in that The obtaining of the average weighted slope of the adjacent data segments of each segment in the adjacent segments of each Internet of Things data sequence includes: ; In the formula, represents the average weighted slope of the adjacent data segment of the k-th segment; represents the index difference of the x-th data in the adjacent data segment of the k-th segment; represents the number of all data in the adjacent data segment of the k-th segment; represents the value of the x-th data in the adjacent data segment of the k-th segment; represents the value of the (x - 1)-th data in the adjacent data segment of the k-th segment; exp() represents the exponential function with the natural constant as the base; according to the method for obtaining the average weighted slope of the adjacent data segment of the k-th segment, obtain the average weighted slope of the adjacent data segment of the (k + 1)-th segment.

6. The data acquisition method for Internet of Things data according to claim 1, wherein The obtaining of the continuity of the adjacent segments in each Internet of Things data sequence includes: ; In the formula, represents the continuity between the th segment and the th segment of the j-th IoT data sequence; represents the average value of all data in the adjacent data segment of the th segment; represents the average value of all data in the adjacent data segment of the th segment; represents the average weighted slope of the adjacent data segment of the th segment; represents the average weighted slope of the adjacent data segment of the th segment; represents taking the absolute value; exp() represents the exponential function with the natural constant as the base.

7. A data acquisition method for Internet of Things data according to claim 1, characterized in that The obtaining of the fitting weight of each data in each segment of each Internet of Things data sequence includes: ; Wherein, represents the fitting weight of the m-th data in the k-th segment of the j-th Internet of Things data sequence; represents the number of data in the k-th segment of the j-th Internet of Things data sequence; represents the index of the m-th data in the k-th segment of the j-th Internet of Things data sequence; represents the standard deviation of the data in the k-th segment of the j-th Internet of Things data sequence; represents the continuity between the k-th segment and the (k + 1)-th segment of the j-th Internet of Things data sequence; represents the continuity between the k-th segment and the (k - 1)-th segment of the j-th Internet of Things data sequence.

8. A data acquisition method for Internet of Things data according to claim 1, characterized in that, The obtaining of the final fitting weight of each data in each segment of each Internet of Things data sequence includes: ; In the formula, represents the final fitting weight of the m-th data in the k-th segment of the j-th Internet of Things data sequence; represents the fitting weight of the m-th data in the k-th segment of the j-th Internet of Things data sequence; represents the number of data in the k-th segment of the j-th Internet of Things data sequence.

9. A data acquisition method for Internet of Things data according to claim 1, characterized in that The collecting of each Internet of Things data sequence includes: Collect each piece of Internet of Things data from the database for the past month. Each piece of Internet of Things data contains several items of data, namely the current data, voltage data, and vibration data of the device at each sampling time in the Internet of Things. Arrange each item of data in all the collected Internet of Things data in the order of sampling time, and obtain each sequence of Internet of Things data.

Citation Information

Patent Citations

  • Time series data nearest-neighbor classifying method based on subsection orthogonal polynomial decomposition

    CN104794484A

  • Efficient transmission method for Internet of Things data

    CN115695564A