A method, device, electronic device and medium for querying Internet of Things data

By querying and displaying IoT data in stages, eliminating abnormal data and filtering data using deviation calculation model, the problem of data delay and timing feature display in the IoT platform is solved, and low-latency query and efficient display are achieved.

CN114238392BActive Publication Date: 2024-12-20JIAXUN FEIHONG (BEIJING) INTELLIGENT TECH RES INST CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111570440.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-21
Publication Date
2024-12-20
Estimated Expiration
2041-12-21

AI Technical Summary

Technical Problem

When existing IoT platforms display huge data in order to achieve large orders of magnitude, they have a long delay and cannot effectively reflect the characteristics of time series data, making it difficult to achieve efficient curve data processing and display.

Method used

By querying and displaying IoT data in stages, abnormal data is first eliminated and divided into two types of data that are not disturbed and interfered. The deviation calculation model and data verification are used to filter out data that meets the accuracy conditions and are in memory perform operations to reduce delay.

Benefits of technology

It realizes low-latency query and efficient display of IoT data, improves computing speed, reduces data volume, makes it possible to directly perform computing in memory, and reduces query delay of IoT data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114238392B_ABST
    Figure CN114238392B_ABST
Patent Text Reader

Abstract

The present application provides a method, device, electronic device and medium for querying Internet of Things data, which are applied to an Internet of Things platform. The query method includes: obtaining target Internet of Things data that meets a first accuracy condition, and selecting first Internet of Things data that meets a second accuracy condition and second Internet of Things data that does not meet the second accuracy condition; the second accuracy condition is used to distinguish between the first Internet of Things data that is not interfered with and the second Internet of Things data that is interfered with from the target Internet of Things data; responding to a first query request for the target Internet of Things data, querying and displaying the first Internet of Things data, and at the same time, displaying a target control; responding to a second query request triggered by operating the target control, querying and displaying the target Internet of Things data including the first Internet of Things data and the second Internet of Things data; the present application queries and displays the Internet of Things data in stages to achieve low-latency query of the Internet of Things data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of Internet of Things, and in particular to a method, device, electronic device and medium for querying Internet of Things data. Background Art

[0002] Although most of the current IoT platforms provide data display functions, they are all presented in the form of data lists, which do not reflect the characteristics of time series data. There are also a few IoT platforms that present data in the form of data curves, but there are problems such as long delays. How to display and process such a huge amount of data in the form of curves has become an urgent problem that the IoT industry needs to solve. Summary of the invention

[0003] In view of this, the purpose of this application is to provide a method, device, electronic device and medium for querying IoT data, which query and display IoT data in stages to achieve low-latency query of IoT data.

[0004] An Internet of Things data query method provided in an embodiment of the present application is applied to an Internet of Things platform, and the query method includes:

[0005] Acquire target IoT data that meets a first accuracy condition, where the target IoT data is collected data without abnormalities;

[0006] Selecting first IoT data satisfying a second accuracy condition and second IoT data not satisfying the second accuracy condition from the target IoT data; the second accuracy condition is used to distinguish undisturbed first IoT data and disturbed second IoT data from the target IoT data;

[0007] In response to a first query request for the target IoT data, query first IoT data of the first IoT data that is not interfered with, and display the first IoT data, and at the same time, display a target control;

[0008] In response to a second query request triggered by operating the target control, query the interfered second Internet of Things data, and display the target Internet of Things data including the first Internet of Things data and the second Internet of Things data.

[0009] In some embodiments, in the method for querying Internet of Things data, the step of selecting first Internet of Things data that meets the second accuracy condition and second Internet of Things data that does not meet the second accuracy condition from the target Internet of Things data includes:

[0010] For multiple target IoT data, calculate the deviation of each target IoT data; the deviation is used to characterize the degree to which the target IoT data is affected by interference factors;

[0011] According to the deviation of each target IoT data, first IoT data with a deviation less than or equal to a second accuracy threshold is selected from the multiple target IoT data, and second IoT data with a deviation greater than the second accuracy threshold is selected.

[0012] In some embodiments, the method for querying IoT data includes calculating the deviation of each target IoT data for multiple target IoT data, including:

[0013] The deviation of each target IoT data among the multiple target IoT data is calculated by using a trained deviation calculation model; the deviation calculation model is a regression model including trained model parameters; the trained regression model is a regression model whose accuracy reaches a preset accuracy threshold; the accuracy of the regression model is determined according to an evaluation function predefined in the regression model.

[0014] In some embodiments, the method for querying IoT data, wherein obtaining target IoT data that meets a preset first accuracy condition, includes:

[0015] For the acquired original IoT data, filter out the complete original IoT data that conforms to a preset data type; the preset data type is determined according to the application scenario of the original IoT data;

[0016] For the complete original IoT data that conforms to the preset data type, target IoT data that meets the preset threshold range conditions are screened out again; the preset threshold range conditions are determined based on data features of the pre-stored target IoT data.

[0017] In some embodiments, the method for querying IoT data includes screening out target IoT data that meets a preset threshold range condition again for the complete original IoT data that meets the preset data type, including:

[0018] For the complete original IoT data that conforms to the preset data type, filter out the original IoT data that meets a first preset threshold range; the first preset threshold range is determined according to the mean and standard deviation of the pre-stored target IoT data;

[0019] For the original IoT data that meets the first preset threshold range, target IoT data that meets the second preset threshold range is screened out; the second preset threshold range is determined based on the mean, maximum and minimum values ​​of the pre-stored target IoT data.

[0020] In some embodiments, in the method for querying IoT data, the responding to the first query request for the target IoT data and querying the first IoT data that meets the second accuracy condition includes: responding to the first query request for the target IoT data and querying the first IoT data that meets the second accuracy condition from the hotspot data cached by the IoT platform;

[0021] In response to a second query request triggered by operating the target control, querying second IoT data that does not meet the second accuracy condition, including: in response to the second query request triggered by operating the target control, querying the second IoT data that does not meet the second accuracy condition from the hotspot data cached by the IoT platform;

[0022] The hot data are target IoT data whose query times meet preset conditions or target IoT data within a preset time period.

[0023] In some embodiments, in the method for querying IoT data, the target IoT data includes multiple types of IoT data that are interrelated.

[0024] In some embodiments, a device for querying IoT data is also provided, which is applied to an IoT platform, and the query device includes:

[0025] An acquisition module, used to acquire target IoT data that meets a first accuracy condition, wherein the target IoT data is collected data without abnormalities;

[0026] A selection module, configured to select first IoT data satisfying a second accuracy condition and second IoT data not satisfying the second accuracy condition from the target IoT data; the second accuracy condition is configured to distinguish undisturbed first IoT data and disturbed second IoT data from the target IoT data;

[0027] A first query module, configured to respond to a first query request for the target IoT data, query first IoT data of the first IoT data that is not interfered with, and display the first IoT data, and at the same time, display a target control;

[0028] The second query module is used to respond to a second query request triggered by operating the target control, query the interfered second Internet of Things data, and display the target Internet of Things data including the first Internet of Things data and the second Internet of Things data.

[0029] In some embodiments, an electronic device is also provided, including: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps of the method for querying Internet of Things data are performed.

[0030] In some embodiments, a computer-readable storage medium is also provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method for querying Internet of Things data are executed.

[0031] The method for querying IoT data described in the present application first eliminates abnormal IoT data, thereby reducing the amount of IoT data at the source of the data, and then divides the retained target IoT data into two categories. When displaying the data, it is divided into two display stages. Each display stage only performs query and display operations on one type of data, rather than performing operations based on the full amount of data. This improves the operation speed and reduces the query delay of IoT data. Since the amount of data during operation is reduced, it becomes possible to perform operations directly in the memory, which can further reduce the query delay of IoT data in some scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0033] Figure 1 A method flow chart of a method for querying Internet of Things data according to an embodiment of the present application is shown;

[0034] Figure 2 A flow chart of a method for obtaining target IoT data that meets a preset first accuracy condition according to an embodiment of the present application is shown;

[0035] Figure 3 A flow chart of a method for data verification according to an embodiment of the present application is shown;

[0036] Figure 4 A flow chart of a method for selecting first IoT data and second IoT data from target IoT data according to an embodiment of the present application is shown;

[0037] Figure 5 A diagram showing the association display results of various types of IoT data described in an embodiment of the present application is shown;

[0038] Figure 6 A schematic diagram showing the structure of a device for querying Internet of Things data according to an embodiment of the present application is shown;

[0039] Figure 7 A schematic structural diagram of an electronic device described in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0040] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0041] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0042] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0043] According to the "White Paper on China's Intelligent Internet of Things (AIOT)", it is estimated that by 2025, the number of IoT connections in my country will be close to 20 billion. Massive connections will become the foundation for the industry to move towards intelligence. With massive connections, the storage volume of perception data is showing a rapid growth trend. In order to present the perception data with time series characteristics more vividly, a continuous curve is usually drawn on the human-computer interaction interface with time as the horizontal axis and data value as the vertical axis.

[0044] Although most of the current IoT platforms provide data display functions, they are all presented in the form of data lists, which do not reflect the characteristics of time series data. There are also a few IoT platforms that present data in the form of data curves, but there are problems such as long delays and the inability to display real-time curves in a related manner. The display and processing of such a huge amount of data in the form of curves has also become an urgent problem that needs to be solved in the IoT industry.

[0045] The reason why the data curve display in the existing IoT platform has a long delay is that the existing calculation method is based on the full amount of data, the memory capacity cannot meet the requirements, and the disk is required for calculation, which has a high data processing delay. The method described in this application divides the original IoT data into two categories, and divides it into two display stages when displaying data. Each display stage only displays one type of data, rather than calculating based on the full amount of data, which improves the calculation speed and reduces the query delay of IoT data. Since the amount of data is reduced during calculation, it becomes possible to perform calculations directly in the memory, which can further reduce the query delay of IoT data in some scenarios.

[0046] Based on this, Figure 1 As shown, the embodiment of the present application proposes a method for querying IoT data, which is applied to an IoT platform. The query method includes:

[0047] S101, acquiring target IoT data that meets a first accuracy condition, wherein the target IoT data is collected data without abnormalities;

[0048] S102, selecting first IoT data that meets a second accuracy condition and second IoT data that does not meet the second accuracy condition from the target IoT data; the second accuracy condition is used to distinguish undisturbed first IoT data and disturbed second IoT data from the target IoT data;

[0049] S103, responding to a first query request for the target IoT data, querying first IoT data of the first IoT data that is not interfered with, and displaying the first IoT data, and at the same time, displaying a target control;

[0050] S104: In response to a second query request triggered by operating the target control, query the interfered second IoT data, and display the target IoT data including the first IoT data and the second IoT data.

[0051] In step S101, the target IoT data is the physical parameters collected by the IoT device, which are usually the operating parameters of the IoT device or the environmental parameters of the environment in which the IoT device is located; the operating parameters of the IoT device are such as voltage value, current value, motor speed, extension tension of the operating rod bearing seat of the switch machine, etc., and the environmental parameters of the environment in which the IoT device is located are such as temperature value, humidity value, etc.

[0052] The target IoT data satisfying the first accuracy condition is obtained, that is, the original IoT data collected by the IoT device is subjected to data preprocessing and data verification. Through the data preprocessing and data verification, abnormal data in the original IoT data is eliminated, and data without abnormality is retained as the target IoT data.

[0053] like Figure 2 As shown, the data preprocessing and data verification of the method for querying IoT data, that is, obtaining target IoT data that meets the preset first accuracy condition, includes:

[0054] S201. Filtering out complete original IoT data that conforms to a preset data type from the acquired original IoT data; the preset data type is determined according to an application scenario of the original IoT data;

[0055] S202. For the complete original IoT data that conforms to the preset data type, target IoT data that meets the preset threshold range condition is screened out again; the preset threshold range condition is determined according to data characteristics of the pre-stored target IoT data.

[0056] Among them, the step S201, i.e., the data preprocessing, is to verify the legality of the data type of the original IoT data, to conduct integrity audit on the value of the original IoT data, to remove data with empty or empty string values, to provide a good data sample for data verification, and to ensure the stable operation of the data verification module. The preset data type is determined according to the application scenario of the original IoT data, and the preset data type for different application scenarios is different, and different application scenarios are specific application scenarios of different IoT devices.

[0057] The data preprocessing specifically includes: using a big data spark streaming computing framework, running it on a cloud platform with sufficient resources, and taking advantage of the powerful processing performance of the computing framework to receive massive amounts of original IoT data from IoT devices in real time, and verifying the data type of the original IoT data and the reported value, and verifying whether the value type of the original IoT data is consistent with the preset data type. If not, the original IoT data is directly discarded. If consistent, the original IoT data that has been verified for legality is stored in a hive data warehouse; using the overwrite function of the big data technology hive to remove the original IoT data with null values ​​in the hive data warehouse, and rewrite the retained original IoT data into the hive data warehouse.

[0058] The step S202 is data verification. In some embodiments, the method for querying IoT data further screens out target IoT data that meets the preset threshold range conditions for the complete original IoT data that meets the preset data type, such as Figure 3 As shown, including:

[0059] S301. Filter out original IoT data that meets a first preset threshold range for the original IoT data that is complete and conforms to a preset data type; the first preset threshold range is determined based on a mean and a standard deviation of pre-stored target IoT data;

[0060] S302: Filter out target IoT data that meets a second preset threshold range for the original IoT data that meets the first preset threshold range; the second preset threshold range is determined based on the mean, maximum, and minimum values ​​of the pre-stored target IoT data;

[0061] The pre-stored target IoT data, that is, the target IoT data that has passed data preprocessing and data verification and is stored before the inspection, in the embodiment of the present application, is the target IoT data that has passed data preprocessing and data verification and is stored in the hive data warehouse before the inspection.

[0062] The role of data verification is to verify the accuracy of the original IoT data and remove some unreasonable original IoT data points based on the verification results. The data verification process mainly includes two aspects, namely, checking whether the data is consistent with the objective actual situation through the 3σ abnormal data calculation method and the threshold range calculation method, whether it can truly reflect the indicators of the monitoring object of the IoT device, and removing the data points that violate the actual objective situation as abnormal IoT data, and retaining the target IoT data without abnormalities.

[0063] In the S301, based on the big data technology, the massive IoT data stored in the hive data warehouse is statistically analyzed, wherein the standard deviation σ and the average value μ of the previously stored target IoT data are calculated, and the IoT data outside the range of (μ-3σ, μ+3σ) are marked as abnormal points and eliminated. However, in actual applications, the 3σ abnormal data calculation method can only eliminate 0.26% of the IoT data. At this time, the IoT data sample is still huge. Therefore, as described in step S302, the loose dynamic threshold range calculation method is used again to judge the IoT data within the interval of (μ-3σ, μ+3σ) to exceed the limit, and the data exceeding the threshold in the original IoT data is eliminated, and the number of data samples is reduced again. The specific steps are as follows:

[0064] According to the average value μ, maximum value max, and minimum value min of the target IoT data stored previously, the minimum value q of max-μ and μ-min is selected, and the threshold T=μ+q.

[0065] The purpose of using μ+q as the threshold T is to make the filtering conditions more relaxed, allowing more original IoT data to pass this filtering condition and reducing the number of valuable original data that are discarded. The average value μ, maximum value max, and minimum value min change continuously according to the continuous accumulation of target IoT data in the data warehouse, and the threshold T is also continuously updated, making the threshold T more reasonable.

[0066] In some embodiments, in order to further rationalize the threshold, the query method further includes: responding to the user's modification operation, modifying the second preset threshold range. That is, providing an interface for manually modifying the threshold T, through which the threshold calculated by the machine is replaced. At the same time, a verification interface for closing the dynamic threshold can also be provided to stop the threshold T from being updated.

[0067] The step S102, i.e., the data analysis process, classifies the data without abnormalities that have passed data preprocessing and data verification by performing data analysis on the target IoT data.

[0068] The actual IoT data collection process in the IoT system is often disturbed by various interference factors, such as the magnetic field of the motor is affected by the change of the power supply frequency, the controller performance is affected by environmental factors, resulting in a lag in the sampling time, and when the IoT data is calculated according to the preset formula, the error caused by the preset formula. The existence of interference factors makes the IoT data without abnormalities can be divided into two categories, one is less disturbed by the interference factors, called the first IoT data that is not disturbed, and the other is more disturbed by the interference factors, called the second IoT data that is disturbed.

[0069] Based on this, in step S102, if Figure 4 As shown, the selecting, from the target IoT data, first IoT data satisfying the second accuracy condition and second IoT data not satisfying the second accuracy condition, includes:

[0070] S401. Calculate the deviation of each target IoT data for a plurality of target IoT data; the deviation is used to characterize the degree to which the target IoT data is affected by interference factors;

[0071] S402. According to the deviation of each target IoT data, select first IoT data whose deviation is less than or equal to a second accuracy threshold from the multiple target IoT data, and select second IoT data whose deviation is greater than the second accuracy threshold.

[0072] Specifically, the deviation is the degree of influence of the data on the fitting results of the multiple target IoT data.

[0073] The specific calculation method of the deviation is as follows: multiple target IoT data are fitted through a linear regression algorithm, and the Cook distance of each data point (i.e., each target IoT data) is calculated. The Cook distance characterizes the difference in fitting effect before and after including this data point and excluding this data point. The greater the difference, the greater the impact on the fitting, which means that the data point is more interfered by interference factors during the collection process.

[0074] In the embodiment of the present application, for multiple target IoT data, calculating the deviation of each target IoT data includes:

[0075] The deviation of each target IoT data among the multiple target IoT data is calculated by using a trained deviation calculation model; the deviation calculation model is a regression model including trained model parameters; the trained regression model is a regression model whose accuracy reaches a preset accuracy threshold; the accuracy of the regression model is determined according to an evaluation function predefined in the regression model.

[0076] The trained deviation calculation model is obtained in the following way:

[0077] S501, using spark mlib technology to build a regression model, calling the train() method of the LogisticRegressionWithSGD logistic regression classifier to train the model, and setting the initialization model parameters; in the embodiment of the present application, specifically, the initial value of the number of data iterations = 100, the data calculation step step = 1, the proportion of sample data participating in the calculation each time miniBatchFraction = 0.3, and the regular term coefficient regParam = 0.01;

[0078] S502. Define the model evaluation function AUC (Area under the Curve of ROC) for the regression model. The trade-off between the true positive rate (TPR = TP / P) (vertical axis) and the false positive rate (FPR = FP / N) (horizontal axis) of the regression model is described by the Receiver Operating Characteristic (ROC) curve. AUC (the area under the ROC curve) is used as a measure of the accuracy of the regression model to evaluate whether the model parameters are appropriate. When AUC = 1, the accuracy of the regression model is 100%, and the model parameters reach the optimal. When 0.5 < AUC < 1, the model parameters are relatively optimal. When AUC < 0.5, the model parameters are poor, and the model needs to be retrained.

[0079] S503. Adjust the model parameters: the number of data iterations iterations, the data calculation step step, the sample ratio miniBatchFraction participating in each calculation, and the regularization term coefficient regParam model parameters. Repeat steps S501 and S502 until the accuracy of the regression model reaches the evaluation standard. In the embodiment of the present application, to ensure the response speed of the Internet of Things data curve during data display, AUC ≥ 0.6 is used as the evaluation standard for the regression model.

[0080] Obtain the trained deviation calculation model and save the trained deviation calculation model in the Internet of Things platform. In the present application, the model parameters of the trained deviation calculation model are saved in the hive data dimension table.

[0081] According to the trained deviation calculation model, calculate the deviation of each data in the target Internet of Things data. The specific process is as follows:

[0082] Use spark sql to read multiple target Internet of Things data from the hive data warehouse, and use multiple processing threads to accelerate the speed of sample data reading. At the same time, load the trained deviation calculation model. Use the multiple target Internet of Things data as the data source, and use the trained deviation calculation model to calculate the Cook distance of each data point (target Internet of Things data). At the same time, label the target Internet of Things data of the second Internet of Things data with a deviation greater than the second accuracy threshold and update it to the hive data warehouse.

[0083] In step S103, in response to the first query request for the target Internet of Things data, query the first Internet of Things data of the first Internet of Things data that has not been interfered with, and display the first Internet of Things data. At the same time, display a target control;

[0084] The first query request is generated by the human-computer interaction interface of the IoT system based on user operations. The human-computer interaction interface displays a query control, which can directly input query information, and generates a first query request based on the input query information, and sends the first query request to the IoT platform. The query information can be a certain type of IoT data in a certain time period, such as the extension tension of the operating rod bearing seat of the switch machine between x time and xx time in xx month 2021, and the extension tension of the operating rod bearing seat of the switch machine within 50 minutes.

[0085] Specifically, the query control includes a time setting area, and the time information in the query request is set through the time setting area.

[0086] The display of the first Internet of Things data includes performing point plotting processing on the first Internet of Things data, and generating and displaying a data curve according to the time sequence of the first Internet of Things data.

[0087] S104: In response to a second query request triggered by operating the target control, query the interfered second IoT data, and display the target IoT data including the first IoT data and the second IoT data.

[0088] The target control may display a “+” sign or a magnifying glass to prompt the user that the target control is used to query incremental data; the incremental data is the second IoT data.

[0089] The first IoT data has completed the point mapping processing. After receiving the second query request, the second IoT data is further processed to be inserted into the first IoT data, and a data curve is generated and displayed according to the time sequence of the target IoT data.

[0090] After displaying the first IoT data or displaying the target IoT data, according to the preset update cycle, when the display time reaches the next update cycle, the first IoT data of the first IoT data that is not disturbed is re-queried, and the displayed first IoT data is updated; and the second IoT data that is disturbed is re-queried, and the target IoT data including the first IoT data and the second IoT data is updated and displayed, so as to display the IoT data updated in real time.

[0091] The method for querying IoT data described in the present application first preprocesses and verifies data to eliminate abnormal IoT data with incorrect data types and incomplete data, and then eliminates unreasonable abnormal IoT data, thereby reducing the amount of IoT data at the source of the data. Then, the degree of interference to each IoT data during the collection process is evaluated, and the IoT data without abnormalities is divided into first IoT data that is not interfered with and second IoT data that is interfered with. When a user queries IoT data, first query and display the first IoT data that is of better quality and more stable in reflecting the status of IoT devices, rather than performing calculations based on the full amount of data, thereby reducing the delay in querying and displaying massive IoT data, and displaying the first IoT data of better quality, which is conducive to users to more accurately judge the status of the IoT devices. Incremental data query can also be used to query the second IoT data and display all target IoT data. All target IoT data can be displayed by only performing point drawing processing on the second IoT data. In summary, low-latency query of massive IoT data is achieved.

[0092] In some embodiments, the method for querying IoT data, in response to a first query request for the target IoT data, querying the first IoT data that meets the second accuracy condition, includes: in response to the first query request for the target IoT data, querying the first IoT data that meets the second accuracy condition from the hotspot data cached by the IoT platform;

[0093] In response to a second query request triggered by operating the target control, querying second IoT data that does not meet the second accuracy condition, including: in response to the second query request triggered by operating the target control, querying the second IoT data that does not meet the second accuracy condition from the hotspot data cached by the IoT platform;

[0094] The hot data are target IoT data whose query times meet preset conditions or target IoT data within a preset time period.

[0095] Preferably, since the first stage queries and displays the first IoT data by default, the first IoT data within a preset time period can be used as hotspot data.

[0096] Caching hot data means loading hot data into memory and temporarily saving it. Compared with storing these IoT data on disk, it can reduce the number of disk IO operations in the process of reading IoT data and speed up the display of data curves in the query display process.

[0097] Specifically, redis cluster is used as a solution for caching hot data to cache the first IoT data in the massive original IoT data in the hive data table.

[0098] According to experience, the original IoT data of the day is hot data. Therefore, during the initialization process, the first IoT data of the day is loaded into the memory as hot data to reduce the volume of cached data. The data query and display process in this application is presented in two stages. The first IoT data is loaded into the memory as hot data and displayed as the query result of the first stage, which can speed up the generation and display of the data curve of the target IoT data.

[0099] After the initialization is completed, the original IoT data other than that of the day is cached according to the LRU algorithm. At this time, the target data with a large number of queries can be recorded into the memory as hot data based on the number of queries of the target IoT data.

[0100] In some embodiments, the target IoT data includes multiple types of IoT data that are interrelated. The multiple types of IoT data are IoT data collected by different IoT data collection points, which can be the same parameters, such as stress data collected by different collection points, or different parameters, such as temperature and humidity; or different IoT data collected by IoT data collection points, such as voltage value data and current value data collected by the same collection point.

[0101] In the process of plotting multiple types of interrelated IoT data, the time point of the first type of IoT data is used as a benchmark to integrate the multiple types of interrelated IoT data in the same time period, providing a standard format for plotting data curves for data display.

[0102] In reality, multiple IoT devices often need to cooperate with each other to achieve the purpose of industrial system operation monitoring. The IoT data of multiple IoT devices is more valuable for reference. For example, the railway signal equipment turnout conversion equipment is one of the key driving equipment. Stress is an important factor affecting the health status of the equipment, but the stress of one point is often not of reference value. The operating status of the turnout conversion equipment should be judged in combination with the stress of multiple points.

[0103] Therefore, it is applied to the IoT system of the turnout switching equipment to collect the stress values ​​of multiple points of the turnout switching equipment; the query method of the IoT data described in this application is used to allow the stress correlation display of these points, that is, the correlation display of multiple types of IoT data, and the display results are as follows: Figure 5 shown. Figure 5 The interrelated IoT data are the extension tension of the operating rod bearing seat of the switch machine and the pull-in tension of the operating rod bearing seat of the switch machine.

[0104] like Figure 6As shown, the embodiment of the present application also provides a query device for Internet of Things data, which is applied to an Internet of Things platform, and the query device includes:

[0105] An acquisition module 601 is used to acquire target IoT data that meets a first accuracy condition, where the target IoT data is collected data without abnormalities;

[0106] A selection module 602 is used to select first IoT data that meets a second accuracy condition and second IoT data that does not meet the second accuracy condition from the target IoT data; the second accuracy condition is used to distinguish the first IoT data that is not interfered with and the second IoT data that is interfered with from the target IoT data;

[0107] A first query module 603 is used to respond to a first query request for the target IoT data, query the first IoT data of the first IoT data that is not interfered with, and display the first IoT data, and at the same time, display a target control;

[0108] The second query module 604 is used to respond to the second query request triggered by operating the target control, query the second IoT data that is interfered with, and display the target IoT data including the first IoT data and the second IoT data.

[0109] In the embodiment of the present application, the selection module is specifically used to calculate the deviation of each target IoT data for multiple target IoT data; the deviation is used to characterize the degree to which the target IoT data is affected by interference factors;

[0110] According to the deviation of each target IoT data, first IoT data with a deviation less than or equal to a second accuracy threshold is selected from the multiple target IoT data, and second IoT data with a deviation greater than the second accuracy threshold is selected.

[0111] In an embodiment of the present application, the selection module is specifically used to calculate the deviation of each data in the target Internet of Things data based on a trained deviation calculation model; the deviation calculation model is a regression model including trained model parameters; the trained regression model is a regression model whose accuracy reaches a preset accuracy threshold; the accuracy of the regression model is determined based on an evaluation function predefined in the regression model.

[0112] In the embodiment of the present application, the acquisition module is specifically used to filter out complete original IoT data that conforms to a preset data type from the acquired original IoT data; the preset data type is determined according to the application scenario of the original IoT data;

[0113] For the complete original IoT data that conforms to the preset data type, target IoT data that meets the preset threshold range conditions are screened out again; the preset threshold range conditions are determined based on data features of the pre-stored target IoT data.

[0114] In the embodiment of the present application, the acquisition module is specifically used to filter out the original IoT data that meets the first preset threshold range for the complete original IoT data that conforms to the preset data type; the first preset threshold range is determined according to the mean and standard deviation of the pre-stored target IoT data;

[0115] For the original IoT data that meets the first preset threshold range, target IoT data that meets the second preset threshold range is screened out; the second preset threshold range is determined based on the mean, maximum and minimum values ​​of the pre-stored target IoT data.

[0116] In an embodiment of the present application, the first query module is further used to respond to a first query request for the target IoT data, and query the first IoT data that meets the second accuracy condition from the hotspot data cached by the IoT platform; the second query module is further used to respond to a second query request triggered by operating the target control, and query the second IoT data that does not meet the second accuracy condition from the hotspot data cached by the IoT platform; wherein the hotspot data is the target IoT data whose query times meet the preset conditions or the target IoT data within a preset time period.

[0117] In the embodiment of the present application, the target IoT data includes multiple types of IoT data that are interrelated.

[0118] like Figure 7 As shown, in an embodiment of the present application, an electronic device is also provided, including: a processor 701, a memory 702 and a bus 703, wherein the memory 702 stores machine-readable instructions executable by the processor 701, and when the electronic device is running, the processor 701 communicates with the memory 702 through the bus 703, and when the machine-readable instructions are executed by the processor 701, the steps of the query method for Internet of Things data are executed.

[0119] A computer-readable storage medium stores a computer program, which executes the steps of the method for querying Internet of Things data when executed by a processor.

[0120] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the system and device described above can refer to the corresponding process in the method embodiment, and will not be repeated in this application. In the several embodiments provided in this application, it should be understood that the disclosed system, device and method can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

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

[0122] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0123] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a platform server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard drives, ROM, RAM, magnetic disks, or optical disks.

[0124] The above are only specific implementations of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A method for querying IoT data. It is characterized in that Applied to the Internet of Things platform, the query method includes: Acquire target IoT data that meets a first accuracy condition, where the target IoT data is collected data without abnormalities; Selecting first IoT data that meets the second accuracy condition and second IoT data that does not meet the second accuracy condition from the target IoT data; the second accuracy condition is used to distinguish the first IoT data that is not disturbed and the second IoT data that is disturbed from the target IoT data; wherein the first IoT data that is not disturbed is less disturbed by the interference factor, and the second IoT data that is disturbed is more disturbed by the interference factor; In response to a first query request for the target IoT data, query the first IoT data that is not interfered with, and display the first IoT data, and at the same time, display a target control; the display of the first IoT data specifically includes performing point plotting processing on the first IoT data, and generating and displaying a data curve according to the time sequence of the first IoT data; In response to a second query request triggered by operating the target control, the second IoT data that is interfered with is queried, and the target IoT data including the first IoT data and the second IoT data is displayed, specifically including: the first IoT data has completed point mapping processing, and after receiving the second query request, the second IoT data is further processed for point mapping to be inserted into the first IoT data, and a data curve is generated and displayed according to the timing of the target IoT data.

2. The method for querying Internet of Things data according to claim 1, It is characterized in that The selecting, from the target IoT data, first IoT data that meets the second accuracy condition and second IoT data that does not meet the second accuracy condition, comprises: For multiple target IoT data, calculate the deviation of each target IoT data; the deviation is used to characterize the degree to which the target IoT data is affected by interference factors; According to the deviation of each target IoT data, first IoT data with a deviation less than or equal to a second accuracy threshold is selected from the multiple target IoT data, and second IoT data with a deviation greater than the second accuracy threshold is selected.

3. The method for querying Internet of Things data according to claim 2, Features: For multiple target IoT data, calculate the deviation of each target IoT data, including: The deviation of each target IoT data among the multiple target IoT data is calculated by using a trained deviation calculation model; the deviation calculation model is a regression model including trained model parameters; the trained regression model is a regression model whose accuracy reaches a preset accuracy threshold; the accuracy of the regression model is determined according to an evaluation function predefined in the regression model.

4. The method for querying Internet of Things data according to claim 1, It is characterized in that The obtaining of target IoT data that meets a preset first accuracy condition includes: For the acquired original IoT data, filter out the complete original IoT data that conforms to a preset data type; the preset data type is determined according to the application scenario of the original IoT data; For the complete original IoT data that conforms to the preset data type, target IoT data that meets the preset threshold range conditions are screened out again; the preset threshold range conditions are determined based on data features of the pre-stored target IoT data.

5. The method for querying Internet of Things data according to claim 4, It is characterized in that For the complete original IoT data that conforms to the preset data type, target IoT data that meets the preset threshold range conditions is screened again, including: For the complete original IoT data that conforms to the preset data type, filter out the original IoT data that meets a first preset threshold range; the first preset threshold range is determined according to the mean and standard deviation of the pre-stored target IoT data; For the original IoT data that meets the first preset threshold range, target IoT data that meets the second preset threshold range is screened out; the second preset threshold range is determined based on the mean, maximum and minimum values ​​of the pre-stored target IoT data.

6. The method for querying Internet of Things data according to claim 1, It is characterized in that In response to the first query request for the target IoT data, querying the first IoT data that meets the second accuracy condition, including: in response to the first query request for the target IoT data, querying the first IoT data that meets the second accuracy condition from the hotspot data cached by the IoT platform; In response to a second query request triggered by operating the target control, querying second IoT data that does not meet the second accuracy condition, including: in response to the second query request triggered by operating the target control, querying the second IoT data that does not meet the second accuracy condition from the hotspot data cached by the IoT platform; The hot data are target IoT data whose query times meet preset conditions or target IoT data within a preset time period.

7. The method for querying Internet of Things data according to claim 1, It is characterized in that The target IoT data includes multiple types of IoT data that are related to each other.

8. A device for querying Internet of Things data, It is characterized in that Applied to the Internet of Things platform, the query device includes: An acquisition module, used to acquire target IoT data that meets a first accuracy condition, wherein the target IoT data is collected data without abnormalities; A selection module is used to select first IoT data that meets a second accuracy condition and second IoT data that does not meet the second accuracy condition from the target IoT data; the second accuracy condition is used to distinguish the first IoT data that is not disturbed and the second IoT data that is disturbed from the target IoT data; wherein the first IoT data that is not disturbed is less disturbed by the interference factor, and the second IoT data that is disturbed is more disturbed by the interference factor; A first query module is used to respond to a first query request for the target IoT data, query the first IoT data that is not interfered with, and display the first IoT data, and at the same time, display a target control; the display of the first IoT data is specifically to perform point plotting processing on the first IoT data, and generate and display a data curve according to the time sequence of the first IoT data; The second query module is used to respond to the second query request triggered by operating the target control, query the second IoT data that is interfered with, and display the target IoT data including the first IoT data and the second IoT data; specifically, the first IoT data has completed the point mapping processing, and after receiving the second query request, the second IoT data is further processed for insertion into the first IoT data, and a data curve is generated and displayed according to the timing of the target IoT data.

9. An electronic device, It is characterized in that include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the method for querying Internet of Things data as described in any one of claims 1 to 7 are performed.

10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method for querying Internet of Things data as described in any one of claims 1 to 7 are executed.