Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
To make the objects, technical solutions and advantages of the present application more clear, the following description is made by way of specific embodiments with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating an implementation of a trusted fusion method for multi-source sensor data according to an embodiment of the present disclosure. In this embodiment, the execution subject of the trusted fusion method for multi-source sensor data is the trusted fusion equipment for multi-source sensor data. For example, the multi-source sensor data trusted fusion device may be a server deployed in a cloud, may also be a local computing device, and may also be a computing system composed of the server and the local computing device, which is not limited herein. The server may be a single server or a server cluster formed by a plurality of servers. In some embodiments, the multi-source sensor data trusted fusion device belongs to a device in a multi-source sensor data trusted fusion system, and the system may further include a bus control transmission system, a coordinator, a plurality of sensor devices connected to the coordinator, and the like. The number of the coordinators can be one or more, and each coordinator can be connected with one or more sensor devices in a communication mode. It should be noted that the components of the above-mentioned system are exemplary, and the system may include more or less devices, and is not limited herein. The method is detailed as follows:
in S101, sensor data is received, wherein the sensor data is collected by a plurality of sensor devices in a network.
Illustratively, sensor data CAN be received from a bus control transmission system, wherein the bus control transmission system supports the CAN/RS485 communication protocol.
In one possible implementation, before receiving the sensor data from the bus control transmission system, the method may further include:
after the sensor equipment which is accessed for the first time is found, distributing a public and private key pair to the sensor equipment which is accessed for the first time based on a SM2 algorithm, and distributing a corresponding unique identifier to the sensor equipment which is accessed for the first time based on a snowflake algorithm;
after receiving a joining application from certain sensor equipment, judging whether the digital signature of the sensor equipment passes authentication or not based on a digital signature method, wherein the digital signature consists of a public and private key pair and a unique identifier;
if the digital signature of the sensor equipment is not authenticated, adding the sensor equipment into a monitoring list of an abnormal sensor equipment monitoring system;
and if the digital signature authentication of the sensor device passes, allowing the sensor device to join the network.
Because the sensor equipment comprises the sensor, the controller, the single chip microcomputer and the like, when the sensor equipment is found to be accessed for the first time, public and private key pairs are distributed to the sensor equipment accessed for the first time by utilizing the SM2 algorithm, meanwhile, in order to ensure that IDs in a distributed system do not conflict, the characteristics of small and many sensors are combined, a SnowFlake algorithm (SnowFlake) is used for producing a unique identifier containing a 64Bit integer of 'timestamp + machine code + serial number', the unique identifier is distributed to the sensor equipment accessed for the first time, and reverse retrospective binding of the sensor equipment and sensor data in the whole life cycle is realized.
And then after a controller in the sensor equipment puts forward an adding application to the network, judging whether the digital signature of the sensor equipment passes the authentication based on a digital signature method for the sensor equipment which applies to add to the network and passes the SM2 algorithm and the snowflake algorithm: if the authentication is not passed, the sensor equipment is listed in a list of an abnormal sensor equipment monitoring system, and the information of the sensor equipment is monitored in real time through the abnormal sensor equipment monitoring system; and if the authentication is passed, allowing the sensor equipment to join the network, and executing the next operation.
The SM2 cryptographic algorithm is an elliptic curve public key cryptographic algorithm issued by the national crypto-authority on 12, month and 17 of 2010.
SnowFlake algorithm (SnowFlake) refers to an algorithm that uses a 64Bit number of type long as the globally unique ID. The application in distributed systems is quite extensive and the ID introduces a timestamp. For the embodiments of the present application, the cryptographic SM2 algorithm and the snowflake algorithm belong to the prior art, and are not described in detail.
In S102, the sensor data are sorted according to the acquisition time, and sliding window data are sequentially selected from the sorted sensor data based on a preset sliding window step length.
Sequencing the sensor data according to the acquisition time of the sensor equipment according to the sensor data received in S101 to obtain a sensor data time sequence, setting a sliding window step length for the sensor data time sequence according to a preset sliding window step length, and sequentially selecting sliding window data from the sensor data time sequence according to the sliding window step length, wherein for example, m sensor data is a sliding step length, m is not more than the sensor data time sequence, and when the sensor data time sequence is n, sequentially obtaining n-m +1 windows, n-m +1 windows according to the sliding window step length mEach window is respectively
。
In S103, for each selected sliding window data, a density estimation of the sliding window data is calculated based on the gaussian kernel function, and candidate abnormal data is obtained by screening from the sliding window data based on the density estimation.
In order to make the calculated density estimation of the sliding window data smoother, the density estimation of the sliding window data is calculated based on a Gaussian kernel function, and in order to determine whether the sensor data is a candidate abnormal value, the candidate abnormal data is screened from the sliding window data according to the density estimation and a preset screening threshold value.
In one possible implementation, computing a density estimate for the sliding window data based on a gaussian kernel function includes:
calculating a density estimate of the sliding window data by a first formula, wherein the first formula is:
wherein,
for the purpose of the density estimation,
in order to be able to acquire the sensor data,
for the number of data points in the sliding window,
is the dimension of the sensor data and,
in order to be a bandwidth matrix, the bandwidth matrix,
current sensor data;
screening candidate abnormal data from the sliding window data based on density estimation, wherein the screening candidate abnormal data comprises the following steps:
and screening candidate abnormal data from the sliding window data based on the density estimation and a second formula, wherein the second formula is as follows:
wherein,
in order to preset the screening threshold value,
to screen the weight coefficients.
To compute a density estimate of the sliding window data, a kernel density estimator that outputs a more smoothly estimated gaussian kernel function may be utilized
The kernel density estimator is dynamically updated with newly added sensor data since the gaussian kernel function is a point-based estimate
With reference to equation (1):
wherein,
in order to be a nuclear density estimator,
for sensor data dimensionThe number of the first and second groups is,
in order to be able to acquire the sensor data,
in order to be able to obtain the current sensor data,
is a bandwidth matrix.
Wherein for each dimension
Bandwidth of (2)
The bandwidth per dimension can be calculated according to equation (2) using Scott (Scott) rules
:
Wherein,
for each dimension
The bandwidth of (a) is determined,
is dimension of
The standard deviation of the sensor data is measured,
the number of steps in the sliding window.
Bandwidth matrix
For indicating data far from the current sensor
The influence degree is a diagonal matrix of the kernel function bandwidth, and the specific reference is given to formula (3):
wherein,
is a bandwidth matrix.
In the embodiment of the present application, the most recent sensor data may be stored at regular time intervals, the density estimation in the current sliding window is calculated, and all the sensor data in the current sliding window is substituted into the first formula to obtain the density estimation of the sliding window data based on the gaussian kernel function
。
For determining sensor data
Whether the abnormal data is candidate abnormal data or not can be estimated according to the density of the sliding window data
Setting a predetermined screening threshold
Screening candidate abnormal data from the sliding window data, and presetting a screening threshold value
The calculation formula of (2) refers to the second formula.
In a possible implementation manner, for each selected sliding window data, after the candidate abnormal data is screened from the sliding window data based on the density estimation, the method may further include:
for each candidate abnormal data, if the candidate abnormal data is not allocated with a corresponding abnormal identifier, allocating a corresponding abnormal identifier to the candidate abnormal data; if the candidate abnormal data is distributed with the corresponding abnormal identifier, the value of the abnormal identifier is increased by one.
Since the detected candidate abnormal data is not removed when being detected for the first time, in the embodiment of the present application, a corresponding abnormal identifier may be assigned to each detected candidate abnormal data that is not assigned with a corresponding abnormal identifier
Adding one to the value of the anomaly flag of the detected candidate anomaly data to which the corresponding anomaly flag has been assigned, i.e. adding one to the value of the anomaly flag
。
In S104, candidate abnormal data is screened and an abnormal value is marked.
In one possible implementation, the screening of candidate abnormal data and the marking of abnormal values includes:
for each candidate anomaly data, performing the steps of:
judging whether the abnormal identification of the candidate abnormal data reaches the preset identification times;
if yes, marking the candidate abnormal data as an abnormal value;
if not, determining the candidate abnormal data as normal data.
Based on the number of times of presetting identification
According toException identification assigned to each candidate exception data in S104
If the number of times of the abnormal mark of the candidate abnormal data in the sliding window period reaches the preset mark number of times, that is to say
If yes, marking the candidate abnormal data as an abnormal value; if the number of times of the abnormal identification of the candidate abnormal data in the sliding window period does not reach the preset identification number of times, namely
Then the candidate abnormal data is determined as normal data.
In S105, predicted sensor data is determined based on the prediction model and the sorted sensor data, and the abnormal value and the missing value are subjected to bit padding based on the predicted sensor data.
Since there may be inconsistent outliers in the collected sensor data, which may have a negative impact on the sensor data fusion and subsequent decision making systems, and the outliers in the sensor data are usually very different from the rest of the data, they form a small population in the sensor data, and at different time points, the outliers may exist on different scales, so it is necessary to mark the outliers in the sensor data and to complement the outliers and the missing values.
The abnormal value is the abnormal value obtained from the candidate abnormal data in S104.
The missing value is that when the sensor data is collected, the sensor equipment does not collect the data in the current time period or the collected data is omitted in the time period due to other reasons, the data is used as the missing value, and when the sensor data is sorted according to time, the time period is vacated and is used as the position of the missing value.
In one possible implementation manner, after S104 and before S105, the method may further include:
performing stability inspection on the sorted sensor data based on the stability inspection KPSS, and judging whether an inspection result passes or not;
and if the inspection result does not pass, performing n-order differential calculation on the sorted sensor data until the inspection result passes.
Because the prediction model requires that the time sequence must be stable, the stability test is performed on the sorted sensor data in the embodiment of the application, the stability test KPSS is adopted, and the test result, namely, the jingning, is judged whether to pass the test, if the test is passed, the step S106 can be performed, and if the test is not passed, the n-order differential calculation needs to be performed on the sorted sensor data until the test result is passed, namely, the signal becomes stable.
And carrying out n-order differential calculation on the sorted sensor data, wherein the n order can be a second order or even a third order but cannot exceed the third order, and the value of n is related to the stability test KPSS and is required to be not more than the third order at most.
In one possible implementation, the predictive model is an ARMA model;
the method may further comprise:
the ARMA model is scaled based on the autocorrelation function ACF and the partial autocorrelation function PACF and a residual check is performed to determine if the order is appropriate.
Inputting the sorted sensor data passing through the stability checking KPSS into an ARMA model based on an autocorrelation function ACF and a partial autocorrelation function PACF, determining predicted sensor data, and performing bit filling on abnormal values and missing values according to the predicted sensor data.
In S106, based on the kalman filter algorithm, the state update and the data fusion are performed on the position-supplemented sensor data to obtain sensor fusion data, and the sensor fusion data is output.
The Kalman filtering is an algorithm that performs optimal estimation on the system state by inputting and outputting observation data through a system using a linear system state equation. The optimal estimation can also be seen as a filtering process, since the observed data includes the effects of noise and interference in the system.
And according to the sensor data subjected to position compensation obtained in the step S105, performing state updating and data fusion by using a Kalman filtering algorithm to obtain sensor data fusion data, and outputting the sensor fusion data to a decision execution mechanism.
The application provides a multi-source sensor data credible fusion method, which comprises the steps of receiving sensor data; sorting the sensor data according to the acquisition time, and sequentially selecting sliding window data from the sorted sensor data based on a preset sliding window step length; calculating density estimation of the sliding window data based on a Gaussian kernel function aiming at the sliding window data selected each time, and screening candidate abnormal data from the sliding window data based on the density estimation; screening candidate abnormal data and marking abnormal values; determining predicted sensor data based on the prediction model and the sorted sensor data, and performing bit filling on abnormal values and missing values based on the predicted sensor data; and based on a Kalman filtering algorithm, performing state updating and data fusion on the position-supplemented sensor data to obtain sensor fusion data, and outputting the sensor fusion data. According to the method and the device, the sensor data are sorted according to time, the abnormal values in the sensor data are screened according to the sliding window, the abnormal values and the missing values are subjected to bit supplementing after the abnormal values are obtained, the Kalman filtering algorithm is used for state updating and data fusion, sensor fusion data are obtained, and the reliability of the multi-source sensor data fusion result is improved on the basis of guaranteeing the normal operation of a system.
Fig. 2 shows a schematic structural diagram of a multi-source sensor data credible fusion system provided in an embodiment of the present application, which is detailed as follows:
as shown in fig. 2, the multi-source sensor data trusted fusion system 2 includes a plurality of sensor devices 21, a coordinator 22, a bus control transmission system 23, and a multi-source sensor data trusted fusion device 24, where the coordinator 22 is connected to the sensor devices 21 and the bus control transmission system 23, respectively, and the multi-source sensor data trusted fusion device 24 is connected to the bus control transmission system 23 and the sensor devices 21, respectively;
the sensor device 21 is used for acquiring sensor data and packaging and sending the sensor data to the coordinator 22;
a coordinator 22 for transmitting the sensor data to the bus control transmission system 23;
and the bus control transmission system 23 is used for transmitting the sensor data to the multi-source sensor data credible fusion equipment 24.
The specific flow block diagram of the multi-source sensor data credible fusion system refers to fig. 3:
in one possible implementation, the sensor device 21 is configured to initialize sensor hardware and a protocol stack in the sensor device.
The Protocol stack (also called Protocol stack) is a specific software implementation of a computer network Protocol suite. One protocol in a suite of protocols is typically designed for only one purpose, which may make the design easier. Since each protocol module usually has to communicate with two other protocol modules above and below, they can usually be imagined as layers in a protocol stack. The lowest level of protocols always describes the physical interaction with the hardware. Each advanced level adds more features. The user application is only handling the top-most protocol.
In a possible implementation manner, the sensor device 21 may be further configured to determine, for the initialized sensor device, whether the sensor device is a first-time-accessed sensor device.
Whether the sensor equipment is accessed for the first time is judged, so that a public and private key pair and a unique identifier are distributed to the sensor equipment accessed for the first time, and the sensor data are conveniently sequenced according to the acquisition time during subsequent sensor data fusion.
In addition, whether the sensor equipment is firstly accessed or not is judged, the judgment can be carried out through a control server of the peripheral equipment, and when the sensor equipment is firstly accessed, the information of the sensor equipment is sent to a distribution server, wherein the distribution server can be multi-source sensor data credible fusion equipment or an independent distribution server of the peripheral equipment.
In a possible implementation manner, the multi-source sensor data trusted fusion device 24 may be further configured to, after discovering the sensor device that is accessed for the first time, allocate a public-private key pair to the sensor device that is accessed for the first time based on a secret SM2 algorithm, and allocate a corresponding unique identifier to the sensor device that is accessed for the first time based on a snowflake algorithm.
Public and private key pairs are distributed to the sensor equipment by using the SM2 cryptographic algorithm, so that the IDs in a distributed system are not in conflict, and then due to the characteristics of small and many sensors, a snowflake algorithm is adopted to produce a unique identifier containing a 64Bit integer of 'timestamp + machine code + serial number', and reverse tracing binding of the sensor equipment and the sensor number in the whole life cycle is realized.
In addition, a separate distribution server of the peripheral equipment can be used for distributing public and private key pairs and unique identifiers to the sensor equipment which is accessed for the first time.
In a possible implementation manner, the sensor device 21 may be further configured to send a join application to the multi-source sensor data trusted fusion device, where the join application carries a digital signature.
And searching and applying for joining the network through a controller in the sensor equipment, and sending the joining application to the multi-source sensor data credible fusion equipment.
In a possible implementation manner, the multi-source sensor data trusted fusion device 24 may be further configured to determine whether a digital signature of a certain sensor device passes authentication based on a digital signature method after receiving a join application from the sensor device, where the digital signature is composed of a public and private key pair and a unique identifier; if the digital signature of the sensor equipment is not authenticated, adding the sensor equipment into a monitoring list of an abnormal sensor equipment monitoring system; and if the digital signature authentication of the sensor device passes, allowing the sensor device to join the network.
The sensor equipment added into the monitoring list of the abnormal sensor equipment monitoring system still performs data acquisition work, and the abnormal sensor equipment monitoring system is only used for monitoring the sensor equipment.
The abnormal sensor equipment monitoring system can be realized in the multi-source sensor data credible fusion equipment, and can also be monitored by depending on a peripheral server.
In a possible implementation manner, the sensor device 21 may also be configured to determine whether a preconfigured sampling interval time is reached, and if yes, automatically sample the sensor device that passes the digital signature authentication, wake up the sensor device, and package and send sensor data to the coordinator 22 through the sensor device; if not, continuing to wait until the preset sampling interval time is reached, automatically sampling the sensor equipment passing the digital signature authentication, waking up the sensor equipment, and packaging and sending the sensor data to the coordinator 22 through the sensor equipment.
Whether the sampling interval time which is configured in advance is reached or not can be judged by adopting the sensor equipment, and can also be judged by peripheral judgment equipment, and the judgment result is sent to the sensor equipment.
In one possible implementation, the coordinator 22 may be configured to send the collected sensor data to the bus control transmission system 23.
In one possible implementation, the bus control transmission system 23 may be configured to send the sensor data from the coordinator to the multi-source sensor data trusted fusion device, where the bus control transmission system supports CAN and RS485 communication protocols.
In a possible implementation manner, the multi-source sensor data trusted fusion device 24 may be configured to perform preprocessing and data fusion on sensor data from the bus control transmission system to obtain sensor fusion data, and output the sensor fusion data to the decision making execution mechanism.
The preprocessing process comprises the implementation processes of S101, S102, S103, S104 and S105, and the data fusion comprises the implementation process of S106.
After preprocessing and data fusion of the multi-source sensor data credible fusion equipment, the multi-source sensor data credible fusion equipment can also be used for adding abnormal sensor equipment into a monitoring list of an abnormal sensor equipment monitoring system, so that monitoring of the abnormal sensor is realized.
The application provides a multi-source sensor data credible fusion party system, which receives sensor data; sorting the sensor data according to the acquisition time, and sequentially selecting sliding window data from the sorted sensor data based on a preset sliding window step length; calculating density estimation of the sliding window data based on a Gaussian kernel function aiming at the sliding window data selected each time, and screening candidate abnormal data from the sliding window data based on the density estimation; screening candidate abnormal data and marking abnormal values; determining predicted sensor data based on the prediction model and the sorted sensor data, and performing bit filling on abnormal values and missing values based on the predicted sensor data; and based on a Kalman filtering algorithm, performing state updating and data fusion on the position-supplemented sensor data to obtain sensor fusion data, and outputting the sensor fusion data. According to the method and the device, the sensor data are sorted according to time, the abnormal values in the sensor data are screened according to the sliding window, the abnormal values and the missing values are subjected to bit supplementing after the abnormal values are obtained, the Kalman filtering algorithm is used for state updating and data fusion, sensor fusion data are obtained, and the reliability of the multi-source sensor data fusion result is improved on the basis of guaranteeing the normal operation of a system.
The above-mentioned trusted fusion system and method for multi-source sensor data is described below with an implementation example.
Referring to fig. 3, if there are n sensor devices, after the system is powered on, first, the sensor devices initialize the sensor hardware and the protocol stack.
Secondly, the sensor equipment judges whether the initialized sensor equipment is firstly accessed sensor equipment, if so, the firstly accessed sensor equipment is distributed with a public and private key pair based on a state secret SM2 algorithm through multi-source sensor data credible fusion equipment, and the firstly accessed sensor equipment is distributed with a corresponding unique identifier based on a snowflake algorithm to obtain n sensor equipment with the public and private key pair and the unique identifier, which are recorded as sensor equipment ID1, sensor equipment ID2, \ 8230and sensor equipment IDn.
Thirdly, the sensor equipment sends a joining application to the multi-source sensor data credible fusion equipment, wherein the sensor equipment is initialized and is distributed with a public and private key pair and a unique identifier.
Fourthly, the multi-source sensor data credible fusion equipment receives the data from the first network
After the adding application of the sensor equipment, judging whether the digital signature of the sensor equipment passes the authentication or not based on a digital signature method, if the digital signature does not pass the authentication, adding the sensor equipment into a monitoring list of an abnormal sensor equipment monitoring system, if the digital signature passes the authentication, allowing the sensor equipment to be added into a network, and sequentially judging the n sensor equipment according to the steps.
And fifthly, judging whether the preset sampling interval time is reached or not through the sensor equipment authenticated by the digital signature, if so, controlling the sensor equipment to automatically sample, awakening the sensor equipment, and packaging and sending the sensor data to the coordinator according to the sensor equipment.
And sixthly, sending the sensor data from the coordinator to the multi-source sensor data credible fusion equipment through a bus control transmission system supporting CAN and RS485 communication protocols.
Referring to fig. 4, fig. 4 is a flowchart of an implementation of the trusted fusion method for multi-source sensor data, and all workflows in the flowchart are executed by the trusted fusion device for multi-source sensor data.
Seventhly, after the sensor data are sent to the multi-source sensor data credible fusion equipment through the bus control transmission system, sequencing adjustment is carried out according to the ID of the sensor equipment and the acquisition time, a preset sliding window step length is set for the sequenced sensor data and is recorded as m, namely n-m +1 windows are sequentially obtained through the sliding window m, and the n-m +1 windows are respectively n-m +1 windows
。
Eighthly, calculating density estimation of sliding window data based on a Gaussian kernel function according to the set sliding window
The method comprises the following steps:
kernel density estimator for calculating Gaussian kernel function by referring to formula (1)
Then, referring to the formula (2), calculating the bandwidth of each dimension
Then, the bandwidth matrix is calculated with reference to the formula (3)
And finally, estimating according to the nuclear density
Bandwidth, bandwidth
Sum bandwidth matrix
Obtaining a density estimate of sliding window data based on a Gaussian kernel function
。
Formula (1):
wherein,
in order to provide a kernel density estimator,
in order to be the dimension of the sensor data,
in order to be able to acquire the sensor data,
in order to be able to obtain the current sensor data,
is a bandwidth matrix.
Formula (2):
wherein,
for each dimension
The bandwidth of (a) is determined,
is dimension of
The standard deviation of the sensor data is measured,
the number of steps in the sliding window.
Formula (3):
wherein,
is a bandwidth matrix.
The first formula is:
wherein,
in order to be an estimate of the density,
in order to be able to acquire the sensor data,
for the number of data points in the sliding window,
is the dimension of the sensor data and,
in order to be a bandwidth matrix, the bandwidth matrix,
is the current sensor data.
Ninth, to determine sensor data
Whether it is a candidate anomaly data, based on density estimation
And a preset screening threshold
Screening candidate abnormal data from the sliding window data, wherein a screening threshold value is preset
The calculation formula of (2) refers to the second formula. The second formula is:
wherein,
in order to preset the screening threshold value,
to screen the weighting factors.
Tenth, for each candidate abnormal data, for each detected candidate abnormal data not assigned with the corresponding abnormal mark, assigning a corresponding abnormal mark
Adding one to the value of the anomaly flag of the detected candidate anomaly data to which the corresponding anomaly flag has been assigned, i.e. adding one to the value of the anomaly flag
。
Eleventh, judging whether the abnormal mark of each candidate abnormal data reaches the preset mark times
If yes, marking the candidate abnormal data as an abnormal value, and if not, determining the candidate abnormal data as normal data, specifically as follows:
when the temperature is higher than the set temperature
If yes, marking the candidate abnormal data as an abnormal value;
when the temperature is higher than the set temperature
The candidate outlier is determined to be normal data.
Twelfth, based on the stability check KPSS, performing stability check on the sorted sensor data, and judging whether the check result passes or not, if not, performing second-order or even third-order differential calculation on the sorted sensor data until the signal becomes stable.
Thirteenth, the ARMA model is ranked based on the sensor data after stationarity check based on the ACF and PACF, and residual error check is performed to determine whether the rank is appropriate.
Fourteenth, after the order is determined and verified to be proper, the predicted sensor data is determined according to the ARMA model, the future trend of the sorted sensor data is predicted according to the predicted sensor data, and the abnormal value and the missing value are complemented.
And fifthly, based on a Kalman filtering algorithm, performing state updating and data fusion on the position-supplemented sensor data, and finally outputting the sensor fusion data and sending the data to a decision-making executing mechanism.
The sensor for judging whether the sensor is accessed for the first time, the digital signature verification and the abnormal sensor equipment monitoring system can be uniformly realized by the multi-source sensor data credible fusion equipment, and can also be respectively executed by peripheral equipment such as a server.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
In the following, embodiments of the apparatus of the present application are provided, and for details which are not described in detail therein, reference may be made to the corresponding method embodiments described above.
Fig. 5 shows a schematic structural diagram of a multi-source sensor data credible fusion device provided in an embodiment of the present application, and for convenience of description, only parts related to the embodiment of the present application are shown, which are detailed as follows:
as shown in fig. 5, the multi-source sensor data credible fusion device 5 includes: a receiving module 51, a sorting module 52, a calculating module 53, a marking module 54, a bit complementing module 55 and a fusing module 56;
a receiving module 51, configured to receive sensor data, where the sensor data is collected by a plurality of sensor devices in a network;
the sorting module 52 is configured to sort the sensor data according to the acquisition time, and sequentially select sliding window data from the sorted sensor data based on a preset sliding window step length;
the calculation module 53 is configured to calculate, for each selected sliding window data, a density estimation of the sliding window data based on a gaussian kernel function, and filter candidate abnormal data from the sliding window data based on the density estimation;
a marking module 54, configured to filter candidate abnormal data and mark an abnormal value;
a bit filling module 55, configured to determine predicted sensor data based on the prediction model and the sorted sensor data, and fill in bits for the abnormal values and the missing values based on the predicted sensor data;
and the fusion module 56 is configured to perform state updating and data fusion on the position-supplemented sensor data based on a kalman filtering algorithm to obtain sensor fusion data, and output the sensor fusion data.
The application provides a multi-source sensor data credible fusion device, which receives sensor data; sorting the sensor data according to the acquisition time, and sequentially selecting sliding window data from the sorted sensor data based on a preset sliding window step length; calculating density estimation of the sliding window data based on a Gaussian kernel function aiming at the sliding window data selected each time, and screening candidate abnormal data from the sliding window data based on the density estimation; screening candidate abnormal data, and marking abnormal values; determining predicted sensor data based on the prediction model and the sorted sensor data, and performing bit filling on abnormal values and missing values based on the predicted sensor data; and based on a Kalman filtering algorithm, performing state updating and data fusion on the position-supplemented sensor data to obtain sensor fusion data, and outputting the sensor fusion data. According to the method and the device, the sensor data are sorted according to time, the abnormal values in the sensor data are screened according to the sliding window, the abnormal values and the missing values are subjected to bit supplementing after the abnormal values are obtained, the Kalman filtering algorithm is used for state updating and data fusion, sensor fusion data are obtained, and the reliability of the multi-source sensor data fusion result is improved on the basis of guaranteeing the normal operation of a system.
In one possible implementation, after the calculating module, the apparatus may further include an identification assignment module configured to:
for each candidate abnormal data, if the candidate abnormal data is not distributed with a corresponding abnormal identifier, distributing a corresponding abnormal identifier to the candidate abnormal data; if the candidate abnormal data is distributed with a corresponding abnormal identifier, adding one to the value of the abnormal identifier;
the marking module may specifically be configured to:
for each candidate anomaly data, performing the steps of:
judging whether the abnormal identification of the candidate abnormal data reaches the preset identification times;
if yes, marking the candidate abnormal data as an abnormal value;
if not, determining the candidate abnormal data as normal data.
In one possible implementation, the calculation module may be configured to:
calculating a density estimate of the sliding window data by a first formula, wherein the first formula is:
wherein,
for the purpose of the density estimation,
in order to be able to acquire the sensor data,
for the number of data points in the sliding window,
is a dimension of the sensor data and,
in order to be a bandwidth matrix, the bandwidth matrix,
current sensor data;
screening candidate abnormal data from the sliding window data based on density estimation, wherein the screening candidate abnormal data comprises the following steps:
and screening candidate abnormal data from the sliding window data based on the density estimation and a second formula, wherein the second formula is as follows:
wherein,
in order to preset the screening threshold value,
to screen the weighting factors.
In one possible implementation, after the marking module and before the bit-filling module, the apparatus may further include a stationarity checking module configured to:
performing stability inspection on the sorted sensor data based on the stability inspection KPSS, and judging whether the inspection result passes or not;
and if the detection result does not pass, performing n-order differential calculation on the sorted sensor data until the detection result passes.
In one possible implementation, the predictive model is an ARMA model;
the ARMA model is scaled based on the autocorrelation function ACF and the partial autocorrelation function PACF and a residual check is performed to determine if the order is appropriate.
In a possible implementation manner, before the receiving module, the apparatus may be further configured to:
after the sensor equipment which is accessed for the first time is found, distributing a public and private key pair to the sensor equipment which is accessed for the first time based on a SM2 algorithm, and distributing a corresponding unique identifier to the sensor equipment which is accessed for the first time based on a snowflake algorithm;
after receiving a joining application from certain sensor equipment, judging whether the digital signature of the sensor equipment passes authentication or not based on a digital signature method, wherein the digital signature consists of a public and private key pair and a unique identifier;
if the digital signature of the sensor equipment does not pass the authentication, adding the sensor equipment into a monitoring list of an abnormal sensor equipment monitoring system;
and if the digital signature authentication of the sensor equipment passes, allowing the sensor equipment to join the network.
Fig. 6 is a schematic diagram of a multi-source sensor data credible fusion device provided in an embodiment of the present application. As shown in fig. 6, the multi-source sensor data credible fusion device 6 of this embodiment includes: a processor 60, a memory 61 and a computer program 62 stored in said memory 61 and executable on said processor 60. The processor 60, when executing the computer program 62, implements the steps in each of the above-described embodiments of the trusted fusing method for multisource sensor data, such as S01 to S106 shown in fig. 1. Alternatively, the processor 60, when executing the computer program 62, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the modules 51 to 56 shown in fig. 5.
Illustratively, the computer program 62 may be partitioned into one or more modules/units that are stored in the memory 61 and executed by the processor 60 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 62 in the trusted fusion device 6 for multi-source sensor data. For example, the computer program 62 may be divided into the modules 51 to 56 shown in fig. 5.
The multi-source sensor data trusted fusion device 6 can be a desktop computer, a notebook, a palm computer, a cloud server and other computing devices. The multi-source sensor data trusted fusion device 6 may include, but is not limited to, a processor 60, a memory 61. Those skilled in the art will appreciate that fig. 6 is merely an example of the trusted fusion device 6 of multi-source sensor data, and does not constitute a limitation on the trusted fusion device 6 of multi-source sensor data, and may include more or fewer components than those shown, or combine certain components, or different components, for example, the terminal may also include input-output devices, network access devices, buses, etc.
The Processor 60 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 61 may be an internal storage unit of the multi-source sensor data trusted fusion device 6, for example, a hard disk or a memory of the multi-source sensor data trusted fusion device 6. The memory 61 may also be an external storage device of the multi-source sensor data trusted fusing device 6, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are equipped on the multi-source sensor data trusted fusing device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the multi-source sensor data trusted fusion device 6. The memory 61 is used for storing the computer program and other programs and data required by the terminal. The memory 61 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal and method may be implemented in other ways. For example, the above-described apparatus/terminal embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the processes in the method according to the embodiments may be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the above-described embodiments of the trusted fusion method for multi-source sensor data may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U.S. disk, removable hard disk, magnetic diskette, optical disk, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier wave signal, telecommunications signal, and software distribution medium, etc.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.