Device data storage method, device, computer equipment and storage medium

By introducing prediction models into IoT devices and storing device data only during the predicted abnormal period, the data storage pressure problem of IoT devices is solved, and the efficiency of abnormal analysis and the validity of data are improved.

CN114924901BActive Publication Date: 2025-09-09ENVISION DIGITAL INT PTE LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210579960.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-25
Publication Date
2025-09-09
Estimated Expiration
2042-05-25

Smart Images

  • Figure CN114924901B_ABST
    Figure CN114924901B_ABST
Patent Text Reader

Abstract

The present application discloses a method, apparatus, computer device, and storage medium for storing device data, relating to the field of Internet of Things technology. The method comprises: receiving device data corresponding to an Internet of Things device; based on the device data, using a prediction model to predict the device state of the Internet of Things device at a predicted time point to obtain a prediction result; in response to the prediction result indicating that the Internet of Things device has an abnormality at the predicted time point, storing the device data within the predicted time period, wherein the predicted time period is a time period including the predicted time point. In an embodiment of the present application, only the device data corresponding to the predicted time period when an abnormality is predicted to occur is stored, reducing the pressure on data storage.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of Internet of Things technology, and in particular to a method and apparatus for storing device data, a computer device, and a storage medium. Background Art

[0002] With the development of IoT technology, the number of IoT devices using IoT technology is growing rapidly.

[0003] To monitor the operational status of IoT devices, device data is typically recorded and stored continuously. When an IoT device experiences an anomaly, personnel will query the device data for a period of time before and after the anomaly to identify the cause and subsequently perform maintenance on the device. Summary of the Invention

[0004] The present invention provides a method, apparatus, computer device, and storage medium for storing device data. The technical solution is as follows:

[0005] According to one aspect of the present application, a method for storing device data is provided, the method comprising:

[0006] Receive device data corresponding to IoT devices;

[0007] Based on the device data, using a prediction model to predict the device state of the IoT device at a prediction time point to obtain a prediction result;

[0008] In response to the prediction result that the IoT device has an abnormality at the predicted time point, the device data within the predicted time period is stored, and the predicted time period is a time period including the predicted time point.

[0009] According to one aspect of the present application, a device for storing device data is provided, the device comprising: a receiving module, a prediction module, and a storage module;

[0010] The receiving module is used to receive device data corresponding to the Internet of Things device;

[0011] The prediction module is configured to predict the device state of the IoT device at a prediction time point based on the device data using a prediction model to obtain a prediction result;

[0012] The storage module is used to store the device data within the prediction period in response to the prediction result that the IoT device has an abnormality at the prediction time point, where the prediction time period is a time period including the prediction time point.

[0013] According to another aspect of the present application, a computer device is provided, comprising: a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the device data storage method described above.

[0014] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the storage medium stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the device data storage method described above.

[0015] According to another aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the device data storage method described above.

[0016] The beneficial effects brought about by the technical solutions provided in the embodiments of the present application include at least the following beneficial effects:

[0017] A prediction model is introduced to predict the device status of IoT devices. By receiving the device data corresponding to the IoT devices, a prediction model is used to make predictions based on the device data to obtain prediction results. When the prediction result shows that the IoT device has an abnormality at the predicted time point, the device data within the prediction period is stored. This eliminates the need to continuously store device data. Only the device data within the prediction period when an abnormality is predicted to occur is stored, reducing the pressure on data storage. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0019] Figure 1 is a schematic diagram of a computer system provided by an exemplary embodiment of the present application;

[0020] Figure 2 is a flow chart of a method for storing device data provided by an exemplary embodiment of the present application;

[0021] Figure 3 is a flow chart of a method for storing device data provided by an exemplary embodiment of the present application;

[0022] Figure 4 is a flow chart of a method for training a prediction model provided by an exemplary embodiment of the present application;

[0023] Figure 5 is a schematic diagram of model training provided by an exemplary embodiment of the present application;

[0024] Figure 6 is a flow chart of a method for storing device data provided by an exemplary embodiment of the present application;

[0025] Figure 7 This is a schematic diagram of determining the cause of an abnormality of an IoT device provided by an exemplary embodiment of the present application;

[0026] Figure 8 is a schematic diagram of verifying the validity of an alarm rule provided by an exemplary embodiment of the present application;

[0027] Figure 9 is a block diagram of a device data storage apparatus provided by an exemplary embodiment of the present application;

[0028] Figure 10 It is a structural diagram of a computer device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0029] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0030] First, a brief introduction to the terms involved in this application:

[0031] Device simulator: A computer program that simulates a series of behaviors of IoT devices over a certain period of time in the past by using historical device data or artificially created device data of IoT devices.

[0032] In an embodiment of the present application, by performing simulated playback through a device simulator, it is possible to identify which device data caused the anomalies generated by IoT devices in the past; or, by actively creating a series of abnormal device data, it is possible to quickly test whether the alarm rules configured for IoT devices are effective. The alarm rules are used to determine whether the device status of IoT devices is normal.

[0033] Due to the widespread adoption and rapid development of IoT technology, various fields and major companies have begun to deploy IoT, leading to a rapid increase in the number of IoT devices. The operational status of IoT devices themselves has received considerable attention.

[0034] When an IoT device experiences an anomaly, troubleshooting often requires storing a large amount of device data from the normal period. This ensures access to historical data from the period immediately before and after the anomaly. A method for recording only the device data from the anomaly period could effectively identify the cause of the anomaly, making it easier for maintenance personnel to maintain and repair the IoT device. This would help adjust the device status, improve performance, and minimize losses for businesses.

[0035] As analyzed above, the device data storage methods provided in related technologies store historical device data completely in the database. When reviewing anomaly records and identifying the cause, historical device data from a certain period before and after the anomaly can be retrieved and analyzed. However, when there are too many IoT devices, or when devices operate normally most of the time and anomalies are infrequent, the database may contain a large amount of routine data. This data is not very helpful for analyzing device anomalies, but it does increase system storage pressure.

[0036] Please refer to Figure 1 , which shows a schematic diagram of a computer system involved in an embodiment of the present application. The computer system may include: an Internet of Things device 110 and a server 120, and the server 120 may include: a prediction model 121 and a device simulator 122.

[0037] The IoT device 110 and the server 120 communicate with each other via a network, which may be a wireless network or a wired network.

[0038] The Internet of Things device 110 can also be called a smart device or smart hardware. It can be a detection device with detection functions, such as environmental monitoring equipment (such as temperature sensors, noise sensors, etc.), or traffic monitoring equipment (such as cameras). It can also be a control device with control functions, such as smart switches, smart sockets, smart curtains and other smart homes, and various industrial control devices with control functions.

[0039] The IoT device 110 generates corresponding device data during operation, and the device data can be uploaded to the server 120 at a certain data collection frequency.

[0040] Prediction model 121 in server 120 is a model for predicting the device status of IoT device 110. Exemplarily, prediction model 121 predicts that IoT device 110 will experience an anomaly at a predicted time point based on device data uploaded by IoT device 110. At this time, server 120 stores the device data near the predicted time point.

[0041] Device simulator 122 in server 120 is used to simulate the behavior of IoT device 110 based on device data. For example, if IoT device 110 experiences an anomaly at a predicted time point, server 120 sends the stored device data around the predicted time point to device simulator 122, which then uses the device data to replay the simulation and determine the cause of the anomaly in IoT device 110.

[0042] Optionally, the server 120 may be a single server, a server cluster consisting of multiple servers, or a cloud server that provides basic cloud services such as cloud computing, cloud storage, big data, and artificial intelligence platforms. Exemplarily, the prediction model 121 and the device simulator 122 are implemented as two independent servers. Exemplarily, the prediction model 121 and the device simulator 122 are located on the same cloud server.

[0043] Next, the method for storing device data in the embodiments of the present application is further described.

[0044] Figure 2 A flowchart showing a method for storing device data provided by an exemplary embodiment of the present application is shown. Figure 1 Taking the server shown in FIG. 1 as an example, the method includes:

[0045] Step 210: Receive device data corresponding to the IoT device.

[0046] Device data is data used to describe the operating conditions of IoT devices during operation.

[0047] Optionally, device data includes multiple measurement point data streams. An IoT device includes different measurement points, each corresponding to a specific aspect of device data. Therefore, device data includes multiple measurement point data streams. For example, if the IoT device is a speaker, the device data may include the speaker's network status, operating voltage, and battery level.

[0048] Optionally, the server receives device data collected by the IoT device at a certain data collection frequency. For example, the IoT device collects data every 5 seconds and sends it to the server via the network. The server then receives the device data sent by the IoT device.

[0049] Step 220: Based on the device data, use the prediction model to predict the device status of the IoT device at the prediction time point to obtain a prediction result.

[0050] The server uses the received device data as the input of the prediction model and the prediction results as the output of the prediction model.

[0051] The predicted time point is a time point after the time point corresponding to the device data input into the prediction model. For example, based on the current device data, the prediction model is used to predict the device state of the IoT device in 10 minutes to obtain a prediction result.

[0052] The prediction result is a result of predicting the device state of the IoT device at the predicted time point. Exemplarily, the prediction result includes: the IoT device experiencing an abnormality at the predicted time point. Exemplarily, the prediction result includes: the IoT device remaining normal at the predicted time point.

[0053] It can be understood that the prediction model is a model used to predict the device status of an IoT device, and the embodiments of the present application do not limit the specific model structure of the prediction model.

[0054] Step 230: In response to the prediction result that the IoT device has an abnormality at the predicted time point, the device data within the predicted time period is stored.

[0055] The prediction time period is a time period including the prediction time point. Exemplarily, the prediction time period is a time period starting at the prediction time point. Exemplarily, the prediction time period is a time period ending at the prediction time point. Exemplarily, the prediction time period is a time period with the prediction time point as an intermediate time point.

[0056] That is, if the prediction result indicates that an IoT device will experience an anomaly at the predicted time, the automatic recording function is triggered during the predicted period, and the device data within the predicted period is stored. For example, if the current time is 11:00 and the prediction result indicates that an IoT device will experience an anomaly at 11:10, the device data from 11:05 to 11:15 will be stored.

[0057] Optionally, the prediction model determines the probability of an abnormality occurring in the IoT device at the predicted time point based on the device data. When the probability is greater than a set threshold, the prediction result that the IoT device will be abnormal at the predicted time point is output; when the probability is not greater than the set threshold, the prediction result that the IoT device will remain normal at the predicted time point is output.

[0058] Exemplarily, the threshold is 0.7. When the prediction model determines that the probability of an abnormality occurring in the IoT device at the predicted time point is 0.8 based on the device data, a prediction result that the IoT device will be abnormal at the predicted time point is output.

[0059] Optionally, in response to the prediction result that the IoT device remains normal at the predicted time point, the device data within the prediction period is not stored.

[0060] To sum up, the device data storage method provided in this embodiment introduces a prediction model for predicting the device status of the Internet of Things device. By receiving the device data corresponding to the Internet of Things device, the prediction model is used to make a prediction based on the device data to obtain a prediction result. When the prediction result is that the Internet of Things device has an abnormality at the predicted time point, the device data within the predicted period is stored. Therefore, there is no need to continuously store the device data. Only the device data within the predicted period when the abnormality is predicted to occur is stored, thereby reducing the pressure on data storage.

[0061] In an exemplary embodiment, the prediction result affects the data collection behavior of the IoT device, which in turn affects the data storage behavior of the device data performed by the server during the prediction period.

[0062] Figure 3 A flowchart showing a method for storing device data provided by an exemplary embodiment of the present application is shown. Figure 1 Taking the server shown in FIG. 1 as an example, the method includes:

[0063] Step 310: Receive device data corresponding to the IoT device.

[0064] The implementation of this step can refer to the above step 210 and will not be repeated here.

[0065] Step 320: Based on the device data, use the prediction model to predict the device status of the IoT device at the prediction time point to obtain a prediction result.

[0066] The implementation of this step can refer to the above step 320 and will not be repeated here.

[0067] Step 330: In response to the prediction result that the IoT device has an abnormality at the predicted time point, collection instruction information is sent to the IoT device.

[0068] The collection indication information is used to instruct the IoT device to collect data during the forecast period.

[0069] That is, when the prediction result is that the IoT device will malfunction at the predicted time point, in order to better obtain device data during the predicted period, the server sends collection instruction information to the IoT device, thereby adjusting the data collection behavior of the IoT device.

[0070] Optionally, sending collection indication information to the Internet of Things device includes: sending at least one of first collection indication information and second collection indication information to the Internet of Things device; wherein the first collection indication information is used to instruct the Internet of Things device to increase the data collection frequency, and the second collection indication information is used to instruct the Internet of Things device to increase the data collection type.

[0071] Step 340: During the prediction period, receive device data sent by the IoT device based on the collection indication information, and store the device data.

[0072] Exemplarily, the server sends first collection indication information to the IoT device, and the first collection indication information is used to instruct the IoT device to increase the data collection frequency. The IoT device adjusts the data collection frequency from a to b during the prediction period, where b is an integer greater than a. The IoT device sends the device data collected based on the data collection frequency b to the server, and the server receives the device data accordingly.

[0073] Exemplarily, the server sends second collection indication information to the IoT device, and the second collection indication information is used to instruct the IoT device to increase the data collection type. The IoT device adjusts the data collection type from c types to d types within the prediction period, where d is an integer greater than c. The IoT device sends the device data collected based on the d data collection types to the server, and the server receives the device data accordingly.

[0074] In a possible implementation, the length of the prediction period is a preset fixed value, for example, 10 minutes.

[0075] In another possible implementation, the length of the prediction period is related to the abnormal probability output by the prediction model.

[0076] Optionally, the prediction result includes the probability of an abnormality occurring in the IoT device at the predicted time point. Before step 340, the following steps are further included:

[0077] Obtain a correspondence between the abnormal probability and the length of the prediction period; and determine the length of the prediction period based on the correspondence.

[0078] That is, the server stores the correspondence between the abnormality probability and the time length of the prediction period. After the server obtains the prediction result, since the prediction result includes the abnormality probability of the IoT device occurring an abnormality at the predicted time point, the server determines the time length of the prediction period corresponding to the abnormality probability based on the stored correspondence.

[0079] Optionally, the abnormal probability and the length of the prediction period are in direct proportion. That is, the greater the abnormal probability, the longer the prediction period. For example, see Table 1 below.

[0080] Table 1: Correspondence between abnormal probability and the length of the forecast period

[0081] Abnormal probability Length of the forecast period 0.7-0.8 10 minutes 0.8-0.9 12 minutes 0.9-1.0 14 minutes

[0082] As shown in Table 1 above, when the abnormality probability is greater than 0.7, it is predicted that the IoT device will have an abnormality at the predicted time point, and the greater the abnormality probability, the longer the prediction period.

[0083] To sum up, the device data storage method provided in this embodiment introduces a prediction model for predicting the device status of the Internet of Things device. By receiving the device data corresponding to the Internet of Things device, the prediction model is used to make a prediction based on the device data to obtain a prediction result. When the prediction result is that the Internet of Things device has an abnormality at the predicted time point, the device data within the predicted period is stored. Therefore, there is no need to continuously store the device data. Only the device data within the predicted period when the abnormality is predicted to occur is stored, thereby reducing the pressure on data storage.

[0084] At the same time, the device data storage method provided in this embodiment, when the prediction result is that the IoT device has an abnormality at the predicted time point, the server sends collection indication information to the IoT device, instructing the IoT device to collect data, thereby affecting the server's data storage behavior of the device data during the prediction period, helping to store more quantities or more types of device data, which is beneficial to the subsequent analysis of the abnormal status of the IoT device.

[0085] At the same time, in the device data storage method provided by this embodiment, the length of the predicted period for storing device data by the server is related to the abnormality probability, thereby ensuring the validity of the stored device data.

[0086] In an exemplary embodiment, before using a prediction model to predict the device status of an IoT device at a prediction time point, the prediction model needs to be trained using historical device data.

[0087] Figure 4A flowchart of a method for training a prediction model provided by an exemplary embodiment of the present application is shown. Figure 1 Taking the server shown in FIG. 1 as an example, the method includes:

[0088] Step 410: Acquire historical device data and generate a data set.

[0089] Historical device data is previously uploaded by IoT devices. A dataset is a collection of data generated by processing historical device data. In other words, the server generates a dataset using previously acquired device data.

[0090] Optionally, step 410 includes: acquiring historical equipment data; performing standardization processing on the historical equipment data to obtain converted standard indicators; and generating a data set including the standard indicators.

[0091] Standardization refers to converting historical device data into standardized metrics. These metrics are indicators related to IoT device anomalies. Exemplary metrics include at least one of the following: the number of IoT device anomalies within a time interval, the average deviation of device data, and the probability of anomalies occurring for the same type of IoT device within a time interval.

[0092] Step 420: Divide the dataset into a training dataset and a validation dataset.

[0093] After generating the dataset, part of the data is classified as the training dataset and the other part of the data is classified as the validation dataset.

[0094] Step 430: Use the training data set to perform model training to obtain a prediction model.

[0095] Step 440: Use the validation data set to perform model validation to obtain a trained prediction model.

[0096] Exemplary, with reference to Figure 5 By acquiring historical device data from the server and using standardized methods to convert the data into corresponding standard metrics, a dataset containing these metrics is generated. The data in this dataset is divided into a training dataset and a validation dataset. This allows the predictive model to analyze the device data emitted by IoT devices before an anomaly occurs and predict anomalies in advance. The validation dataset can be used to verify the correctness of the predictive model and prevent overfitting. Once the model is trained, it can be put into production environments.

[0097] To sum up, the device data storage method provided in this embodiment introduces a prediction model for predicting the device status of the Internet of Things device. By receiving the device data corresponding to the Internet of Things device, the prediction model is used to make a prediction based on the device data to obtain a prediction result. When the prediction result is that the Internet of Things device has an abnormality at the predicted time point, the device data within the predicted period is stored. Therefore, there is no need to continuously store the device data. Only the device data within the predicted period when the abnormality is predicted to occur is stored, thereby reducing the pressure on data storage.

[0098] At the same time, the device data storage method provided in this embodiment trains the prediction model with historical device data before using the prediction model to predict the device status of the IoT device at the prediction time point, thereby ensuring the accuracy of the prediction.

[0099] In an exemplary embodiment, the stored device data needs to be uploaded to the device simulator so that the device simulator can play back and simulate the cause of the abnormality of the IoT device.

[0100] Figure 6 A flowchart showing a method for storing device data provided by an exemplary embodiment of the present application is shown. Figure 1 Taking the server shown in FIG. 1 as an example, the method includes:

[0101] Step 610: Receive device data corresponding to the IoT device.

[0102] The implementation of this step can refer to the above step 210 and will not be repeated here.

[0103] Step 620: Based on the device data, use the prediction model to predict the device status of the IoT device at the prediction time point to obtain a prediction result.

[0104] The implementation of this step can refer to the above step 220 and will not be repeated here.

[0105] Step 630: In response to the prediction result that the IoT device has an abnormality at the predicted time point, the device data within the predicted time period is stored.

[0106] Optionally, after step 630, the following step is further included: using the stored device data within the prediction period and the device status of the IoT device at the prediction time point to train the prediction model.

[0107] That is, after the prediction model predicts that an anomaly may occur, the server automatically stores the device data within the prediction period. Regardless of whether an anomaly actually occurs in the IoT device, the stored device data will be used as new samples in the prediction model for model training, thereby updating the prediction model.

[0108] Step 640: In response to an abnormality occurring in the IoT device at the predicted time point, the stored device data within the predicted time period is uploaded to the device simulator.

[0109] In the event that an IoT device does experience an anomaly at the predicted time point, the server uploads the stored device data within the predicted period to the device simulator for analysis.

[0110] Optionally, if no abnormality occurs in the IoT device at the predicted time point, the server will delete the stored device data within the predicted period.

[0111] Step 650: Use a device simulator to replay and simulate the device data to determine the cause of the abnormality of the IoT device.

[0112] When IoT device maintenance personnel need to troubleshoot the cause of an abnormal situation in an IoT device, they can use a device simulator to do so.

[0113] In one possible implementation, a device simulator is launched and device data from the predicted time period when the anomaly occurred is replayed to reproduce the process of the IoT device anomaly, thereby determining the cause of the IoT device anomaly. In another possible implementation, a debug mode is used in the device simulator to gradually analyze the impact of each device data on the IoT device and identify the cause of the IoT device anomaly.

[0114] Exemplary, with reference to Figure 7 Device data is fed into a prediction model, which then uses it to predict whether an IoT device is likely to experience an anomaly. If the prediction model predicts an IoT device anomaly is likely to occur at the predicted time, the automatic recording function is triggered, automatically storing device data for the predicted period related to the predicted time. If an anomaly does occur within this period, the stored device data is sent to a device simulator. The simulator replays the device data to replicate the process that caused the IoT device anomaly, allowing maintenance personnel to identify and fix the problem.

[0115] Optionally, whether an IoT device is abnormal is determined based on an alarm rule. The IoT device has a preset alarm rule. If the current device data of the IoT device meets the alarm rule, the IoT device is considered abnormal.

[0116] Optionally, the validity of the alarm rule can be verified by simulating data sending on a device simulator.

[0117] Exemplary, with reference to Figure 8For a certain IoT device, corresponding alarm rules are preset based on the possible abnormalities that may occur. Based on the measurement point information of the IoT device, a corresponding data template is generated, which includes the time when the measurement point should send device data and the data content of the device data that meets the definition. Maintenance personnel can use the same style to add or modify the original random data according to the prompts of the data template, and change it to the real data that they hope the IoT device will send at certain time points. Finally, the maintenance personnel save the modified abnormal device data and upload it to the device simulator. The device simulator parses and processes the uploaded abnormal device data into the corresponding [time-measurement point data] format, and simulates the data sending at the corresponding time through the device simulator. If the alarm rule is configured correctly and the uploaded abnormal device data meets the requirements of the alarm rule, the alarm can be actually triggered to verify the effectiveness of the alarm rule.

[0118] To sum up, the device data storage method provided in this embodiment introduces a prediction model for predicting the device status of the Internet of Things device. By receiving the device data corresponding to the Internet of Things device, the prediction model is used to make a prediction based on the device data to obtain a prediction result. When the prediction result is that the Internet of Things device has an abnormality at the predicted time point, the device data within the predicted period is stored. Therefore, there is no need to continuously store the device data. Only the device data corresponding to the predicted period when the abnormality is predicted to occur is stored, thereby reducing the pressure on data storage.

[0119] At the same time, the device data storage method provided in this embodiment uploads the stored device data to the device simulator so that the device simulator can replay and simulate the abnormal cause of the Internet of Things device, thereby quickly locating the abnormal cause of the Internet of Things device.

[0120] At the same time, the device data storage method provided in this embodiment uses artificially generated abnormal device data to simulate abnormal data and trigger alarms when there is no abnormality in the IoT device, so as to ensure that the alarm rules are configured correctly.

[0121] It is understandable that the above method embodiments can be implemented individually or in combination, and the embodiments of the present application are not limited in this regard.

[0122] The following is an embodiment of the device of the present application. For details not described in detail in the embodiment of the device, reference can be made to the corresponding records in the above method embodiment, and no further details will be given herein.

[0123] Figure 9 A schematic diagram of a device data storage apparatus provided by an exemplary embodiment of the present application is shown. The apparatus can be implemented as all or part of a server through software, hardware, or a combination of both. The apparatus includes: a receiving module 902, a prediction module 904, and a storage module 906;

[0124] The receiving module 902 is used to receive device data corresponding to the IoT device;

[0125] The prediction module 904 is configured to predict the device state of the IoT device at a prediction time point based on the device data using a prediction model to obtain a prediction result;

[0126] The storage module 906 is configured to store the device data within a predicted period in response to the prediction result indicating that the IoT device has an abnormality at the predicted time point, where the predicted time period is a period including the predicted time point.

[0127] In an optional embodiment, the storage module 906 includes: an acquisition indication submodule and a storage submodule;

[0128] The collection instruction submodule is used to send collection instruction information to the Internet of Things device, where the collection instruction information is used to instruct the Internet of Things device to collect data within the predicted time period;

[0129] The storage submodule is used to receive the device data sent by the Internet of Things device based on the collection indication information within the prediction period, and store the device data.

[0130] In an optional embodiment, the collection indication submodule is configured to send at least one of first collection indication information and second collection indication information to the Internet of Things device;

[0131] The first collection instruction information is used to instruct the Internet of Things device to increase the data collection frequency, and the second collection instruction information is used to instruct the Internet of Things device to increase the data collection type.

[0132] In an optional embodiment, the prediction result includes the probability of an abnormality occurring in the IoT device at the predicted time point, and the apparatus further includes: a prediction period determination module;

[0133] The prediction period determination module is configured to obtain a correspondence between the abnormal probability and the duration of the prediction period; and determine the duration of the prediction period based on the correspondence.

[0134] In an optional embodiment, the apparatus further includes: a model training module, wherein the model training module is configured to:

[0135] Obtain historical equipment data and generate data sets;

[0136] Dividing the data set into a training data set and a validation data set;

[0137] Perform model training using the training data set to obtain the prediction model;

[0138] The validation data set is used to perform model validation to obtain the trained prediction model.

[0139] In an optional embodiment, the model training module is used to:

[0140] Obtaining the historical device data;

[0141] Standardizing the historical equipment data to obtain converted standard indicators;

[0142] The data set including the standard indicators is generated.

[0143] In an optional embodiment, the apparatus further comprises: a model training module;

[0144] The model training module is used to perform model training on the prediction model using the stored device data within the prediction period and the device status of the IoT device at the prediction time point.

[0145] In an optional embodiment, the apparatus further comprises: an abnormality cause determination module;

[0146] The abnormality cause determination module is used to upload the device data stored within the predicted time period to a device simulator in response to an abnormality occurring in the IoT device at the predicted time point; and use the device simulator to replay and simulate the device data to determine the abnormality cause of the IoT device.

[0147] To sum up, the device provided in this embodiment introduces a prediction model for predicting the device status of the Internet of Things device. By receiving the device data corresponding to the Internet of Things device, the prediction model is used to make a prediction based on the device data to obtain a prediction result. When the prediction result is that the Internet of Things device has an abnormality at the predicted time point, the device data within the predicted period is stored, thereby eliminating the need to continuously store the device data. Only the device data within the predicted period when the abnormality is predicted to occur is stored, thereby reducing the pressure on data storage.

[0148] Figure 101 is a schematic diagram of the structure of a computer device provided by one embodiment of the present application. Specifically, the computer device 1000 includes a central processing unit (CPU) 1001, a system memory 1004 including a random access memory (RAM) 1002 and a read-only memory (ROM) 1003, and a system bus 1005 connecting the system memory 1004 and the central processing unit 1001. The computer device 1000 also includes a basic input / output system (I / O system) 1006 that helps transfer information between various components within the computer, and a mass storage device 1007 for storing an operating system 1013, application programs 1014, and other program modules 1015.

[0149] The basic input / output system 1006 includes a display 1008 for displaying information and an input device 1009, such as a mouse and keyboard, for user account input. Both the display 1008 and the input device 1009 are connected to the central processing unit 1001 via an input / output controller 1010 connected to the system bus 1005. The basic input / output system 1006 may also include an input / output controller 1010 for receiving and processing input from various other devices, such as a keyboard, mouse, or electronic stylus. Similarly, the input / output controller 1010 also provides output to a display screen, printer, or other types of output devices.

[0150] The mass storage device 1007 is connected to the central processing unit 1001 via a mass storage controller (not shown) connected to the system bus 1005. The mass storage device 1007 and its associated computer-readable media provide non-volatile storage for the computer device 1000. In other words, the mass storage device 1007 may include a computer-readable medium (not shown) such as a hard disk or a CD-ROM drive.

[0151] Without loss of generality, computer-readable media may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, Erasable Programmable Read-Only Memory (EPROM), Electrically Erasable Programmable Read-Only Memory (EEPROM), flash memory or other solid-state storage technologies, CD-ROM, Digital Versatile Disc (DVD) or other optical storage, tape cassettes, magnetic tape, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media are not limited to the above-mentioned ones. The above-mentioned system memory 1004 and mass storage device 1007 can be collectively referred to as memory.

[0152] According to various embodiments of the present application, the computer device 1000 may also be connected to a remote computer on a network such as the Internet for operation. That is, the computer device 1000 may be connected to the network 1012 via the network interface unit 1011 connected to the system bus 1005, or the network interface unit 1011 may be used to connect to other types of networks or remote computer systems (not shown).

[0153] The present application also provides a computer-readable storage medium, which stores at least one instruction, at least one program, code set or instruction set. The at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the device data storage method provided by the above-mentioned method embodiments.

[0154] The present application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the device data storage methods provided in the above-mentioned method embodiments.

[0155] It should be understood that the term "plurality" used herein refers to two or more. "And / or" describes a relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates an "or" relationship between the associated objects.

[0156] Those skilled in the art will understand that all or part of the steps of implementing the above embodiments may be accomplished by hardware, or by programs instructing related hardware to accomplish the steps. The programs may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk, or an optical disk, etc.

[0157] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application should be included in the scope of protection of the present application.

Claims

1. A method for storing device data, characterized in that: The method is executed by a server, and includes: Receive device data collected by an IoT device at frequency a; the device data includes c types; Based on the device data, using a prediction model to predict the device state of the IoT device at a prediction time point to obtain a prediction result; the prediction time point is a time point after the time point corresponding to the device data input into the prediction model; In response to the prediction result that the IoT device has an abnormality at the predicted time point, collection instruction information is sent to the IoT device, where the collection instruction information is used to instruct the IoT device to collect data within the predicted time period; the collection instruction information is used to adjust the data collection behavior of the IoT device; the collection instruction information includes first collection instruction information and second collection instruction information; the first collection instruction information is used to instruct the IoT device to increase the data collection frequency, where the IoT device adjusts the data collection frequency from a to b within the predicted time period, where b is an integer greater than a; the second collection instruction information is used to instruct the IoT device to increase the data collection type, where the IoT device adjusts the data collection type from type c to type d within the predicted time period, where d is an integer greater than c; the IoT device sends the device data collected based on frequency b and type d to the server; receiving, within the predicted time period, the device data sent by the IoT device based on the collection indication information, and storing the device data, wherein the predicted time period is a time period including the predicted time point; Use a device simulator to replay and simulate the device data to determine the cause of the abnormality of the IoT device; The prediction result includes the abnormality probability of the IoT device occurring abnormally at the predicted time point; wherein the length of the prediction time period is related to the abnormality probability output by the prediction model; and there is a positive proportional relationship between the abnormality probability and the length of the prediction time period.

2. The method according to claim 1, characterized in that The prediction model is trained by the following steps: Obtain historical equipment data and generate data sets; Dividing the data set into a training data set and a validation data set; Perform model training using the training data set to obtain the prediction model; The validation data set is used to perform model validation to obtain the trained prediction model.

3. The method according to claim 1, characterized in that The method further comprises: The prediction model is trained using the stored device data within the prediction time period and the device status of the IoT device at the prediction time point.

4. The method according to claim 1, wherein The method further comprises: In response to an abnormality occurring in the IoT device at the predicted time point, the device data stored within the predicted time period is uploaded to a device simulator.

5. A device for storing device data, characterized in that: The device is used to implement a server, and the device includes: a receiving module, a prediction module and a storage module; The receiving module is used to receive device data collected by the IoT device at frequency a; the device data includes c types; The prediction module is configured to predict the device state of the IoT device at a prediction time point based on the device data using a prediction model to obtain a prediction result; the prediction time point is a time point after the time point corresponding to the device data input into the prediction model; The storage module is configured to, in response to the prediction result indicating that the IoT device has an abnormality at the predicted time point, send collection instruction information to the IoT device, wherein the collection instruction information is used to instruct the IoT device to collect data within the predicted time period; the collection instruction information is used to adjust the data collection behavior of the IoT device; the collection instruction information includes first collection instruction information and second collection instruction information; the first collection instruction information is used to instruct the IoT device to increase the data collection frequency, wherein the IoT device adjusts the data collection frequency from a to b within the predicted time period, where b is an integer greater than a; the second collection instruction information is used to instruct the IoT device to increase the data collection type, wherein the IoT device adjusts the data collection type from c to d within the predicted time period, where d is an integer greater than c; the IoT device sends the device data collected based on frequency b and type d to the server; receiving, within the predicted time period, the device data sent by the IoT device based on the collection indication information, and storing the device data, wherein the predicted time period is a time period including the predicted time point; An abnormality cause determination module, configured to use a device simulator to replay and simulate the device data to determine the abnormality cause of the IoT device; The prediction result includes the abnormality probability of the IoT device occurring abnormally at the predicted time point; wherein the length of the prediction time period is related to the abnormality probability output by the prediction model; and there is a positive proportional relationship between the abnormality probability and the length of the prediction time period.

6. A computer device, characterized in that: The computer device includes: a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by the processor to implement the device data storage method according to any one of claims 1 to 4.

7. A computer-readable storage medium, characterized in that The storage medium stores at least one instruction, at least one program, a code set, or an instruction set, and the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the device data storage method according to any one of claims 1 to 4.

Citation Information

Patent Citations

  • Android automatic testing screen recording mechanism and system disengaged from PC

    CN105183654A

  • Device full life cycle monitoring method and system based on Internet of Things

    CN113008591A