Safe and efficient sensor data prediction and search method

By using a time-aware long short-term memory (T-LSTM) network model and an edge-cloud collaborative federated learning framework, the accuracy and privacy protection issues of non-periodic data in sensor data prediction are solved, achieving efficient sensor data prediction and search.

CN121255872APending Publication Date: 2026-01-02COLLEGE OF MOBILE TELECOMM CHONGQING UNIV OF POSTS & TELECOMM
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410556062.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-07
Publication Date
2026-01-02

Smart Images

  • Figure CN121255872A_ABST
    Figure CN121255872A_ABST
Patent Text Reader

Abstract

The invention discloses a safe and efficient sensor data prediction and search method, and belongs to the field of Internet of Things. The method comprises the steps of region division, data acquisition, model construction, joint reasoning, search initiation and search response. Wherein the region division comprises the step of dividing the terminal sensor equipment into a fixed management range according to the geographic position of the terminal sensor equipment, and uniformly managing the terminal sensor equipment by a belonging edge server. The data collection comprises the steps that the sensor collects periodic data or non-periodic data according to the function type of the sensor and uploads the periodic data or the non-periodic data to the edge server. And model construction: constructing a federated learning framework based on edge cloud collaboration, and initializing to construct a sensor data prediction model based on T-LSTM. The joint reasoning comprises the steps that the edge servers and the cloud server cooperatively train prediction models, and the trained prediction models are deployed to the edge servers. Search initiation comprises the step that a user initiates a search request to the edge server through the intelligent client. The search response comprises the steps that the edge server recognizes a user request and executes search operation, and required sensor data information is fed back to the user. The method can effectively improve the search efficiency of the sensor data and protect the data privacy at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the field of Internet of Things, and relates to a safe and efficient sensor data prediction and search method. BACKGROUND

[0002] Sensor devices widely deployed in physical environments can collect real environment data, reflect the changes of physical environments and objects, and effectively predict the change state of sensor data to provide predictive results and facilitate timely decision-making. Search technology for sensor data can achieve real-time response to user needs, and has become one of the indispensable key technologies in the development of Internet of Things.

[0003] Since the sensor data prediction and search technology was proposed, a large number of researchers have invested their research work in it. Sensors continuously collect the change state of the surrounding environment at different times, and a series of data generated thereby has been regarded as typical time series data. Due to the excellent characteristics of the deep learning model of the Convolutional Neural Network (CNN) series in accurately perceiving time series, such models have been widely applied in sensor data prediction, such as typical CNN models, Long Short-Term Memory (LSTM) and its variant model Gate Recurrent Unit (GRU). Existing research selects appropriate models to achieve sensor prediction by considering the conditions of massive data characteristics and limited device resources. Since the depth of sensor time series data contains the change law of the environment, the future environment state can be predicted according to the historical sequence data, which can provide predictive results for the application of scenarios such as smart factories, intelligent transportation and smart homes, and support users to make timely responses or solutions. At the same time, the combination of sensor data prediction and search technology can quickly estimate relevant information for users, support users to obtain information at future time, improve search efficiency and reduce system communication overhead.

[0004] This paragraph lists the research work on sensor data prediction and search. Cheng H, Xie Z, Shi Y, Xiong N in "Multi-Step Data Prediction in Wireless Sensor Networks Based on One-Dimensional CNN and Bidirectional LSTM"

in IEEE Access, vol. 7, pp. 117883-117896, 2019

in IEEE Access, vol. 7, pp. 147962-147974, 2019

[0005] The existing research on sensor data prediction benefits from the powerful learning and nonlinear fitting capabilities of deep learning, and has achieved high prediction accuracy, which in turn helps to improve the search efficiency for sensor data. However, there are still some problems in the research of sensor data prediction and search methods. First, the existing research only considers the type of periodically collected sensor data, and the historical data generated by it is an equidistant time series. The excellent representation ability of CNN series models for equidistant sequences in time provides a good tool for periodic sensor data prediction. However, non-periodic sensor data prediction is not considered, and the type of non-periodic sensor that generates pulse signals also exists in actual situations, and its historical sequence can also reflect the changes in the surrounding environment and has the characteristics of evolving over time. Second, the traditional CNN series model performs poorly in extracting features of non-equidistant time series, which affects the prediction accuracy. Then, the model prediction needs to fully mine the laws and characteristics of massive historical data, and the sensor data reflects the real environment state and has relatively sensitive privacy. The existing method ignores the data privacy protection problem in the training model process. Based on this, it is necessary to design a safe and efficient sensor data prediction method to meet the processing of periodic and non-periodic data, and then ensure the comprehensiveness, security and efficiency of the search service.

[0006] CN113626489B, a sensor data search method, system, computer readable medium and electronic device. The sensor data search method includes: obtaining perception data from a sensor node, wherein the sensor node includes at least one type; based on the data attribute of the perception data, the perception data is data cleaned to obtain the data to be processed; extracting the data label of the data to be processed from the data to be processed; matching the data label and the search condition triggered by the user to determine the target data corresponding to the search condition. The technical scheme of the embodiment of the present application improves the efficiency and accuracy of target data search and processing.

[0007] The patent is difficult to accurately perceive fine-grained time information in the sensor data sequence due to not considering the difference of sensor data change period (i.e. not considering the periodic change attribute with regularity and the non-periodic change attribute without regularity), and further difficult to provide a high-precision prediction mechanism for the sensor data search service, unable to predict the sensor data in advance, and difficult to meet the data search service for users facing the future moment. The present application designs a sensor data prediction mechanism based on T-LSTM time fine-grained perception on the basis of providing data service, which can simultaneously meet the sequence prediction of periodic sensor data and non-periodic sensor data, and effectively overcome the prediction error caused by ignoring the fine-grained time information in the data sequence in the prior art. At the same time, this prediction mechanism can not only provide the foreseeable sensor state for users at the future moment, but also can perform search matching in advance to reduce certain communication overhead in the search process. In addition, in order to realize the data privacy protection problem in the prediction mechanism, the present application constructs the prediction model based on T-LSTM as a federated learning architecture, and the sensor data does not need to be uploaded to the untrusted cloud server, but can obtain the prediction model through the collaborative training of multiple edge servers and the cloud server. SUMMARY

[0008] The present application aims to solve the above problems of the prior art. A safe and efficient sensor data prediction and search method is proposed. The technical scheme of the present application is as follows:

[0009] A safe and efficient sensor data prediction and search method, comprising the following steps:

[0010] S1: regional division step: according to the geographical location of the sensor, it is fixedly divided to the belonging edge server for registration and network management;

[0011] S2: data collection step: according to the different function types of sensors, the collected data is divided into periodic data and non-periodic data, and the sensor uploads the collected data to the belonging edge server for storage;

[0012] S3: model construction step: a sensor data prediction model based on time-aware long short-term memory network T-LSTM is deployed in each edge server, and the data set in the T-LSTM model is taken as the input of the T-LSTM model to extract the deep features contained in each sensor data time sequence represents the time sequence set of the edge server; represents the data value collected by the i-th sensor in the k-th edge server at the time stamp t q

[0013] ​​S4: Joint inference step: use edge-cloud collaboration to build a federated learning framework, so that sensor data does not leave the local edge server and uses the cloud server for parameter aggregation;

[0014] S5: Initiate search step: the user initiates a search request q={ID, time} for a specified sensor to the edge server through the intelligent client device, where ID represents the unique identifier of the sensor, and time represents the time state required by the user for the sensor data;

[0015] S6: Search response step: the edge server responds to the received user search request and performs retrieval operation, and returns the retrieved sensor-related data to the user.

[0016] Further, the step S2 data collection: according to the different sensor function types, the collected data is divided into periodic data and non-periodic data, and the sensor uploads the collected data to the edge server for storage, specifically including:

[0017] Suppose K edge server set All edge servers converge the time series of the sensors within their jurisdiction, forming a complete data set, denoted as, assuming that the time series set of each edge server contains N sensor time series, denoted as Therefore, within a period of time, the time series formed by sensor i is Therefore, within a period of time, the time series formed by sensor i is represents the data value collected by the i-th sensor in edge server k at timestamp t q The interval between data timestamps in the time series of periodic sensor data is equal, i.e. Δt=t2-t1=…=t T -t T-1 ; For non-periodic sensor data, the data timestamps in the time series are not equal, and when the perceived environment changes, new data will be generated, i.e. Δt=t2-t1≠…≠t T -t T-1 .

[0018] Further, the step S3 model construction step specifically includes the following steps:

[0019] S31: Extract time series features from each sensor data time series using T-LSTM; T-LSTM is composed of forget gate f t =σ(W f x t +U f h t-1 +b f ), input gate i t =σ(W i x t+U i h t-1 +b i ), output gate o t = σ(W o x t + U o h t-1 + b o ), hidden layer h t = o t * tanh(C t ), cell state constitutions; C t is the current memory state in the T-LSTM network, is the candidate memory, which is composed of short-term memory cells and long-term memory cells , is the adjusted previous memory; wherein W f , W i , W o , W d , U f , U i , U o are weight parameters in the T-LSTM network model, b f , b i , b o , b c , b d are bias parameters in the LSTM network model; σ(·), φ(·) are sigmoid and tanh activation functions, respectively; x t is input data;

[0020] S32: for the time series sequence formed by the non-periodic sensor data as input data x t in S31 is input into the T-LSTM network in batches, in order to accurately and finely perceive the influence of time intervals in the non-periodic sensor time series sequence, a time decay factor g(Δ t ) = 1 / log(e + Δ t ) is introduced to reconstruct the short-term memory cell, and the reconstructed short-term memory cell is represented as further obtaining the non-periodic sensor time series sequence features extracted by the T-LSTM model in turn and taking the feature corresponding to the last moment as the high-dimensional feature representation of the entire time series sequence;

[0021] S33: for the time series sequence formed by the periodic sensor data as input data x tare sequentially and batched into the T-LSTM network, and g (Δ t ) = 1 is defined to eliminate the influence of the time decay factor, and the reconstructed short-term memory cell is Similarly, the periodic sensor time series sequence feature is obtained, and the feature corresponding to the last moment is taken as the high-dimensional feature representation of the entire time series sequence.

[0022] Further, the step S4 of joint inference specifically includes the following steps:

[0023] S41: The cloud server and the multiple edge server set construct a federated learning framework for collaborative training of a T-LSTM-based sensor data prediction model, assuming that the global collaborative training round set of the cloud server and the edge server is The cloud server initializes the model parameters Θ by the Xavier method and broadcasts the initial model to each edge server;

[0024] S42: Each edge server uses the local sensor time series set in the mth round to locally complete the prediction model training, and the local iteration number is represented as After training F times in the local edge, the parameters are uploaded to the cloud layer for aggregation, and the local model updating process is η is the learning rate, respectively represent the model parameters of the current iteration round and the model parameters of the next iteration round in each edge server k, and SGD (·) is a stochastic gradient descent function for model optimization;

[0025] S43: After each edge server completes local training, the model parameters corresponding to the mth round are uploaded to the cloud server for aggregation, and the aggregation process is represented as Θ m+1 is the model parameter after the m+1th round of aggregation in the cloud server. Then it is again issued to each edge server for model updating, and the local model updating process is represented as

[0026] S44: The cloud server and the edge server repeat the above steps to realize edge-cloud collaborative joint inference. In the model training process, the loss function is defined as where respectively represent the sensor data prediction value and the true value at time t T+1 , and the federated learning optimization goal is to minimize the mean square error MSE of the prediction of all sensor data sets;

[0027] S45: repeat S41-S44 until the target function Loss is minimized and tends to be stable, at this time each edge server saves the trained sensor data prediction model for subsequent data prediction.

[0028] Further, the step S6 of searching for a response specifically comprises the following steps:

[0029] S61: the edge server judges the time state time required by the user for the specified sensor data, if the time state required by the user is the sensor data corresponding to the current time or the past time, the sensor data corresponding to the ID is directly returned to the user;

[0030] S62: if the time state required by the user is the sensor data corresponding to the future time, the edge server judges whether the requirement of the user for the time state is the next time or the future multiple times, and then runs the T-LSTM-based sensor data prediction model to realize one-step prediction or multi-step prediction for the sensor time sequence, and returns the sensor data corresponding to the ID to the user.

[0031] An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the safe and efficient sensor data prediction and search method when executing the program.

[0032] A non-transitory computer readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the safe and efficient sensor data prediction and search method according to any one of the preceding claims.

[0033] A computer program product comprising a computer program, the computer program being executed by a processor to implement the safe and efficient sensor data prediction and search method according to any one of the preceding claims.

[0034] The advantages and beneficial effects of the present application are as follows:

[0035] The safe and efficient sensor data prediction and search method proposed by the present application first proposes a T-LSTM-based sensor data prediction method, which realizes high-precision prediction for periodic and non-periodic sensor data sequences, and overcomes the difficulty of existing methods in accurately predicting non-equidistant sequences. Secondly, in order to protect the privacy of sensor data, a federated learning training framework is introduced to realize collaborative reasoning of the sensor data prediction model. Further, a search feedback mechanism for current time request and future time request is designed.

[0036] A sensor data prediction method based on T-LSTM, corresponding to steps S2 and S3. In step S2, the differentiated sensor data attributes are described in detail, and are divided into periodic sensor data and non-periodic sensor data, and data abstraction is performed using a formula. Then in step S3, a T-LSTM-based data prediction mechanism is designed for periodic sensor data and non-periodic sensor data. This method uses the non-equidistant time perception function of T-LSTM to finely perceive the time interval information contained in the non-periodic sensor data sequence, overcomes the difficulty of existing technology in processing non-equidistant sequences, and improves the prediction accuracy. For periodic sensor data, the T-LSTM-based data prediction mechanism changes the time decay factor in T-LSTM to adapt to the prediction of equidistant time sequences, and has flexibility. In summary, the T-LSTM-based data prediction mechanism can realize high-precision prediction for periodic and non-periodic sensor data sequences.

[0037] A model joint inference method based on federated learning, corresponding to step S4. The training of the T-LSTM-based data prediction model needs to use a large amount of sensor data sequence information. The traditional centralized method needs to upload all the data to the cloud server by each edge server, which will cause the problem of data privacy leakage. Therefore, a federated learning training framework is constructed by introducing edge-cloud cooperation to realize the collaborative inference of the sensor data prediction model. This method can keep the data in the trusted edge server without uploading to the untrusted cloud server, which not only protects the data privacy but also obtains the T-LSTM-based data prediction model, taking into account the privacy and availability of data. BRIEF DESCRIPTION OF DRAWINGS

[0038] Fig. 1 is a sensor data prediction and search system block diagram provided by the preferred embodiment of the present application;

[0039] Fig. 2 is a time-aware long short-term memory network model schematic diagram used by the present application.

[0040] Fig. 3 is a sensor data prediction and search flowchart provided by the embodiment of the present application. DETAILED DESCRIPTION

[0041] The technical solutions in the embodiments of the present application will be described in detail below with reference to the drawings in the embodiments of the present application. The described embodiments are only a part of the embodiments of the present application.

[0042] The technical solution of the present application to solve the above technical problems is:

[0043] Please refer to Figs. 1-3 , specifically comprising the following system component modules:

[0044] Search user: Search users in the proposed system model can be visualized as belonging to the terminal layer. Users send requests to edge servers through smart client devices (such as mobile phones, computers, etc.) according to their own needs. Influenced by the surrounding environment, users' demand for sensor data can be divided into three categories according to the time sequence: historical moment-oriented sensor data search, current moment-oriented sensor data search, and future moment-oriented sensor data search.

[0045] Sensor: Located in the terminal layer of the Internet of Things, the sensor is attached to a physical entity to collect its state information, reflecting environmental changes such as temperature, humidity, air quality, etc., providing a data foundation for the Internet of Things system.

[0046] Edge server: The edge server is responsible for aggregating and processing data collected from sensors. Since the edge server only stores data within its jurisdiction, it is usually assumed to be honest and trustworthy and will not leak sensor data privacy. It builds a federated learning framework with the cloud server to obtain the proposed sensor data prediction model through collaborative training, and responds to users' search requests to provide relevant results to users.

[0047] Cloud server: The cloud server has strong communication, storage, and computing capabilities, and can implement inference capabilities within the network and withstand attacks from the outside, so it is considered untrusted. It serves as the central server of the federated learning framework, responsible for initializing and deploying the prediction model and performing multi-round parameter aggregation operations.

[0048] A safe and efficient sensor data prediction and search method specifically includes the following steps:

[0049] Step 1: Region division: According to the geographical location of the sensor, it is fixedly divided into the edge server to which it belongs for registration, network management, etc.

[0050] Step 2: Data collection: According to the different types of sensor functions, the data collected can be divided into periodic data and non-periodic data. The sensor uploads the collected data to the edge server for storage, so that the edge server can aggregate sensor data and perform processing and application. Assume that there are K edge server sets All edge servers aggregate the time series of sensors within their jurisdiction to form the entire data set, denoted as Assume that each edge server's time series set contains N sensor time series, denoted as 1≤i≤N. Therefore, within a certain period of time, the time series formed by sensor i is represents the i-th sensor in edge server k at time stamp t qCollected data values. For periodic sensor data, the intervals between data timestamps in its time series are equal, i.e. Δt = t2-t1=…=t T -t T-1 ; for non-periodic sensor data, the data timestamps in its time series are unequal, new data will be generated when the perceived environment changes, i.e. Δt = t2-t1≠…≠t T -t T-1 .

[0051] Step three: model construction: deploy a T-LSTM-based sensor data prediction model in each edge server, and use the data set in S2 as the input of the T-LSTM model to extract the deep features contained in each sensor data time series

[0052] Step four: joint inference: since the T-LSTM-based sensor data prediction model in S3 needs to be supported by real sensor time series data and fully extract its features, there is a risk of privacy leakage of sensor data and real environment. According to the characteristics that the cloud server is not trusted and the edge server is trusted, a federated learning framework is constructed by edge-cloud cooperation, so that the sensor data does not leave the local edge server and the cloud server is used for parameter aggregation. This method can effectively protect the privacy of sensor data while realizing sensor data prediction.

[0053] Step five: initiate search: the user initiates a search request for a specified sensor q={ID, time} through the intelligent client device to the edge server, where ID represents the unique identifier of the sensor, and time represents the time state required by the user for the sensor data.

[0054] Step six: search response: the edge server responds to the received user search request and performs retrieval operation, and returns the retrieved sensor-related data to the user.

[0055] Further, the step three specifically includes:

[0056] Step three (one): each sensor data time series extracts time series features through T-LSTM. T-LSTM is composed of a forget gate f t =σ(W f x t +U f h t-1 +b f ), an input gate i t =σ(W i x t +U i h t-1 +b i ), and an output gate o​t = σ(W o x t + U o h t-1 + b o ), hidden layer h t = o t tanh(C t ), cell state C t is the current memory state in the T-LSTM network, is the candidate memory, which is composed of short-term memory cell and long-term memory cell , is the adjusted previous memory. Wherein, W f , W i , W o , W d , U f , U i , U o are weight parameters in the T-LSTM network model, b f , b i , b o , b c , b d are bias parameters in the LSTM network model. σ(·), φ(·) are sigmoid and tanh activation functions respectively. x t is the input data.

[0057] Step three (two): for the time series sequence formed by the non-periodic sensor data as the input data x t in step three (one) is input into the T-LSTM network in batches, in order to accurately and finely perceive the influence of time interval in the non-periodic sensor time series sequence, a time decay factor g(Δ t ) = 1 / log(e + Δ t ) is introduced to reconstruct the short-term memory cell, and the reconstructed short-term memory cell is represented as further get the non-periodic sensor time series sequence features extracted by T-LSTM model in turn and the feature corresponding to the last moment as the high-dimensional feature representation of the entire time series sequence.

[0058] Step three (three): for the time series sequence formed by the periodic sensor data as the input data x tare input into the T-LSTM network in turn in batches. Since the time intervals of the periodic sensor time series are equal, they cannot reflect the fine-grained characteristics in the time dimension. Therefore, g(Δ t ) = 1 is defined to eliminate the influence of the time decay factor, and the reconstructed short-term memory cell is Similarly, the periodic sensor time series feature is obtained, and the feature corresponding to the last time is taken as the high-dimensional feature representation of the entire time series.

[0059] Further, the step four specifically comprises:

[0060] Step four (one): the cloud server and the plurality of edge server sets construct a federated learning framework for collaborative training of a T-LSTM-based sensor data prediction model. It is assumed that the global collaborative training round set of the cloud server and the edge server is The cloud server initializes the model parameters Θ by the Xavier method and broadcasts the initial model to each edge server.

[0061] Step four (two): each edge server uses a local sensor time series set to locally complete the prediction model training in the mth round. The local iteration number is represented as After training F times in the local edge, the parameters are uploaded to the cloud layer for aggregation. The local model update process is η is the learning rate, respectively represent the model parameters of the current iteration round and the model parameters of the next iteration round in each edge server, and SGD(·) is a stochastic gradient descent function for model optimization.

[0062] Step four (three): after each edge server completes the local training, the model parameters corresponding to the mth round are uploaded to the cloud server for aggregation. The aggregation process is represented as Θ m+1 is the model parameter after the m+1th round aggregation in the cloud server. Then it is again issued to each edge server in the next round for model updating. The local model update process is represented as

[0063] Step four (four): the cloud server and the edge server repeat the above steps to realize edge-cloud collaborative joint inference. In the model training process, the loss function is defined as where respectively represent the sensor data prediction value and the true value at time t T+1 , and the federated learning optimization goal is to minimize the mean square error (MSE) of the prediction of all sensor data sets.

[0064] Step four(five): repeat steps four(one)~step four(four) until the objective function Loss is minimized and tends to be stable, at this time each edge server saves the trained sensor data prediction model for subsequent data prediction.

[0065] Further, the step six specifically includes:

[0066] Step six(one): the edge server judges the time state time required by the user for the specified sensor data, if the time state required by the user is the sensor data corresponding to the current time or the past time, the sensor data corresponding to the ID is directly returned to the user.

[0067] Step six(two): if the time state required by the user is the sensor data corresponding to the future time, the edge server judges whether the requirement of the user for the time state is the next time or the future multiple times, and then runs the T-LSTM-based sensor data prediction model to realize one-step or multi-step prediction for the sensor time sequence, and returns the sensor data corresponding to the ID to the user.

[0068] The system, device, module or unit illustrated in the above embodiments can be specifically implemented by a computer chip or entity, or by a product with certain functions. A typical implementation device is a computer. Specifically, the computer may, for example, be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0069] The computer readable medium includes permanent and non-permanent, removable and non-removable media, which can be implemented by any method or technology to store information. The information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage device, or any other non-transmission medium that can be used to store information accessible by a computing device. According to the definition herein, computer readable medium does not include transitory computer readable medium, such as modulated data signals and carriers.

[0070] It is also to be noted that the terms "comprising", "including", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can also include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises a... " does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the element.

[0071] The above examples are to be understood only as illustrative of the application and not a restriction on the scope of protection of the application. After reading the specification, the skilled person can make various changes or modifications to the application, and these equivalent changes and modifications also fall within the scope defined by the claims of the application.

Claims

1. A secure and efficient sensor data prediction and search method, characterized in that, The method comprises the following steps: S1: a region division step: according to the geographical position of the sensor, the sensor is fixedly divided into a corresponding edge server for registration and network management; S2: a data collection step: according to different types of sensor functions, the collected data is divided into periodic data and non-periodic data, and the sensor uploads the collected data to the corresponding edge server for storage; S3: model construction step: deploy a sensor data prediction model based on time-aware long short-term memory network T-LSTM in each edge server, and take the data set in as the input of the T-LSTM model to extract the deep features contained in each sensor data time series represents a time series set of edge servers; represents the data value collected by the i-th sensor in the k-th edge server at the time stamp t q . S4: a joint inference step: a federated learning framework is constructed by using edge cloud cooperation, so that the sensor data does not leave the local edge server and the cloud server is used for parameter aggregation; S5: a search initiation step: a user initiates a search request q={ID, time} for a specified sensor to an edge server through an intelligent client device, wherein ID represents a unique identifier of the sensor, and time represents a time state required by the user for the sensor data; S6: a search response step: the edge server responds to the received user search request and performs a retrieval operation, and returns the retrieved sensor-related data to the user.

2. The method of claim 1, wherein, The step S2 data collection: according to different types of sensor functions, the collected data is divided into periodic data and non-periodic data, and the sensor uploads the collected data to the corresponding edge server for storage, specifically comprising: Assume K edge server set All edge servers collect the time series of sensors within their jurisdiction, and the total data set is denoted as, assuming that each edge server has a time series set of N sensors, denoted as Therefore, within a period of time, the time series formed by sensor i is denotes the data value collected by the i-th sensor in edge server k at timestamp t q ; for periodic sensor data, the interval between data timestamps in its time series is equal, i.e., Δt = t2 - t1 =... = t T -t T-1 ; for non-periodic sensor data, the interval between data timestamps in its time series is not equal, and new data will be generated when the perceived environment changes, i.e., Δt = t2 - t1 ≠... ≠ t T -t T-1 .​ 3. The method of claim 2, wherein, The step S3 model construction step specifically comprises the following steps: S31: each sensor data time sequence extracts time sequence features through T-LSTM; T-LSTM is composed of a forget gate f t = σ(W f x t + U f h t-1 + b f ), an input gate i t = σ(W i x t + U i h t-1 + b i ), an output gate o t = σ(W o x t + U o h t-1 + b o ), a hidden layer h t = o t *tanh(C t ), and a cell state C t = f f * C i + i o * tanh(h d )); C f is a current memory state in the T-LSTM network, is a candidate memory composed of a short-term memory cell and a long-term memory cell , is an adjusted previous memory; wherein W f , W i , W o , W d , U f , U i , U o are weight parameters in the T-LSTM network model, and b f , b i , b o , b c , b d are bias parameters in the LSTM network model; σ(·) and φ(·) are sigmoid and tanh activation functions, respectively; x t is input data. S32: forming a time sequence for non-periodic sensor data as input data x in S31 t are input into the T-LSTM network in turn, in order to accurately and finely perceive the influence of the time interval in the non-periodic sensor time sequence, a time decay factor g(Δ t ) = 1 / log(e + Δ t ) is introduced to reconstruct the short-term memory cell, and the reconstructed short-term memory cell is represented as and further obtain the non-periodic sensor time sequence features extracted by the T-LSTM model in turn and the feature corresponding to the last moment is taken as the high-dimensional feature representation of the entire time sequence. S33: Time series sequence formed for periodic sensor data as input data x in S31 t are sequentially and batchly input into the T-LSTM network, and g(A t ) = 1 is defined to eliminate the influence of the time decay factor, and the reconstructed short-term memory cell is Similarly, the periodic sensor time series sequence feature is obtained, and the feature corresponding to the last moment is taken as the high-dimensional feature representation of the entire time series sequence.

4. The method of claim 1, wherein, The step S4 joint inference step specifically comprises the following steps: S41: The cloud server and the plurality of edge server sets A federated learning framework is constructed for collaborative training of a sensor data prediction model based on T-LSTM, assuming that the global collaboration training round set of the cloud server and the edge server is The cloud server initializes the model parameters Θ by the Xavier method and broadcasts the initial model to each edge server. S42: each edge server locally completes the prediction model training using the local sensor timing sequence set in the mth round, and the local iteration number is represented as After training F times in the local edge, the parameters are uploaded to the cloud layer for aggregation, and the local model updating process is η is the learning rate, respectively represent the model parameters of the current iteration round and the model parameters of the next iteration round in each edge server k, and SGD(·) is a stochastic gradient descent function for model optimization; S43: After each edge server completes local training, the model parameters Θ k m upload to the cloud server for aggregation, and the aggregation process is represented as Θ m+1 is the model parameter of the cloud server after the m+1 round of aggregation. Then, it is again distributed to each edge server for model updating in the next round, and the local model updating process is represented as S44: the cloud server and the edge server repeat the above steps to realize the edge-cloud collaborative joint inference. In the model training process, the loss function is defined as wherein respectively represent the predicted value and the true value of the sensor data at time t T+1 The optimization objective of the federated learning is to minimize the mean square error (MSE) of the prediction of all sensor data sets. S45: repeat S41-S44 until the target function Loss is minimized and tends to be stable, at which time each edge server saves the trained sensor data prediction model for subsequent data prediction.

5. The method of claim 1, wherein, The step S6 search response step specifically comprises the following steps: S61: the edge server judges the time state time required by the user for the specified sensor data, if the time state required by the user is the sensor data corresponding to the current time or the past time, then the sensor data corresponding to the ID is directly returned to the user; S62: if the time state required by the user is the sensor data corresponding to the future time, then the edge server judges whether the requirement of the user for the time state is the next time or multiple future times, and then runs the T-LSTM-based sensor data prediction model to realize one-step prediction or multi-step prediction for the sensor time sequence, and then returns the sensor data corresponding to the ID to the user.

6. An electronic device, comprising: The computer program is executed by the processor to realize the safe and efficient sensor data prediction and search method according to any one of claims 1-5.

7. A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program is executed by the processor to realize the safe and efficient sensor data prediction and search method according to any one of claims 1-5.

8. A computer program product comprising a computer program, characterized in that, The computer program is executed by the processor to realize the safe and efficient sensor data prediction and search method according to any one of claims 1-5.