Intelligent fire early warning method and system based on Internet data
By calculating the environmental characteristic factor and filtering weight, the adaptive adjustment window denoised the environmental data, solving the problem that the SG filtering algorithm cannot effectively handle the impact of different environmental data, and improving the accuracy of fire warning.
Patent Information
- Application Number
- CN202410410032.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-07
- Publication Date
- 2024-11-05
- Estimated Expiration
- 2044-04-07
AI Technical Summary
The existing SG filtering algorithm uses a fixed window to denoise environmental data, and cannot effectively combine the impact of different types of environmental data on fire prediction results, resulting in a reduction in the accuracy of fire warning results.
By collecting the overall environmental data sequence and environmental data sequence, the environmental characteristic factor and filter weight are calculated according to the change direction of the environmental reference data and the correlation between external environmental factors, and the adaptive adjustment window is used to denoise.
It improves the noise removal effect, enhances the accuracy of fire warning results, adapts to the impact of different environmental data, and improves the noise processing ability.
Smart Images

Figure CN118314673B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to an intelligent fire early warning method and system based on Internet data. Background Art
[0002] In order to ensure the property safety of the site, intelligent robots are usually used to collect environmental information in the site, and the environmental data transmitted by connecting to the Internet is detected, so as to provide real-time fire warning. However, the environmental data collected by the intelligent robot has random noise interference, so before the intelligent fire warning is carried out, the environmental data needs to be denoised.
[0003] Existing methods usually use the SG (Savitzky-Golay) filtering algorithm to denoise environmental data. The traditional SG filtering algorithm usually uses a fixed window to denoise the environmental data; however, different types of environmental data in a venue have different effects on the fire prediction results, and the traditional SG filtering algorithm cannot well combine the impact of different types of environmental data on the fire prediction results, resulting in an unsatisfactory denoising effect on the environmental data, thereby reducing the accuracy of the fire warning results. Summary of the invention
[0004] The present invention provides an intelligent fire warning method and system based on Internet data to solve the existing problem: the existing SG (Savitzky-Golay) filtering algorithm uses a fixed window to perform denoising filtering on environmental data, and does not combine the influence of different types of environmental data on fire prediction results, resulting in reduced accuracy of fire warning results.
[0005] The intelligent fire early warning method and system based on Internet data of the present invention adopts the following technical solutions:
[0006] An embodiment of the present invention provides an intelligent fire warning method based on Internet data, the method comprising the following steps:
[0007] Collecting a plurality of overall environment data sequences and a plurality of environment data sequences, wherein the overall environment data sequence includes a plurality of environment data sequences, and the environment data sequence includes a plurality of environment reference data, and each environment reference data corresponds to a recording time;
[0008] According to the distribution difference of the change direction of the environmental reference data in different time ranges in the overall environmental data sequence, the environmental characteristic factor of each overall environmental data sequence is obtained;
[0009] According to the matching differences between the environmental reference data and the environmental characteristic factors at the same recording time between different environmental data sequences, as well as the correlation between the environmental reference data and the external environmental factors, the environmental filtering weight of each environmental reference data is obtained;
[0010] The window is adaptively adjusted according to the environmental filter weight to denoise the environmental reference data.
[0011] Preferably, the environmental characteristic factor of each overall environmental data sequence is obtained according to the distribution difference of the change direction of the environmental reference data within different time ranges in the overall environmental data sequence, including the specific method of:
[0012] Preset a number of environmental reference data T1; for any overall environmental data sequence, record any environmental reference data in the overall environmental data sequence as target environmental reference data, and record a data segment consisting of T1 environmental reference data before the target environmental reference data and T1 environmental reference data after the target environmental reference data as a neighborhood environmental data segment of the target environmental reference data;
[0013] Obtain the trend direction difference value of each extreme value in the neighborhood environment data segment of the target environment reference data;
[0014] All trend direction difference values are linearly normalized, and the normalized trend direction difference values are recorded as trend direction difference factors; any extreme value in the neighborhood environment data segment of the target environment reference data is recorded as the target extreme value, and the difference between 1 and the trend direction difference factor of the target extreme value is recorded as the first difference of the target extreme value; the difference between the mean of all extreme values and the target extreme value is recorded as the second difference of the target extreme value; the square of the product of the first difference and the second difference of the target extreme value is recorded as the first product of the target extreme value;
[0015] Obtain the first product of all extreme values in the neighborhood environmental data segment of the target environmental reference data, and record the square root of the cumulative sum of the first products of all extreme values as the first cumulative value of the target environmental reference data; obtain the first cumulative value of all environmental reference data in the overall environmental data sequence, and record the inversely proportional normalized value of the cumulative sum of the first cumulative values of all environmental reference data as the first inversely proportional value; and record the difference between 1 and the first inversely proportional value as the environmental characteristic factor of the overall environmental data sequence.
[0016] Preferably, the step of obtaining the trend direction difference value of each extreme value in the neighborhood environment data segment of the target environment reference data comprises the following specific methods:
[0017] The PCA principal component analysis algorithm is used to obtain the principal component direction in the neighborhood environmental data segment, and the value corresponding to each extreme value in the neighborhood environmental data segment in the principal component direction is recorded as the principal component value of each extreme value. The difference between each extreme value in the neighborhood environmental data segment and the corresponding principal component value is recorded as the trend direction difference value of each extreme value.
[0018] Preferably, the environmental filtering weight of each environmental reference data is obtained according to the matching difference between the environmental reference data and the environmental characteristic factors at the same recording time between different environmental data sequences, and the correlation between the environmental reference data and the external environmental factors, including the specific method of:
[0019] For any overall environmental data sequence, in the overall environmental data sequence, the last environmental data sequence is recorded as the core environmental data sequence, and each environmental data sequence except the core environmental data sequence is recorded as the reference environmental data sequence; for any reference environmental data sequence, the DTW dynamic time warping algorithm is used to obtain all matching point pairs between the reference environmental data sequence and the core environmental data sequence; the overall difference value of the trend time, the overall difference value of the neighborhood distance and the similarity weight of all matching point pairs are obtained;
[0020] According to the overall difference value of trend time, overall difference value of neighborhood distance and similarity weight of all matching point pairs between the core environmental data sequence and the reference environmental data sequence, the environmental similarity between the core environmental data sequence and the reference environmental data sequence is obtained; the environmental similarity between the core environmental data sequence and all reference environmental data sequences is obtained;
[0021] According to the environmental similarity between the core environmental data sequence and all reference environmental data sequences, the noise influence degree of the core environmental data sequence is obtained;
[0022] For any environmental reference data in the core environmental data sequence, the standard deviation of all environmental reference data in the neighborhood environmental data segment of the environmental reference data is recorded as the first standard deviation, the first standard deviation of all environmental reference data in the core environmental data sequence is obtained, all first standard deviations are linearly normalized, and the normalized first standard deviation is recorded as the local environmental standard deviation; an environmental reference data threshold T2 is preset, and the difference between the mean of all environmental reference data in the neighborhood environmental data segment of the environmental reference data and T2 is recorded as the abnormal index of the environmental reference data; the abnormal index of all environmental reference data is obtained;
[0023] For the zth environmental reference data in the vth overall environmental data sequence, the noise anomaly degree of the zth environmental reference data in the vth overall environmental data sequence is obtained according to the local environmental standard deviation of the environmental reference data of the zth environmental reference data, the environmental characteristic factor of the vth overall environmental data sequence, the noise influence degree of the core environmental data sequence of the vth overall environmental data sequence, and the difference in anomaly indicators between the vth overall environmental data sequence and other overall environmental data sequences;
[0024] The noise anomaly of all environmental reference data in the vth overall environmental data sequence is obtained, all noise anomaly degrees are linearly normalized, and the normalized noise anomaly degree is recorded as the environmental filtering weight.
[0025] Preferably, the method of obtaining the overall difference value of trend time, the overall difference value of neighborhood distance and the similarity weight of all matching point pairs includes:
[0026] For any matching point pair, the environmental reference data of the matching point pair in the reference environmental data sequence is recorded as the first target environmental reference data; in the reference environmental data sequence, the environmental reference data corresponding to the smallest extreme value of the recording time from the first target environmental reference data is recorded as the second target environmental reference data, and the absolute value of the difference in recording time between the first target environmental reference data and the second target environmental reference data is recorded as the trend time difference value of the first target environmental reference data; the environmental reference data of the matching point pair in the core environmental data sequence is recorded as the third target environmental reference data, and the trend time difference value of the third target environmental reference data is obtained by referring to the method for obtaining the trend time difference value of the first target environmental reference data; the average of the trend time difference values of the first target environmental reference data and the third target environmental reference data is recorded as the overall trend time difference value of the matching point pair;
[0027] On the left side of the first target environment reference data, the environment reference data corresponding to the minimum extreme value of the distance from the first target environment reference data at the recording time is recorded as the first target environment data; on the right side of the first target environment reference data, the environment reference data corresponding to the minimum extreme value of the distance from the first target environment reference data at the recording time is recorded as the second target environment data; the Euclidean distance between the first target environment data and the second target environment data is recorded as the neighborhood distance value of the first target environment reference data; refer to the method for obtaining the neighborhood distance value of the first target environment reference data to obtain the neighborhood distance value of the third target environment reference data; the average of the neighborhood distance values of the first target environment reference data and the third target environment reference data is recorded as the overall difference value of the neighborhood distance of the matching point pairs;
[0028] In the matching point pair, if the first target environment reference data is an extreme value, the neighborhood distance value of the first target environment reference data is recorded as the similarity weight of the matching point pair; if the third target environment reference data is an extreme value, the neighborhood distance value of the third target environment reference data is recorded as the similarity weight of the matching point pair; if the first target environment reference data and the third target environment reference data are both extreme values, the cumulative sum of the neighborhood distance values of the first target environment reference data and the third target environment reference data is recorded as the similarity weight of the matching point pair; if neither the first target environment reference data nor the third target environment reference data is an extreme value, 1 is recorded as the similarity weight of the matching point pair.
[0029] Preferably, the environmental similarity between the core environmental data sequence and the reference environmental data sequence is obtained according to the overall difference value of trend time, the overall difference value of neighborhood distance and the similarity weight of all matching point pairs between the core environmental data sequence and the reference environmental data sequence, including the specific method of:
[0030] For the cth matching point pair in the core environmental data sequence and the reference environmental data sequence, the product of the Euclidean distance between the two environmental reference data in the cth matching point pair, the similarity weight of the cth matching point pair and the overall difference value of the neighborhood distance is recorded as the second product; the ratio of the second product to the overall difference value of the trend time of the cth matching point pair is recorded as the first ratio of the cth matching point pair, and the first ratio of all matching point pairs is obtained; the cumulative sum of the first ratios of all matching point pairs is recorded as the environmental similarity value of the core environmental data sequence and the reference environmental data sequence; all environmental similarity values are obtained, all environmental similarity values are linearly normalized, and the normalized environmental similarity values are recorded as environmental similarity.
[0031] Preferably, the step of obtaining the noise influence degree of the core environment data sequence according to the environmental similarity between the core environment data sequence and all reference environment data sequences comprises the following specific methods:
[0032] The mean of all environmental reference data in the core environmental data sequence is recorded as the first mean, the mean of all environmental reference data in the reference environmental data sequence is recorded as the second mean, the absolute value of the difference between the first mean and the second mean is recorded as the environmental difference factor between the core environmental data sequence and the reference environmental data sequence, the environmental difference factor between the core environmental data sequence and all reference environmental data sequences is obtained, all environmental difference factors are linearly normalized, and the normalized environmental difference factor is recorded as the environmental difference degree;
[0033] For any reference environmental data sequence, the difference between 1 and the degree of environmental difference between the core environmental data sequence and the reference environmental data sequence is recorded as the third difference; the product of the environmental similarity between the core environmental data sequence and the reference environmental data sequence and the third difference is recorded as the third product of the reference environmental data sequence; the third products of all reference environmental data sequences are obtained, and the cumulative sum of the third products of all reference environmental data sequences is recorded as the degree of noise influence of the core environmental data sequence.
[0034] Preferably, the noise anomaly degree of the zth environmental reference data in the vth overall environmental data sequence is obtained according to the local environmental standard deviation of the zth environmental reference data, the environmental characteristic factor of the vth overall environmental data sequence, the noise influence degree of the core environmental data sequence of the vth overall environmental data sequence, and the difference in anomaly indicators between the vth overall environmental data sequence and other overall environmental data sequences, including the specific method of:
[0035] The difference between 1 and the environmental characteristic factor of the vth overall environmental data sequence is recorded as the fourth difference; the product of the noise influence degree of the core environmental data sequence of the vth overall environmental data sequence, the local environmental standard deviation of the zth environmental reference data in the vth overall environmental data sequence, and the fourth difference is recorded as the fourth product; the ratio of the fourth product to the number of all overall environmental data sequences except the vth overall environmental data sequence is recorded as the second ratio of the zth environmental reference data in the vth overall environmental data sequence;
[0036] For the qth overall environmental data sequence except the vth overall environmental data sequence, the difference between the abnormal index of the zth environmental reference data in the vth overall environmental data sequence and the abnormal index of the zth environmental reference data in the qth overall environmental data sequence is subtracted and recorded as the fifth difference; the ratio of the environmental characteristic factor of the qth overall environmental data sequence to the local environmental standard deviation of the zth environmental reference data in the vth overall environmental data sequence is recorded as the third ratio; the square of the product of the fifth difference and the third ratio is recorded as the fifth product of the qth overall environmental data sequence; the fifth products of all overall environmental data sequences except the vth overall environmental data sequence are obtained, and the cumulative sum of all fifth products is recorded as the first cumulative sum of the zth environmental reference data in the vth overall environmental data sequence;
[0037] The product of the second ratio and the first cumulative sum is recorded as the noise abnormality of the zth environmental reference data in the vth overall environmental data sequence.
[0038] Preferably, the adaptively adjusting the window according to the environmental filtering weight to denoise the environmental reference data includes the following specific methods:
[0039] A filter window length T3 and a hyperparameter μ are preset. For the z1th environmental reference data in the v1th overall environmental data sequence, the sum of μ and the environmental filter weight of the z1th environmental reference data in the v1th overall environmental data sequence is recorded as the first sum; the product of T3 and the first sum is recorded as the sixth product; and the result of rounding up the sixth product is recorded as the final filter window length of the z1th environmental reference data in the v1th overall environmental data sequence;
[0040] The construction window length is L v1,z1 The window is used as the final filtering window of the z1th environmental reference data in the v1th overall environmental data sequence, and the final filtering window of each environmental reference data in each overall environmental data sequence is obtained. The final filtering window of each environmental reference data is used as the filtering window, and each environmental reference data is denoised by the SG filtering algorithm according to the filtering window to obtain all denoised environmental reference data.
[0041] The present invention also proposes an intelligent fire warning system based on Internet data, including a memory and a processor, wherein the processor executes a computer program stored in the memory to implement the steps of the above-mentioned intelligent fire warning method based on Internet data.
[0042] The beneficial effects of the technical solution of the present invention are as follows: the present invention adaptively adjusts the window to improve the denoising effect of each environmental reference data by combining the correlation between the overall environmental data sequence and the external environmental factors and the distribution difference of the change direction of the environmental reference data in different time ranges; wherein firstly, according to the distribution difference of the change direction of the environmental reference data in different time ranges in the overall environmental data sequence, the environmental characteristic factor of the overall environmental data sequence is obtained, which is used to reflect the obvious situation of the characteristics shown by the environmental data type to which the overall environmental data sequence belongs, thereby improving the degree of expression of the environmental factors on the environmental reference data; then, according to the distribution difference of the environmental reference data at the same recording time between different environmental data sequences, the environmental characteristic factor of the overall environmental data sequence is obtained. The matching differences between the reference data and the environmental characteristic factors, as well as the correlation between the environmental reference data and the external environmental factors, are considered to obtain the environmental filtering weight of each environmental reference data, which is used to reflect the intensity of denoising required after the analysis of the external environmental factors and the internal noise, thereby improving the denoising effect of each environmental reference data; finally, the window is adaptively adjusted according to the environmental filtering weight to denoise the environmental reference data; the present invention adaptively adjusts the filtering window by analyzing the influence of the external environmental factors and the internal noise factors on the environmental reference data, so that the filtering window can be adaptively adjusted according to different environmental reference data, thereby improving the denoising effect and the accuracy of the intelligent fire warning results. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention 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, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0044] Figure 1 It is a flowchart of the steps of the intelligent fire warning method based on Internet data of the present invention;
[0045] Figure 2 The figure is a characteristic relationship flow chart of the intelligent fire warning method based on Internet data of the present invention. DETAILED DESCRIPTION
[0046] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects of the intelligent fire warning method and system based on Internet data proposed by the present invention are described in detail below in combination with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0047] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0048] The specific scheme of the intelligent fire early warning method and system based on Internet data provided by the present invention is described in detail below with reference to the accompanying drawings.
[0049] See also Figure 1 , which shows a flowchart of a method for intelligent fire warning based on Internet data provided by an embodiment of the present invention, the method comprising the following steps:
[0050] Step S001: Collect a number of overall environment data sequences and a number of environment data sequences.
[0051] It should be noted that existing methods usually use the SG (Savitzky-Golay) filter algorithm to denoise environmental data. Traditional SG filter algorithms usually use fixed windows to denoise data. However, different types of environmental data in a place have different effects on fire prediction results, and traditional SG filter algorithms cannot well combine the effects of different types of environmental data on fire prediction results, resulting in unsatisfactory denoising effects on environmental data, thereby reducing the accuracy of fire warning results. Please refer to Figure 2 , which shows a characteristic relationship flow chart of an intelligent fire warning method based on Internet data.
[0052] Specifically, it is necessary to collect the environmental data sequence first. The specific process is: in the Internet database connected to the intelligent robot, obtain the temperature data, smoke concentration data and brightness data of the past week; take all the collected temperature data as an example, linearly normalize all the temperature data, record each normalized temperature data as the environmental reference data, record the sequence composed of all the environmental reference data in all days as the overall environmental data sequence; record the sequence composed of all the environmental reference data in each day as the environmental data sequence; obtain all the overall environmental data sequences and all the corresponding environmental data sequences. Each environmental reference data corresponds to a recording moment, each overall environmental data sequence contains multiple environmental data sequences, and each environmental data sequence contains multiple environmental reference data. It should also be noted that the data types and collection time lengths of this embodiment are described using temperature data, smoke concentration data, brightness data, and one week as examples, respectively. This embodiment does not make specific limitations, and the data types and collection time lengths can be determined according to the specific implementation situation.
[0053] So far, all types of overall environmental data sequences and all environmental data sequences are obtained through the above method.
[0054] Step S002: Obtaining the environmental characteristic factor of each overall environmental data sequence according to the distribution difference of the change direction of the environmental reference data within different time ranges in the overall environmental data sequence.
[0055] It should be noted that the same type of environmental reference data has different effects on fire warning results in different places. For example, compared with warehouses storing a large number of inflammable materials, warehouses storing a large number of non-inflammable materials are more likely to catch fire as the temperature data increases, thus causing a fire. For the same type of environmental reference data in the same place, as time goes by, the overall environmental conditions will show a trend change in a certain direction, causing the corresponding environmental reference data to change in a certain direction as a whole; if part of the environmental reference data is interfered by noise, the original change trend direction will be destroyed. In order to improve the accuracy of the intelligent fire warning results, this embodiment analyzes the change direction trend of the reference environmental data in the overall environmental data sequence to obtain the environmental characteristic factors of the overall environmental data sequence for subsequent analysis and processing.
[0056] Specifically, a number of environmental reference data T1 is preset, wherein this embodiment is described by taking T1=7 as an example, and this embodiment is not specifically limited, wherein T1 can be determined according to the specific implementation situation; taking any overall environmental data sequence as an example, any environmental reference data in the overall environmental data sequence is recorded as the target environmental reference data, and the data segment consisting of the T1 environmental reference data before the target environmental reference data and the T1 environmental reference data after the target environmental reference data is recorded as the neighborhood environmental data segment of the target environmental reference data; the PCA principal component analysis algorithm is used to obtain the principal component direction in the neighborhood environmental data segment, and the value corresponding to each extreme value in the neighborhood environmental data segment in the principal component direction is recorded as the principal component value of each extreme value, and the difference between each extreme value in the neighborhood environmental data segment and the corresponding principal component value is recorded as the trend direction difference value of each extreme value. Wherein obtaining the principal component direction of the data sequence is a well-known content of the PCA (Principal Component Analysis) principal component analysis algorithm, and this embodiment will not be repeated; in addition, each environmental reference data in the neighborhood environmental data segment has a corresponding value in the principal component direction. It should also be noted that if the number of environmental reference data actually existing before the target environmental reference data does not meet the preset T1, then the environmental reference data actually existing before the target environmental reference data is used as the basis to obtain the neighborhood environmental data segment of the target environmental reference data; if the number of environmental reference data actually existing after the target environmental reference data does not meet the preset T1, then the environmental reference data actually existing after the target environmental reference data is used as the basis to obtain the neighborhood environmental data segment of the target environmental reference data; and each environmental reference data corresponds to a neighborhood environmental data segment.
[0057] Furthermore, according to the difference in environmental changes in the local range of each environmental reference data in the overall environmental data sequence, the environmental characteristic factor of the overall environmental data sequence is obtained. As an example, the environmental characteristic factor of the overall environmental data sequence can be calculated by the following formula:
[0058]
[0059] Where h represents the environmental characteristic factor of the overall environmental data sequence; I represents the number of all environmental reference data in the overall environmental data sequence; M i represents the number of all extreme values in the neighborhood environmental data segment of the i-th environmental reference data; a i,m Represents the mth extreme value in the neighborhood environmental data segment of the i-th environmental reference data; represents the mean of all extreme values in the neighborhood environmental data segment of the i-th environmental reference data; Δb i,mrepresents the trend direction difference value of the mth extreme value in the neighborhood environmental data segment of the i-th environmental reference data; exp() represents an exponential function with a natural constant as the base. The embodiment adopts the exp(-x) model to present the inverse proportional relationship and normalization processing. x is the input of the model. The implementer can select the inverse proportional function and normalization function according to the actual situation; softmax() represents the normalization function, which is used to convert all Δb i,m Normalization is performed. If the environmental characteristic factor of the overall environmental data sequence is larger, it means that the data type corresponding to the overall environmental data sequence is more affected by the environment and less affected by noise. The environmental characteristic factors of all overall environmental data sequences are obtained.
[0060] So far, the environmental characteristic factors of all overall environmental data sequences have been obtained through the above method.
[0061] Step S003: Obtain the environmental filtering weight of each environmental reference data according to the matching difference between the environmental reference data and the environmental characteristic factors at the same recording time between different environmental data sequences, and the correlation between the environmental reference data and the external environmental factors.
[0062] It should be noted that in actual environments, the results of fire warnings are obtained through comprehensive analysis of environmental factors such as external temperature, smoke concentration, light brightness, etc. Therefore, for the same type of environmental reference data in the same place, this type of environmental reference data will be affected by other types of environmental reference data. For example, when the temperature is high, it will accelerate air circulation and change the diffusion state of smoke, and it will also have a certain impact on the judgment of environmental brightness. As a result, this type of environmental reference data has different degrees of correlation within different time ranges. The greater the degree of correlation, the more relevant this type of environmental reference data is to the external environmental factors, and the less affected by noise interference. In order to improve the accuracy of fire warning results, this embodiment analyzes the correlation between different environmental data sequences to obtain the noise index of the overall environmental data sequence for subsequent analysis and processing.
[0063] Specifically, taking any overall environmental data sequence as an example, in the overall environmental data sequence, the last environmental data sequence is recorded as the core environmental data sequence, and each environmental data sequence other than the core environmental data sequence is recorded as the reference environmental data sequence. Taking any reference environmental data sequence as an example, all matching point pairs between the reference environmental data sequence and the core environmental data sequence are obtained; taking any matching point pair as an example, the environmental reference data of the matching point pair in the reference environmental data sequence is recorded as the first target environmental reference data; in the reference environmental data sequence, the environmental reference data corresponding to the minimum extreme value of the recording time from the first target environmental reference data is recorded as the second target environmental reference data, and the absolute value of the difference in recording time between the first target environmental reference data and the second target environmental reference data is recorded as the trend time difference value of the first target environmental reference data. The environmental reference data of the matching point pair in the core environmental data sequence is recorded as the third target environmental reference data, and the trend time difference value of the third target environmental reference data is obtained by referring to the method for obtaining the trend time difference value of the first target environmental reference data; the average of the trend time difference values of the first target environmental reference data and the third target environmental reference data is recorded as the overall trend time difference value of the matching point pair. The process of obtaining matching point pairs of two data sequences is a well-known content of the DTW (Dynamic Time Warping) dynamic time warping algorithm, which will not be repeated in this embodiment. Each matching point pair includes a first target environment reference data and a third target environment reference data.
[0064] Further, on the left side of the first target environment reference data, the environment reference data corresponding to the minimum extreme value of the distance from the first target environment reference data at the recording time is recorded as the first target environment data; on the right side of the first target environment reference data, the environment reference data corresponding to the minimum extreme value of the distance from the first target environment reference data at the recording time is recorded as the second target environment data; the Euclidean distance between the first target environment data and the second target environment data is recorded as the neighborhood distance value of the first target environment reference data; the neighborhood distance value of the third target environment reference data is obtained by referring to the method for obtaining the neighborhood distance value of the first target environment reference data; the average of the neighborhood distance values of the first target environment reference data and the third target environment reference data is recorded as the overall difference value of the neighborhood distance of the matching point pair. The acquisition of the Euclidean distance is a well-known technology and will not be repeated in this embodiment.
[0065] Furthermore, in the matching point pair, if only the first target environment reference data is an extreme value, the neighborhood distance value of the first target environment reference data is recorded as the similarity weight of the matching point pair; if only the third target environment reference data is an extreme value, the neighborhood distance value of the third target environment reference data is recorded as the similarity weight of the matching point pair; if both the first target environment reference data and the third target environment reference data are extreme values, the cumulative sum of the neighborhood distance values of the first target environment reference data and the third target environment reference data is recorded as the similarity weight of the matching point pair; if neither the first target environment reference data nor the third target environment reference data is an extreme value, 1 is recorded as the similarity weight of the matching point pair. Obtain the overall difference value of trend time, the overall difference value of neighborhood distance, and the similarity weight of all matching point pairs.
[0066] Furthermore, according to the overall difference value of trend time, overall difference value of neighborhood distance and similarity weight of all matching point pairs between the core environment data sequence and the reference environment data sequence, the environmental similarity value between the core environment data sequence and the reference environment data sequence is obtained. As an example, the environmental similarity value between the core environment data sequence and the reference environment data sequence can be calculated by the following formula:
[0067]
[0068] Where s represents the environmental similarity value between the core environmental data sequence and the reference environmental data sequence; C represents the number of all matching point pairs between the core environmental data sequence and the reference environmental data sequence; d c represents the Euclidean distance between the two environmental reference data in the cth matching point pair; k c represents the similarity weight of the cth matching point pair; Δu c Indicates the overall difference value of the neighborhood distance of the cth matching point pair; Δt c Indicates the overall difference value of the trend time of the cth matching point pair. The greater the environmental similarity value between the core environmental data sequence and the reference environmental data sequence, the greater the influence of external environmental factors on the core environmental data sequence and the smaller the degree of noise interference. Obtain the environmental similarity value between the core environmental data sequence and all reference environmental data sequences, linearly normalize all environmental similarity values, and record each normalized environmental similarity value as environmental similarity.
[0069] Furthermore, the mean of all environmental reference data in the core environmental data sequence is recorded as the first mean, the mean of all environmental reference data in the reference environmental data sequence is recorded as the second mean, and the absolute value of the difference between the first mean and the second mean is recorded as the environmental difference factor between the core environmental data sequence and the reference environmental data sequence, and the environmental difference factor between the core environmental data sequence and all reference environmental data sequences is obtained, all environmental difference factors are linearly normalized, and each normalized environmental difference factor is recorded as the degree of environmental difference. According to the environmental similarity and degree of environmental difference between the core environmental data sequence and all reference environmental data sequences, the degree of noise influence of the core environmental data sequence is obtained. As an example, the degree of noise influence of the core environmental data sequence can be calculated by the following formula:
[0070]
[0071] Where, f represents the noise impact of the core environmental data series; W represents the number of all reference environmental data series; S w represents the environmental similarity between the core environmental data sequence and the wth reference environmental data sequence; γ w Indicates the degree of environmental difference between the core environmental data sequence and the wth reference environmental data sequence. The greater the noise impact of the core environmental data sequence, the more relevant the overall changes in the environmental data types corresponding to the core environmental data sequence are, the greater the impact of environmental factors on the overall environmental data change trend, and the weaker the degree of noise interference.
[0072] Further, taking any environmental reference data in the core environmental data sequence as an example, the standard deviation of all environmental reference data in the neighborhood environmental data segment of the environmental reference data is recorded as the first standard deviation, the first standard deviation of all environmental reference data in the core environmental data sequence is obtained, all first standard deviations are linearly normalized, and each normalized first standard deviation is recorded as the local environmental standard deviation. An environmental reference data threshold T2 is preset, wherein this embodiment is described using T2=0.4 as an example, and this embodiment is not specifically limited, wherein T2 can be determined according to the specific implementation situation; the difference between the mean of all environmental reference data in the neighborhood environmental data segment of the environmental reference data and T2 is recorded as the abnormal index of the environmental reference data; the abnormal index of all environmental reference data in the overall environmental data sequence is obtained, and the abnormal index of all environmental reference data in all overall environmental data sequences is obtained.
[0073] Further, taking the zth environmental reference data in the vth overall environmental data sequence as an example, according to the local environmental standard deviation of the zth environmental reference data, the environmental characteristic factor of the vth overall environmental data sequence, the noise influence degree of the core environmental data sequence of the vth overall environmental data sequence, and the difference in abnormal indicators between the vth overall environmental data sequence and other overall environmental data sequences, the noise abnormality of the zth environmental reference data in the vth overall environmental data sequence is obtained. As an example, the noise abnormality of the zth environmental reference data in the vth overall environmental data sequence can be calculated by the following formula:
[0074]
[0075] In the formula, G v,z represents the noise anomaly of the zth environmental reference data in the vth overall environmental data sequence; f v represents the noise influence degree of the core environmental data sequence of the vth overall environmental data sequence; h v Represents the environmental characteristic factor of the vth overall environmental data sequence; ε v.z represents the local environmental standard deviation of the zth environmental reference data in the vth overall environmental data sequence; τ represents a preset hyperparameter used to prevent the denominator from being 0; Q v represents the number of all overall environmental data sequences except the vth overall environmental data sequence; r v,z represents the abnormal index of the zth environmental reference data in the vth overall environmental data sequence; r v,q,z h represents the abnormal index of the zth environmental reference data in the qth overall environmental data sequence except the vth overall environmental data sequence; v,q Represents the environmental characteristic factors of the qth overall environmental data sequence except the vth overall environmental data sequence. If the noise abnormality of the zth environmental reference data in the vth overall environmental data sequence is greater, it means that the correlation between the zth environmental reference data and other environmental factors in the vth overall environmental data sequence is lower, reflecting that the zth environmental reference data in the vth overall environmental data sequence is more disturbed by noise. Obtain the noise abnormality of all environmental reference data in the vth overall environmental data sequence, linearly normalize all noise abnormalities, and record each normalized noise abnormality as the environmental filtering weight. Obtain the environmental filtering weights of all environmental reference data in all overall environmental data sequences.
[0076] So far, the environmental filtering weights of all environmental reference data in all overall environmental data sequences are obtained through the above method.
[0077] Step S004: Adaptively adjust the window according to the environmental filtering weight to denoise the environmental reference data.
[0078] Specifically, a filter window length T3 is preset, wherein this embodiment is described by taking T3=10 as an example, and this embodiment is not specifically limited, wherein T3 may be determined according to the specific implementation situation; taking the z1th environmental reference data in the v1th overall environmental data sequence as an example, according to the filter window side length T3 and the environmental filter weight of the z1th environmental reference data, the final filter window length of the z1th environmental reference data in the v1th overall environmental data sequence is obtained. As an example, the final filter window length of the z1th environmental reference data in the v1th overall environmental data sequence can be calculated by the following formula:
[0079]
[0080] Where, L v1,z1 represents the final filter window length of the z1th environmental reference data in the v1th overall environmental data sequence; T3 represents the preset filter window length; μ represents the preset hyperparameter, and in this embodiment, μ=0.5 is preset to reflect the initial weight ratio of the filter window; GP v1,z1 represents the environmental filtering weight of the z1th environmental reference data in the v1th overall environmental data sequence; Indicates rounding up. If the final filtering window length of the z1th environmental reference data in the v1th overall environmental data sequence is larger, it means that the intensity of noise interference on the z1th environmental reference data in the v1th overall environmental data sequence is greater, reflecting that the intensity of denoising required for the z1th environmental reference data in the v1th overall environmental data sequence is greater.
[0081] Furthermore, the construction window length is L v1,z1 The window is used as the final filtering window of the z1th environmental reference data in the v1th overall environmental data sequence, and the final filtering window of each environmental reference data in each overall environmental data sequence is obtained. The final filtering window of each environmental reference data is used as the filtering window, and each environmental reference data is denoised according to the filtering window to obtain all denoised environmental reference data. All denoised environmental reference data are input into the early warning system to complete the intelligent fire early warning. The process of denoising the data according to the filtering window is a well-known content of the SG filtering algorithm, and will not be repeated in this embodiment.
[0082] Through the above steps, the intelligent fire warning method based on Internet data is completed.
[0083] Another embodiment of the present invention provides an intelligent fire warning system based on Internet data, the system includes a memory and a processor, and when the processor executes the computer program stored in the memory, the above method steps S001 to S004 are executed.
[0084] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An intelligent fire warning method based on Internet data, characterized in that: The method comprises the following steps: Collecting a plurality of overall environment data sequences and a plurality of environment data sequences, wherein the overall environment data sequence includes a plurality of environment data sequences, and the environment data sequence includes a plurality of environment reference data, and each environment reference data corresponds to a recording time; According to the distribution difference of the change direction of the environmental reference data in different time ranges in the overall environmental data sequence, the environmental characteristic factor of each overall environmental data sequence is obtained; According to the matching differences between the environmental reference data and the environmental characteristic factors at the same recording time between different environmental data sequences, as well as the correlation between the environmental reference data and the external environmental factors, the environmental filtering weight of each environmental reference data is obtained; Adaptively adjust the window according to the environmental filter weight to denoise the environmental reference data; The specific method of obtaining the environmental characteristic factor of each overall environmental data sequence according to the distribution difference of the change direction of the environmental reference data in different time ranges in the overall environmental data sequence includes: Preset a number of environmental reference data T1; for any overall environmental data sequence, record any environmental reference data in the overall environmental data sequence as target environmental reference data, and record a data segment consisting of T1 environmental reference data before the target environmental reference data and T1 environmental reference data after the target environmental reference data as a neighborhood environmental data segment of the target environmental reference data; Obtain the trend direction difference value of each extreme value in the neighborhood environment data segment of the target environment reference data; All trend direction difference values are linearly normalized, and the normalized trend direction difference values are recorded as trend direction difference factors; any extreme value in the neighborhood environment data segment of the target environment reference data is recorded as the target extreme value, and the difference between 1 and the trend direction difference factor of the target extreme value is recorded as the first difference of the target extreme value; the difference between the mean of all extreme values and the target extreme value is recorded as the second difference of the target extreme value; the square of the product of the first difference and the second difference of the target extreme value is recorded as the first product of the target extreme value; Obtain the first product of all extreme values in the neighborhood environmental data segment of the target environmental reference data, and record the square root of the cumulative sum of the first products of all extreme values as the first cumulative value of the target environmental reference data; obtain the first cumulative value of all environmental reference data in the overall environmental data sequence, and record the inversely proportional normalized value of the cumulative sum of the first cumulative values of all environmental reference data as the first inversely proportional value; and record the difference between 1 and the first inversely proportional value as the environmental characteristic factor of the overall environmental data sequence; The formula corresponding to the environmental characteristic factor of the overall environmental data series is: Where h represents the environmental characteristic factor of the overall environmental data sequence; I represents the number of all environmental reference data in the overall environmental data sequence; M i represents the number of all extreme values in the neighborhood environmental data segment of the i-th environmental reference data; a i,m Represents the mth extreme value in the neighborhood environmental data segment of the i-th environmental reference data; represents the mean of all extreme values in the neighborhood environmental data segment of the i-th environmental reference data; Δb i,m represents the trend direction difference value of the mth extreme value in the neighborhood environmental data segment of the i-th environmental reference data; exp() represents an exponential function with a natural constant as the base. The embodiment adopts the exp(-x) model to present the inverse proportional relationship and normalization processing. x is the input of the model. The implementer can select the inverse proportional function and normalization function according to the actual situation; softmax() represents the normalization function, which is used to convert all Δb i,m Perform normalization; The specific method of obtaining the trend direction difference value of each extreme value in the neighborhood environment data segment of the target environment reference data includes: The PCA principal component analysis algorithm is used to obtain the principal component direction in the neighborhood environment data segment, and the value corresponding to each extreme value in the neighborhood environment data segment in the principal component direction is recorded as the principal component value of each extreme value, and the difference between each extreme value in the neighborhood environment data segment and the corresponding principal component value is recorded as the trend direction difference value of each extreme value; The environmental filtering weight of each environmental reference data is obtained according to the matching difference between the environmental reference data and the environmental characteristic factors at the same recording time between different environmental data sequences, and the correlation between the environmental reference data and the external environmental factors, including the specific method of: For any overall environmental data sequence, in the overall environmental data sequence, the last environmental data sequence is recorded as the core environmental data sequence, and each environmental data sequence except the core environmental data sequence is recorded as the reference environmental data sequence; for any reference environmental data sequence, the DTW dynamic time warping algorithm is used to obtain all matching point pairs between the reference environmental data sequence and the core environmental data sequence; the overall difference value of the trend time, the overall difference value of the neighborhood distance and the similarity weight of all matching point pairs are obtained; According to the overall difference value of trend time, overall difference value of neighborhood distance and similarity weight of all matching point pairs between the core environmental data sequence and the reference environmental data sequence, the environmental similarity between the core environmental data sequence and the reference environmental data sequence is obtained; the environmental similarity between the core environmental data sequence and all reference environmental data sequences is obtained; According to the environmental similarity between the core environmental data sequence and all reference environmental data sequences, the noise influence degree of the core environmental data sequence is obtained; For any environmental reference data in the core environmental data sequence, the standard deviation of all environmental reference data in the neighborhood environmental data segment of the environmental reference data is recorded as the first standard deviation, the first standard deviation of all environmental reference data in the core environmental data sequence is obtained, all first standard deviations are linearly normalized, and the normalized first standard deviation is recorded as the local environmental standard deviation; an environmental reference data threshold T2 is preset, and the difference between the mean of all environmental reference data in the neighborhood environmental data segment of the environmental reference data and T2 is recorded as the abnormal index of the environmental reference data; the abnormal index of all environmental reference data is obtained; For the zth environmental reference data in the vth overall environmental data sequence, the noise anomaly degree of the zth environmental reference data in the vth overall environmental data sequence is obtained according to the local environmental standard deviation of the environmental reference data of the zth environmental reference data, the environmental characteristic factor of the vth overall environmental data sequence, the noise influence degree of the core environmental data sequence of the vth overall environmental data sequence, and the difference in anomaly indicators between the vth overall environmental data sequence and other overall environmental data sequences; Obtain the noise anomaly of all environmental reference data in the vth overall environmental data sequence, linearly normalize all noise anomaly degrees, and record the normalized noise anomaly degree as the environmental filtering weight; The specific method of obtaining the overall difference value of trend time, the overall difference value of neighborhood distance and the similarity weight of all matching point pairs includes: For any matching point pair, the environmental reference data of the matching point pair in the reference environmental data sequence is recorded as the first target environmental reference data; in the reference environmental data sequence, the environmental reference data corresponding to the smallest extreme value of the recording time from the first target environmental reference data is recorded as the second target environmental reference data, and the absolute value of the difference in recording time between the first target environmental reference data and the second target environmental reference data is recorded as the trend time difference value of the first target environmental reference data; the environmental reference data of the matching point pair in the core environmental data sequence is recorded as the third target environmental reference data, and the trend time difference value of the third target environmental reference data is obtained by referring to the method for obtaining the trend time difference value of the first target environmental reference data; the average of the trend time difference values of the first target environmental reference data and the third target environmental reference data is recorded as the overall trend time difference value of the matching point pair; On the left side of the first target environment reference data, the environment reference data corresponding to the minimum extreme value of the distance from the first target environment reference data at the recording time is recorded as the first target environment data; on the right side of the first target environment reference data, the environment reference data corresponding to the minimum extreme value of the distance from the first target environment reference data at the recording time is recorded as the second target environment data; the Euclidean distance between the first target environment data and the second target environment data is recorded as the neighborhood distance value of the first target environment reference data; refer to the method for obtaining the neighborhood distance value of the first target environment reference data to obtain the neighborhood distance value of the third target environment reference data; the average of the neighborhood distance values of the first target environment reference data and the third target environment reference data is recorded as the overall difference value of the neighborhood distance of the matching point pairs; In the matching point pair, if the first target environment reference data is an extreme value, the neighborhood distance value of the first target environment reference data is recorded as the similarity weight of the matching point pair; if the third target environment reference data is an extreme value, the neighborhood distance value of the third target environment reference data is recorded as the similarity weight of the matching point pair; if the first target environment reference data and the third target environment reference data are both extreme values, the cumulative sum of the neighborhood distance values of the first target environment reference data and the third target environment reference data is recorded as the similarity weight of the matching point pair; if neither the first target environment reference data nor the third target environment reference data is an extreme value, 1 is recorded as the similarity weight of the matching point pair.
2. The intelligent fire warning method based on Internet data according to claim 1 is characterized in that: The environmental similarity between the core environmental data sequence and the reference environmental data sequence is obtained according to the overall difference value of the trend time, the overall difference value of the neighborhood distance and the similarity weight of all matching point pairs between the core environmental data sequence and the reference environmental data sequence, including the specific method of: For the cth matching point pair in the core environmental data sequence and the reference environmental data sequence, the product of the Euclidean distance between the two environmental reference data in the cth matching point pair, the similarity weight of the cth matching point pair and the overall difference value of the neighborhood distance is recorded as the second product; the ratio of the second product to the overall difference value of the trend time of the cth matching point pair is recorded as the first ratio of the cth matching point pair, and the first ratio of all matching point pairs is obtained; the cumulative sum of the first ratios of all matching point pairs is recorded as the environmental similarity value of the core environmental data sequence and the reference environmental data sequence; all environmental similarity values are obtained, all environmental similarity values are linearly normalized, and the normalized environmental similarity values are recorded as environmental similarity.
3. The intelligent fire warning method based on Internet data according to claim 1 is characterized in that: The method of obtaining the noise influence degree of the core environment data sequence according to the environmental similarity between the core environment data sequence and all reference environment data sequences includes the following specific methods: The mean of all environmental reference data in the core environmental data sequence is recorded as the first mean, the mean of all environmental reference data in the reference environmental data sequence is recorded as the second mean, the absolute value of the difference between the first mean and the second mean is recorded as the environmental difference factor between the core environmental data sequence and the reference environmental data sequence, the environmental difference factor between the core environmental data sequence and all reference environmental data sequences is obtained, all environmental difference factors are linearly normalized, and the normalized environmental difference factor is recorded as the environmental difference degree; For any reference environmental data sequence, the difference between 1 and the degree of environmental difference between the core environmental data sequence and the reference environmental data sequence is recorded as the third difference; the product of the environmental similarity between the core environmental data sequence and the reference environmental data sequence and the third difference is recorded as the third product of the reference environmental data sequence; the third products of all reference environmental data sequences are obtained, and the cumulative sum of the third products of all reference environmental data sequences is recorded as the degree of noise influence of the core environmental data sequence.
4. The intelligent fire early warning method based on Internet data according to claim 1 is characterized in that: The method of obtaining the noise abnormality of the zth environmental reference data in the vth overall environmental data sequence according to the local environmental standard deviation of the zth environmental reference data, the environmental characteristic factor of the vth overall environmental data sequence, the noise influence degree of the core environmental data sequence of the vth overall environmental data sequence, and the difference in abnormal indicators between the vth overall environmental data sequence and other overall environmental data sequences includes the following specific methods: The difference between 1 and the environmental characteristic factor of the vth overall environmental data sequence is recorded as the fourth difference; the product of the noise influence degree of the core environmental data sequence of the vth overall environmental data sequence, the local environmental standard deviation of the zth environmental reference data in the vth overall environmental data sequence, and the fourth difference is recorded as the fourth product; the ratio of the fourth product to the number of all overall environmental data sequences except the vth overall environmental data sequence is recorded as the second ratio of the zth environmental reference data in the vth overall environmental data sequence; For the qth overall environmental data sequence except the vth overall environmental data sequence, the difference between the abnormal index of the zth environmental reference data in the vth overall environmental data sequence and the abnormal index of the zth environmental reference data in the qth overall environmental data sequence is subtracted and recorded as the fifth difference; the ratio of the environmental characteristic factor of the qth overall environmental data sequence to the local environmental standard deviation of the zth environmental reference data in the vth overall environmental data sequence is recorded as the third ratio; the square of the product of the fifth difference and the third ratio is recorded as the fifth product of the qth overall environmental data sequence; the fifth products of all overall environmental data sequences except the vth overall environmental data sequence are obtained, and the cumulative sum of all fifth products is recorded as the first cumulative sum of the zth environmental reference data in the vth overall environmental data sequence; The product of the second ratio and the first cumulative sum is recorded as the noise abnormality of the zth environmental reference data in the vth overall environmental data sequence.
5. The intelligent fire warning method based on Internet data according to claim 1 is characterized in that: The specific method of adaptively adjusting the window according to the environmental filtering weight to denoise the environmental reference data includes: A filter window length T3 and a hyperparameter μ are preset. For the z1th environmental reference data in the v1th overall environmental data sequence, the sum of μ and the environmental filter weight of the z1th environmental reference data in the v1th overall environmental data sequence is recorded as the first sum; the product of T3 and the first sum is recorded as the sixth product; and the result of rounding up the sixth product is recorded as the final filter window length of the z1th environmental reference data in the v1th overall environmental data sequence; The construction window length is L v1,z1 The window is used as the final filtering window of the z1th environmental reference data in the v1th overall environmental data sequence, and the final filtering window of each environmental reference data in each overall environmental data sequence is obtained. The final filtering window of each environmental reference data is used as the filtering window, and each environmental reference data is denoised by the SG filtering algorithm according to the filtering window to obtain all denoised environmental reference data.
6. An intelligent fire warning system based on Internet data, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the computer program is executed by a processor, the steps of the intelligent fire warning method based on Internet data as described in any one of claims 1 to 5 are implemented.
