Data classification method, data classification device, medium and electronic equipment
Through the data classification method and exception processing long and short memory network model, abnormal data in IoT data is detected and corrected, which solves the problem of IoT data classification errors and improves the accuracy of data classification and user trust.
Patent Information
- Application Number
- CN202110468156.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-28
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2041-04-28
AI Technical Summary
Due to the high dimensionality, complexity and real-time characteristics of IoT data, data anomalies are prone to occur, leading to classification errors and affecting user experience and product trust.
Using the data classification method, by obtaining Internet of Things data, inputting the data classification model, detecting abnormal data, correcting the abnormal data into normal data, and classifying the normal data according to the data classification model, using the exception processing long and short memory network model and forgetting gate, input Gates and other components constitute update gates, determine memory units, and calculate implicit state information to improve the accuracy of data classification.
It improves the accuracy of data classification, avoids the direct classification and storage of abnormal data, ensures the continuity of data, and improves user experience and product trust.
Smart Images

Figure 00000000_0000
Abstract
Description
Background Art
[0002] With the rapid development of informatization and the improvement of people's living standards, people are paying more and more attention to the problem of product traceability, and hope to fully understand the production information and logistics information of the products. The product traceability can be carried out through QR codes, bar codes, RFID, etc. For example, people can view the static information of the product on the web page by scanning the QR code.
[0003] In the related art, when it is necessary to view the dynamic information of a product, the data collected by the IoT device can be classified and stored in a database, thereby completing the storage of the dynamic information of the product and making it convenient for users to view it.
[0004] However, with the continuous increase in IoT nodes, the structure between IoT nodes has become more and more complex, resulting in an increasing amount of IoT data. The IoT data collected by the nodes has the characteristics of high dimensionality, complexity, and real-time, which is prone to data anomalies and leads to data classification errors.
[0005] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0006] The purpose of the present disclosure is to provide a data classification method, a data classification device, a computer-readable storage medium and an electronic device, which can solve the problem of incorrect classification of IoT data.
[0007] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0008] According to a first aspect of the present disclosure, a data classification method is provided, comprising: acquiring Internet of Things data, wherein the Internet of Things data comprises normal Internet of Things data and abnormal Internet of Things data; inputting the Internet of Things data into a data classification model, detecting the abnormal Internet of Things data in the Internet of Things data; correcting the abnormal Internet of Things data into normal Internet of Things data, and classifying the normal Internet of Things data according to the data classification model.
[0009] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the detecting of abnormal IoT data in the IoT data includes: acquiring first normal IoT data corresponding to the IoT data; wherein the first normal IoT data is normal IoT data of the previous time unit of the IoT data; and detecting abnormal IoT data in the IoT data according to the first normal IoT data.
[0010] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, detecting abnormal IoT data in the IoT data according to the first IoT normal data includes: obtaining an abnormal IoT data threshold; and detecting abnormal IoT data in the IoT data according to the first IoT normal data and the abnormal IoT data threshold.
[0011] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, detecting the IoT abnormal data in the IoT data according to the first IoT normal data and the IoT data abnormal threshold includes: calculating the difference between the first IoT normal data and the IoT data; and determining whether the IoT data is IoT abnormal data according to the relationship between the difference and the IoT data abnormal threshold.
[0012] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the correction of the IoT abnormal data into IoT normal data includes: obtaining one or more second IoT normal data corresponding to the IoT abnormal data, and obtaining an abnormal data correction factor; wherein the second IoT normal data is the IoT normal data within a time unit interval adjacent to the IoT abnormal data; and correcting the IoT abnormal data into IoT normal data according to the second IoT normal data and the abnormal data correction factor.
[0013] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the abnormal data correction factor includes a first relevant correction factor and a second relevant correction factor, and the correcting the Internet of Things abnormal data to the Internet of Things normal data according to the second Internet of Things normal data and the abnormal data correction factor includes: adjusting the second Internet of Things normal data according to the first relevant correction factor and the second relevant correction factor to obtain second Internet of Things predicted data; wherein the second Internet of Things normal data includes the Internet of Things normal data of the previous adjacent time unit interval and the Internet of Things normal data of the subsequent adjacent time unit interval; and correcting the Internet of Things abnormal data to the Internet of Things normal data according to the second Internet of Things predicted data.
[0014] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the data classification model includes an exception processing long short-term memory network model.
[0015] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the exception processing long short memory network model includes a forget gate and an input gate, and the method also includes: forming an update gate according to the forget gate and the input gate; the forget gate and the update gate respectively control the temporary memory unit and the first memory unit to determine the second memory unit; wherein, the first memory unit is a memory unit generated by the exception processing long short memory network model in the previous time unit; the temporary memory unit is a memory unit generated by the exception processing long short memory network model in the current time unit; and the second memory unit is a memory unit generated by the exception processing long short memory network model in the current time unit.
[0016] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the first implicit state information of the exception processing long short-term memory network model is obtained; the second implicit state information is determined according to the first implicit state information and the second memory unit; wherein the first implicit state information is the implicit state information generated by the exception processing long short-term memory network model in the previous time unit; and the second implicit state information is the implicit state information generated by the exception processing long short-term memory network model in the current time unit.
[0017] According to a second aspect of the present disclosure, a data classification device is provided, the device comprising: an Internet of Things data acquisition module, used to acquire Internet of Things data; wherein the Internet of Things data comprises normal Internet of Things data and abnormal Internet of Things data; an abnormal data monitoring module, used to input the Internet of Things data into a data classification model, and detect the abnormal Internet of Things data in the Internet of Things data; an Internet of Things data classification module, used to correct the abnormal Internet of Things data into normal Internet of Things data, and classify the normal Internet of Things data according to the data classification model.
[0018] According to a third aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the program is executed by a processor, the data classification method as described in the first aspect of the above embodiment is implemented.
[0019] According to a fourth aspect of the present disclosure, there is provided an electronic device, including:
[0020] Processor; and
[0021] A memory is used to store one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the data classification method as described in the first aspect of the above embodiment.
[0022] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:
[0023] In the data classification method provided in one embodiment of the present disclosure, after obtaining IoT data, the IoT data can be input into a data classification model, IoT abnormal data in the IoT data can be detected, the IoT abnormal data can be corrected into IoT normal data, and the IoT normal data can be classified according to the data classification model.
[0024] The embodiments of the present disclosure can correct abnormal data in IoT data to normal data and classify normal IoT data. On the one hand, the abnormal data can be processed to improve the accuracy of data classification, avoiding the direct classification and storage of abnormal data, which causes users to query abnormal data, thereby causing the user experience to decline; on the other hand, correcting abnormal data instead of directly removing abnormal IoT data can ensure the continuity of IoT data, thereby improving users' product trust and enhancing their purchasing confidence.
[0025] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and together with the specification, are used to explain the principles of the present disclosure. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0027] Figure 1 A schematic diagram schematically shows an exemplary system architecture of a data classification method in an exemplary embodiment of the present disclosure;
[0028] Figure 2 A flowchart of a data classification method in an exemplary embodiment of the present disclosure is schematically shown;
[0029] Figure 3 A flowchart of detecting abnormal IoT data in IoT data according to normal IoT data in a first IoT is schematically shown in an exemplary embodiment of the present disclosure;
[0030] Figure 4 A flowchart of detecting abnormal IoT data in IoT data according to first normal IoT data, IoT data and an abnormal threshold value of IoT data in an exemplary embodiment of the present disclosure is schematically shown;
[0031] Figure 5 A flowchart schematically illustrates a method of determining whether IoT data is IoT abnormal data according to a magnitude relationship between a difference value and an IoT data abnormality threshold value in an exemplary embodiment of the present disclosure;
[0032] Figure 6 A flowchart schematically illustrates a method of correcting abnormal Internet of Things data to normal Internet of Things data according to second normal Internet of Things data and an abnormal data correction factor in an exemplary embodiment of the present disclosure;
[0033] Figure 7 A flowchart schematically illustrates a method of correcting abnormal IoT data into normal IoT data according to second IoT prediction data in an exemplary embodiment of the present disclosure;
[0034] Figure 8 A flowchart for classifying normal data of the Internet of Things according to a determined forget gate in an exemplary embodiment of the present disclosure is schematically shown;
[0035] Fig. 9 Schematically showing a flow chart of a forget gate and an update gate controlling a temporary memory unit and a first memory unit respectively to determine a second memory unit in an exemplary embodiment of the present disclosure;
[0036] Fig.10 A flowchart of determining second implicit state information according to first implicit state information and a second memory unit in an exemplary embodiment of the present disclosure is schematically shown;
[0037] Fig.11 A schematic diagram schematically illustrates the structure of a long short-term memory network model for exception processing in an exemplary embodiment of the present disclosure;
[0038] Fig.12 A schematic diagram schematically illustrates a normal data search system for the Internet of Things in an exemplary embodiment of the present disclosure;
[0039] Fig.13 A schematic diagram schematically shows the composition of a data classification device in an exemplary embodiment of the present disclosure;
[0040] Fig.14 The structure diagram of a computer system suitable for implementing the electronic device of the exemplary embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0041] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as being limited to the examples set forth herein; on the contrary, these embodiments are provided so that the present disclosure will be more comprehensive and complete, and the concept of the example embodiments will be fully conveyed to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In addition, the described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present disclosure. However, those skilled in the art will appreciate that the technical solutions of the present disclosure may be practiced without one or more of the specific details, or other methods, components, devices, steps, etc. may be adopted. In other cases, known structures, methods, devices, implementations, materials, or operations are not shown or described in detail to avoid blurring various aspects of the present disclosure.
[0042] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or these functional entities or parts of functional entities may be implemented in one or more software hardened modules, or these functional entities may be implemented in different networks and / or processor devices and / or microcontroller devices.
[0043] Figure 1 A schematic diagram showing an exemplary system architecture to which the data classification method according to the embodiments of the present disclosure can be applied is shown.
[0044] like Figure 1 As shown, the system architecture 1000 may include one or more of terminal devices 1001, 1002, 1003, a network 1004, and a server 1005. The network 1004 is used to provide a medium for communication links between the terminal devices 1001, 1002, 1003 and the server 1005. The network 1004 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0045] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. For example, the server 1005 may be a server cluster composed of multiple servers.
[0046] Users can use terminal devices 1001, 1002, 1003 to interact with server 1005 through network 1004 to receive or send messages, etc. Terminal devices 1001, 1002, 1003 can be various electronic devices with display screens, including but not limited to smart phones, tablet computers, portable computers, desktop computers, etc. In addition, server 1005 can be a server that provides various services.
[0047] In one embodiment, the execution subject of the data classification method of the present disclosure may be server 1005, which may obtain the IoT data sent by terminal devices 1001, 1002, and 1003, input the IoT data into the data classification model, detect IoT abnormal data in the IoT data, correct the IoT abnormal data into IoT normal data, and classify the IoT normal data according to the data classification model to complete the data classification process. In addition, the data classification method of the present disclosure may also be executed by terminal devices 1001, 1002, 1003, etc., to realize the process of classifying IoT data according to the data classification model.
[0048] In addition, the implementation process of the data classification method of the present disclosure can also be implemented by the terminal devices 1001, 1002, 1003 and the server 1005. For example, the terminal devices 1001, 1002, 1003 can obtain IoT data, and then input the obtained IoT data into the data classification model, detect IoT abnormal data in the IoT data, and then send the obtained IoT abnormal data and IoT normal data to the server 1005, so that the server 1005 can correct the IoT abnormal data into IoT normal data, and classify the IoT normal data according to the data classification model.
[0049] As people's living standards continue to improve, people are paying more and more attention to the issue of product traceability. For some special products, such as food, people want to know more about the production information and logistics and transportation information of the products. In related technologies, product traceability can be achieved through QR codes, bar codes, and RFID. For example, you can use a mobile phone to scan the QR code attached to the product, which stores some static information about the product (origin, etc.). However, it is impossible to view a series of real-time dynamic information such as the growth, production, and transportation of the product. Therefore, the solutions in related technologies cannot meet the current user's product traceability needs.
[0050] When it is necessary to view the dynamic information of goods in real time, multiple IoT devices (such as sensors) can be set up in the production (generation) environment and logistics process of the goods, and the collected IoT data can be transmitted using Internet technology, and the acquired data can be classified for user viewing. However, with the continuous increase of IoT nodes, the network structure of IoT is becoming more and more complex, and the amount of IoT data transmitted is also increasing. These data have the characteristics of high dimensionality, complexity, and real-time. Due to factors such as the instability of network transmission, data anomalies are prone to occur. If these abnormal data are processed as normal data, it will greatly affect the user experience.
[0051] According to the data classification method provided in this exemplary embodiment, after acquiring IoT data, the IoT data can be input into a data classification model, IoT abnormal data in the IoT data can be detected, the IoT abnormal data can be corrected into IoT normal data, and the IoT normal data can be classified according to the data classification model. Figure 2 As shown, the data classification method may include the following steps:
[0052] Step S210, obtaining IoT data, wherein the IoT data includes normal IoT data and abnormal IoT data;
[0053] Step S220, inputting the IoT data into a data classification model to detect IoT abnormal data in the IoT data;
[0054] Step S230, correcting the abnormal IoT data into normal IoT data, and classifying the normal IoT data according to the data classification model.
[0055] In the data classification method provided in this example implementation, after acquiring the IoT data, the IoT data can be input into a data classification model to detect abnormal IoT data in the IoT data, correct the abnormal IoT data to normal IoT data, and classify the normal IoT data according to the data classification model.
[0056] The embodiments of the present disclosure can correct abnormal data in IoT data to normal data and classify normal IoT data. On the one hand, the abnormal data can be processed to improve the accuracy of data classification, avoiding the direct classification and storage of abnormal data, which causes users to query abnormal data, thereby causing the user experience to decline; on the other hand, correcting abnormal data instead of directly removing abnormal IoT data can ensure the continuity of IoT data, thereby improving users' product trust and enhancing their purchasing confidence.
[0057] Next, the steps S210 to S230 of data classification in this exemplary embodiment will be described in more detail with reference to the accompanying drawings and embodiments.
[0058] Step S210, obtaining IoT data, wherein the IoT data includes normal IoT data and abnormal IoT data;
[0059] In an exemplary embodiment of the present disclosure, the Internet of Things is an extended and expanded network based on the Internet, and is a huge network formed by combining various information sensing devices with the network. The core and foundation of the Internet of Things is still the Internet. It is an extended and expanded network based on the Internet, and its user end extends and expands to any objects to exchange and communicate information. The Internet of Things can connect any object to the Internet through information sensing devices such as radio frequency identification, infrared sensors, global positioning systems, laser scanners, etc., according to the agreed protocol, to exchange and communicate information, so as to realize the intelligent identification, positioning, tracking, monitoring and management of objects.
[0060] In an example embodiment of the present disclosure, IoT data can be obtained. Specifically, IoT data can include status data, which can represent real-time dynamic data about IoT from suppliers and consumers. For example, status data can represent whether the compressor in the cold storage is operating normally; IoT data can also include behavioral reference data, which can represent status data with subsequent plans, relying on automation technology that can change the real-time status of the system, and persuasiveness that can make people change their behavioral habits or make long-term investments. For example, behavioral reference data can include water resource waste data; IoT data can also include feedback data, and the IoT creates a feedback loop from consumers to producers, where product producers can verify the actual performance of products with a moderate level of privacy, security and anonymity, and encourage continuous product improvement and innovation; IoT data can also include positioning data, which can determine the current location of the item through positioning data; IoT data can also include personalized data, which refers to personal preference information. It should be noted that the present disclosure does not specifically limit the specific types of IoT data.
[0061] In an exemplary embodiment of the present disclosure, IoT data can be collected through a variety of sensors. For example, for milk products, users are more concerned about the real-time growth environment information of cows, such as soil information, temperature information, humidity information, etc. At this time, soil sensors, temperature sensors, and humidity sensors can be used to collect these data of interest to users. It should be noted that the present disclosure does not specifically limit the method of collecting IoT data.
[0062] Furthermore, after the IoT data are acquired through sensors, the IoT data can be processed. Specifically, since the IoT data usually come from different IoT devices, they may have different formats. Therefore, before using or processing the IoT data, the IoT data can be standardized or converted into a unified format to ensure that the standardized or converted format is compatible with the application for IoT data analysis or processing.
[0063] In an example embodiment of the present disclosure, IoT data can be obtained, and the IoT data includes normal IoT data and abnormal IoT data. For example, due to the complex environment in which IoT devices are located, they are prone to transient failures, and some abnormal data will be collected at this time. Or, due to the complex network structure of the IoT and the instability of network transmission, data anomalies may also occur during data transmission. At this time, the IoT data obtained will include normal IoT data and abnormal IoT data. The abnormal IoT data will affect the accuracy of data classification and greatly affect the user experience.
[0064] Step S220, inputting the IoT data into a data classification model to detect IoT abnormal data in the IoT data;
[0065] In an example embodiment of the present disclosure, IoT data may be input into a data classification model. Specifically, the data classification model may be used to detect whether the input IoT data is normal IoT data or abnormal IoT data, and to correct the abnormal IoT data, and to classify the corrected normal IoT data and the original normal IoT data. It should be noted that the present disclosure does not specifically limit the specific form of the data classification model.
[0066] In an exemplary embodiment of the present disclosure, the IoT abnormal data in the IoT data can be detected by a data classification model. Specifically, the IoT data that obviously does not conform to the current scene can be determined as IoT abnormal data, and the rules or methods for detecting IoT abnormal data are integrated in the data classification model. For example, for the growth environment information of dairy cows, the temperature information obtained at 14:00, 14:10, 14:20, and 14:30 are 20°C, 21°C, 35°C, and 19°C, respectively. At this time, the 35°C corresponding to 14:20 obviously does not conform to the current temperature scene. At this time, the 35°C corresponding to 14:20 can be determined as IoT abnormal data, and the humidity information obtained at 14:00, 14:10, 14:20, and 14:30 is 45%, 50%, 20%, and 50%, respectively. At this time, the 20% corresponding to 14:20 obviously does not conform to the current humidity scene. At this time, the 20% corresponding to 14:20 can be determined as IoT abnormal data. A normal data range may also be set, and when certain IoT data exceeds the normal data range, the IoT data is determined as IoT abnormal data. It should be noted that the present disclosure does not specifically limit the detection method for IoT abnormal data.
[0067] In an exemplary embodiment of the present disclosure, first normal IoT data corresponding to IoT data may be obtained; wherein the first normal IoT data is normal IoT data of a previous time unit of IoT data, and abnormal IoT data in IoT data may be detected based on the first normal IoT data. Figure 3 As shown, detecting abnormal IoT data in IoT data according to normal IoT data may include the following steps S310-S320:
[0068] Step S310, obtaining first normal Internet of Things data corresponding to the Internet of Things data; wherein the first normal Internet of Things data is normal Internet of Things data of a previous time unit of the Internet of Things data;
[0069] In an example embodiment of the present disclosure, first normal Internet of Things data corresponding to the Internet of Things data can be obtained. Specifically, when obtaining the Internet of Things data, the Internet of Things data can be obtained according to the time unit. For example, the Internet of Things data can be obtained every 10 minutes, or the data collected every 10 minutes can be processed and then obtained. After the current Internet of Things data is obtained, the normal Internet of Things data of the previous time unit can be obtained, and the normal Internet of Things data of the previous time unit is the first normal Internet of Things data. It should be noted that the present disclosure does not specifically limit the time unit for obtaining the Internet of Things data.
[0070] Step S320: Detect abnormal IoT data in the IoT data according to the first normal IoT data.
[0071] In an example embodiment of the present disclosure, after obtaining the first normal data of the Internet of Things, the abnormal data of the Internet of Things in the Internet of Things data can be detected based on the first normal data of the Internet of Things. Specifically, since the change amplitude of the Internet of Things data is small over time, the current Internet of Things data can be compared with the first normal data of the Internet of Things. When the difference between the first normal data of the Internet of Things and the current Internet of Things data is large, the current Internet of Things data is determined as abnormal data of the Internet of Things. Furthermore, the difference between every two normal data of the Internet of Things in the Internet of Things data can be calculated, and the average value of these differences can be calculated, and the average value of the differences can be used as a standard for evaluating whether the difference between the first normal data of the Internet of Things and the current Internet of Things data is large. It should be noted that the present disclosure does not specifically limit the method of determining abnormal data of the Internet of Things based on the first normal data of the Internet of Things.
[0072] Through the above steps S310 to S320, the first normal data of the Internet of Things corresponding to the Internet of Things data can be obtained, and the abnormal data of the Internet of Things in the Internet of Things data can be detected according to the first normal data of the Internet of Things.
[0073] In an exemplary embodiment of the present disclosure, an abnormal threshold of IoT data may be obtained, and abnormal IoT data in the IoT data may be detected according to the first normal IoT data, the IoT data, and the abnormal threshold of IoT data. Figure 4 As shown, detecting abnormal IoT data in IoT data according to the first normal IoT data, IoT data and an abnormal IoT data threshold may include the following steps S410-S420:
[0074] Step S410, obtaining an abnormal threshold value of IoT data;
[0075] In an example embodiment of the present disclosure, an IoT data anomaly threshold may be set, and the IoT data anomaly threshold may indicate that when the acquired data exceeds the IoT data anomaly threshold, the current IoT data is determined as IoT anomaly data. Specifically, when setting the IoT data anomaly threshold, a suitable IoT data anomaly threshold may be set according to a specific business scenario, or the IoT data anomaly threshold may be determined by mathematical operations. For example, the five largest IoT normal data in a certain period of time may be obtained, and the average of the five IoT normal data may be calculated, and the average may be used as the IoT data anomaly threshold. Specifically, the IoT data anomaly threshold may be stored in a memory during service or in a terminal device, and when the IoT data anomaly threshold is needed, the IoT data anomaly threshold may be called from a server or a memory. It should be noted that the present disclosure does not specifically limit the method for setting the IoT data anomaly threshold.
[0076] Step S420: Detect abnormal IoT data in the IoT data according to the first normal IoT data, the IoT data, and the IoT data abnormality threshold.
[0077] In an exemplary embodiment of the present disclosure, after the IoT data anomaly threshold is obtained through the above steps, the IoT anomaly data in the IoT data can be detected based on the first IoT normal data, the IoT data, and the IoT data anomaly threshold. Specifically, when the acquired IoT data exceeds the interval defined by the IoT data anomaly threshold, the IoT data is determined as IoT anomaly data. For example, for the temperature information of dairy cows, the IoT data anomaly threshold can be set on a daily basis. For example, the IoT data anomaly threshold set on a certain day in summer is 20°C or 43°C. When the acquired temperature is 10°C, 10°C is less than the IoT data anomaly threshold of 20°C, and the 10°C can be determined as IoT anomaly data.
[0078] Through the above steps S410 to S420, the IoT data abnormality threshold can be obtained, and the IoT abnormal data in the IoT data can be detected according to the first IoT normal data, the IoT data and the IoT data abnormality threshold.
[0079] In an exemplary embodiment of the present disclosure, the difference between the first normal IoT data and the IoT data may be calculated, and whether the IoT data is IoT abnormal data may be determined based on the magnitude relationship between the difference and the IoT data abnormality threshold. Figure 5 As shown, determining whether the IoT data is IoT abnormal data according to the size relationship between the difference and the IoT data abnormal threshold value may include the following steps S510 to S520:
[0080] Step S510, calculating the difference between the first IoT normal data and the IoT data;
[0081] In an exemplary embodiment of the present disclosure, after obtaining the first normal data of the Internet of Things, the difference between the first normal data of the Internet of Things and the Internet of Things data can be calculated. Specifically, the Internet of Things data can be obtained in real time, and the difference between the Internet of Things data and the corresponding first normal data of the Internet of Things can be calculated.
[0082] Step S520, determining whether the IoT data is IoT abnormal data according to the relationship between the difference and the IoT data abnormal threshold.
[0083] In an example embodiment of the present disclosure, after obtaining the difference between the first normal IoT data and the IoT data, it is possible to determine whether the IoT data is IoT abnormal data based on the size relationship between the difference and the IoT data abnormal threshold. Specifically, the IoT data abnormal threshold can represent the degree of deviation of the IoT data. The IoT data abnormal threshold can be set in advance, and the IoT data abnormal threshold can be stored in the memory of the server or terminal device. When the IoT data abnormal threshold is needed, it can be called in the memory of the server or terminal device. When the IoT data abnormal threshold is obtained, the size of the IoT data abnormal threshold and the difference can be compared. When the difference is greater than the IoT data abnormal threshold, the IoT data corresponding to the difference is determined as IoT abnormal data.
[0084] In an exemplary embodiment of the present disclosure, the IoT data x may also be set t With the first IoT normal data x t-1 When the square of the difference is greater than the IoT data abnormal threshold m, the IoT data is determined as IoT abnormal data. The specific expression is as follows:
[0085] |xt-xt-1|2 2
[0086] |x t -x t-1 |2>m
[0087] Through the above steps S510 to S520, the difference between the first normal IoT data and the IoT data can be calculated, and whether the IoT data is IoT abnormal data can be determined based on the relationship between the difference and the IoT data abnormal threshold.
[0088] Step S230, correcting the abnormal IoT data into normal IoT data, and classifying the normal IoT data according to the data classification model.
[0089] In an exemplary embodiment of the present disclosure, after obtaining abnormal IoT data, the IoT data can be corrected to normal IoT data. Specifically, when it is determined that the obtained IoT data is abnormal IoT data, it can be indicated that an error has occurred in the data collection end (such as a sensor) of the IoT or the IoT data during the transmission process. At this time, the abnormal IoT data needs to be corrected to normal IoT data to ensure the accuracy and consistency of the IoT data. For example, the abnormal IoT data can be corrected to the IoT data of the previous time unit corresponding to the IoT data, or the normal IoT data corresponding to the abnormal IoT data within a certain period of time can be obtained, and the average value of these normal IoT data can be used as the corrected normal IoT data, or the normal IoT data of the previous day corresponding to the time unit can be used as the corrected normal IoT data. It should be noted that the present disclosure does not specifically limit the method of correcting abnormal IoT data to normal data.
[0090] In an exemplary embodiment of the present disclosure, one or more second normal IoT data corresponding to the abnormal IoT data may be obtained, and an abnormal data correction factor may be obtained, and the abnormal IoT data may be corrected to normal IoT data according to the second normal IoT data and the abnormal data correction factor. Figure 6 As shown, correcting the abnormal data of the Internet of Things to normal data of the Internet of Things according to the second normal data of the Internet of Things and the abnormal data correction factor may include the following steps S610-S620:
[0091] Step S610, obtaining one or more second normal data of the Internet of Things corresponding to the abnormal data of the Internet of Things, and obtaining the abnormal data correction factor; wherein the second normal data of the Internet of Things is the normal data of the Internet of Things within the adjacent time unit interval of the abnormal data of the Internet of Things;
[0092] In an exemplary embodiment of the present disclosure, one or more second normal data of the Internet of Things corresponding to the abnormal data of the Internet of Things can be obtained. Specifically, the second normal data of the Internet of Things can include normal data of the Internet of Things in the adjacent time unit interval of the abnormal data of the Internet of Things. For example, for humidity information, the abnormal data of the Internet of Things obtained is 48°C, and the corresponding time is 10:20. At this time, normal data of the Internet of Things in the adjacent time unit interval of the abnormal data of the Internet of Things can be obtained. Assuming that the temperature information is obtained every 10 minutes, an adjacent time unit interval such as 30 minutes can be determined at this time. In the adjacent time unit interval, a total of 6 normal data of the Internet of Things are collected (three times for the first three time units of the abnormal data of the Internet of Things, and three times for the last three time units of the abnormal data of the Internet of Things). The abnormal data correction factor can also be obtained. Specifically, the abnormal data correction factor can be used to correct the abnormal data of the Internet of Things, and the specific value of the abnormal data correction factor can be adjusted according to the business scenario. It should be noted that the present disclosure does not specifically limit the specific form and specific value of the abnormal data correction factor.
[0093] Step S620: Correcting the abnormal data of the Internet of Things to normal data of the Internet of Things according to the second normal data of the Internet of Things and the abnormal data correction factor.
[0094] In an exemplary embodiment of the present disclosure, after obtaining the second normal data of the Internet of Things and the abnormal data correction factor, the abnormal data of the Internet of Things can be corrected to the normal data of the Internet of Things according to the second normal data of the Internet of Things and the abnormal data correction factor. Specifically, a plurality of second normal data of the Internet of Things can be multiplied by the abnormal data correction factor respectively, and then the multiplied result can be adaptively adjusted, and the adjusted Internet of Things data can be used as the corrected normal data of the Internet of Things.
[0095] Through the above steps S610 to S620, one or more second IoT normal data corresponding to the IoT abnormal data can be obtained, and the abnormal data correction factor can be obtained, and the IoT abnormal data can be corrected to IoT normal data according to the second IoT normal data and the abnormal data correction factor.
[0096] In an exemplary embodiment of the present disclosure, the second normal data of the Internet of Things can be adjusted according to the first relevant correction factor and the second relevant correction factor to obtain the second predicted data of the Internet of Things, and the abnormal data of the Internet of Things can be corrected to the normal data of the Internet of Things according to the second predicted data of the Internet of Things. Figure 7 As shown, correcting the abnormal IoT data to normal IoT data according to the second IoT prediction data may include the following steps S710-S720:
[0097] Step S710, adjusting the second Internet of Things normal data according to the first relevant correction factor and the second relevant correction factor to obtain the second Internet of Things predicted data; wherein the second Internet of Things normal data includes the Internet of Things normal data of the previous adjacent time unit interval and the Internet of Things normal data of the subsequent adjacent time unit interval;
[0098] In an exemplary embodiment of the present disclosure, multiple second normal data of the Internet of Things are adjusted according to the first relevant correction factor and the second relevant correction factor, and the adjusted results are added to obtain the second Internet of Things prediction data. Specifically, the normal data of the Internet of Things in the previous adjacent time unit interval of the abnormal Internet of Things data can be adjusted according to the first relevant correction factor, and the normal data of the Internet of Things in the subsequent adjacent time unit interval of the abnormal Internet of Things data can be adjusted according to the second relevant correction factor, and the adjusted data can be added to obtain the second Internet of Things prediction data.
[0099] For example, the time corresponding to the IoT abnormal data is 11:00, and the IoT data is collected every 10 minutes. Assuming that the adjacent time unit interval is 30 minutes, the second IoT normal data of the previous adjacent time unit interval of the IoT abnormal data are the IoT normal data of 10:30, the IoT normal data of 10:40, and the IoT normal data of 10:40 respectively. The IoT normal data of 10:30, 10:40, and 10:40 can be adjusted according to the first relevant correction factor, and the second IoT normal data of the subsequent adjacent time unit interval of the IoT abnormal data are the IoT normal data of 11:10, 11:20, and 11:30 respectively. The IoT normal data of 11:10, 11:20, and 11:30 can be adjusted according to the second relevant correction factor, and the adjusted data are added to obtain the second IoT prediction data.
[0100] Step S720: Correcting the abnormal IoT data to normal IoT data according to the second IoT prediction data.
[0101] In an exemplary embodiment of the present disclosure, after the second IoT prediction data is obtained through the above steps, the IoT abnormal data can be corrected to IoT normal data according to the second IoT prediction data. Specifically, the second IoT prediction data can be averaged, and the averaged data is used as the corrected IoT normal data.
[0102] Furthermore, when averaging the second IoT prediction data, the influence of the first correlation correction factor and the second correlation correction factor needs to be considered. For example, the first correlation correction factor β has a value range of (0, 0.5), the second correlation correction factor γ is an infinite constant close to 1, and the normal data of the second IoT in the previous adjacent time unit intervals are x t-1 and x t-2 , and the normal data of the second IoT in the adjacent time unit intervals are x t+1 and x t+2 , the IoT abnormal data obtained is x t , at this time, the corrected normal data of the Internet of Things x in The expression is as follows:
[0103]
[0104] Through the above steps S710 to S720, the second Internet of Things normal data can be adjusted according to the first relevant correction factor and the second relevant correction factor to obtain the second Internet of Things predicted data, and the Internet of Things abnormal data can be corrected to the Internet of Things normal data according to the second Internet of Things predicted data.
[0105] In an example embodiment of the present disclosure, the data classification model may include an exception processing long short-term memory network model, which can detect whether the input IoT data is IoT abnormal data, and if it is IoT abnormal data, correct the IoT abnormal data to IoT normal data. The exception processing long short-term memory network model may include a long short-term memory network (Long Short-Term Memory, LSTM), and the LSTM network includes a forget gate, an input gate, and an output gate, wherein the forget gate determines what information should be forgotten, the input gate indicates what information to save, and the output gate determines which part needs to be output.
[0106] In an exemplary embodiment of the present disclosure, the forget gate is used to determine how much information is discarded from the memory unit of the previous time unit, and can be mapped to a value between 0 and 1. 0 means completely discarded, and 1 means completely retained. t Represents the forget gate, which is based on the input IoT data x t and the implicit state information h of the previous time unit t-1 To determine the memory cell retention state of the previous time unit, where σ represents the sigmoid function, W (f) represents the weight matrix of the forget gate, U (f) represents the weight matrix of the previous time unit forget gate of the forget gate. In the scheme disclosed in the present invention, the normal data of the Internet of Things includes correcting the abnormal data of the Internet of Things to the normal data of the Internet of Things x tnAnd the original normal data of IoT x t , at this time, the expression of the forget gate is as follows:
[0107]
[0108] In an example embodiment of the present disclosure, after acquiring IoT data, it is determined whether the square of the absolute value of the difference between the IoT data and the first IoT normal data is less than or equal to the IoT data abnormality threshold. When the square of the absolute value of the difference between the IoT data and the first IoT normal data is greater than the IoT data abnormality threshold, it indicates that the IoT data is IoT abnormal data. At this time, the IoT abnormal data can be corrected to IoT normal data, and a forget gate is determined based on the corrected IoT normal data. When the square of the absolute value of the difference between the IoT data and the first IoT normal data is less than or equal to the IoT data abnormality threshold, it indicates that the IoT data is IoT normal data. The forget gate can be directly determined based on the IoT normal data, and finally the IoT normal data is classified based on the determined forget gate. Figure 8 As shown, classifying normal IoT data according to the determined forget gate may include the following steps S810 to S860: step S810, acquiring IoT data; step S820, determining whether the IoT data is normal IoT data; step S830, when the IoT data is abnormal IoT data, correcting the abnormal IoT data to normal IoT data; step S840, determining the forget gate according to the corrected normal IoT data; step S850, when the IoT data is normal IoT data, determining the forget gate according to the normal IoT data; step S860, classifying the normal IoT data according to the determined forget gate.
[0109] In an exemplary embodiment of the present disclosure, an update gate may be formed based on a forget gate and an input gate, and the forget gate and the update gate respectively control the temporary memory unit and the first memory unit to determine the second memory unit. Fig. 9 As shown, the forget gate and the update gate control the temporary memory unit and the first memory unit respectively to determine the second memory unit, which may include the following steps S910-S920:
[0110] Step S910, forming an update gate according to the forget gate and the input gate;
[0111] In step S920 , the forget gate and the update gate respectively control the temporary memory unit and the first memory unit to determine the second memory unit.
[0112] In an exemplary embodiment of the present disclosure, the first memory unit is a memory unit generated by the long-short memory network model for abnormal processing of the previous time unit, the temporary memory unit is a memory unit generated by the long-short memory network model for abnormal processing of the current time unit, and the second memory unit is a memory unit generated by the long-short memory network model for abnormal processing of the current time unit. Specifically, the forget gate and the input gate can be combined into an update gate, and the temporary memory unit is controlled by the update gate, and the first memory unit is controlled according to the forget gate. For example, in the abnormal processing long-short memory network model, the forget gate is f t , the temporary memory unit is C′ t , the first memory unit is C t-1 , the second memory unit C t The expression is:
[0113] C t =(1-f t )·C′ t +f t ·C t-1
[0114] Through the above steps S910 to S920, an update gate can be formed according to the forget gate and the input gate, and the forget gate and the update gate respectively control the temporary memory unit and the first memory unit to determine the second memory unit.
[0115] In an exemplary embodiment of the present disclosure, the first implicit state information of the exception handling long short-term memory network model can be obtained, and the second implicit state information can be determined according to the first implicit state information and the second memory unit. Fig.10 As shown, determining the second implicit state information according to the first implicit state information and the second memory unit may include the following steps S1010-S1020:
[0116] Step S1010, obtaining first implicit state information of the exception processing long short-term memory network model;
[0117] Step S1020, determining second implicit state information according to the first implicit state information and the second memory unit.
[0118] In an exemplary embodiment of the present disclosure, the first implicit state information of the exception processing long short-term memory network model can be obtained. The first implicit state information is the implicit state information generated by the exception processing long short-term memory network model in the previous time unit, and the second implicit state information is the implicit state information generated by the exception processing long short-term memory network model in the current time unit. Specifically, the second implicit state information can be determined based on the first implicit state information and the second memory unit. Since the difference between the IoT data of the previous time unit and the IoT data of the next time unit is small in the IoT environment, the effect of the first implicit state information can be enhanced, so that the exception processing long short-term memory network model has a higher accuracy rate in data classification. For example, the first implicit state information is h t-1 , the second memory unit is c t , the candidate memory unit is o t , tanh represents the activation function. Tanh is needed when candidate memory units need to be generated. It is a sine-curved bitangent function. The second implicit state information h t The expression is:
[0119] h t =o t tanh(c t )+x t tanh(h t-1 )
[0120] Through the above steps S1010 to S1020, the first implicit state information of the exception processing long short-term memory network model can be obtained, and the second implicit state information can be determined according to the first implicit state information and the second memory unit.
[0121] In an exemplary embodiment of the present disclosure, it is possible to determine whether the input IoT data is IoT abnormal data, and if so, correct the IoT abnormal data to IoT normal data, input all IoT normal data, set an update gate in the abnormality processing long short-term memory network model, and increase the effect of the first implicit state information when determining the second implicit state information. Specifically, the structure of the abnormality processing long short-term memory network model is as follows: Fig.11 shown.
[0122] In an exemplary embodiment of the present disclosure, the normal data of the Internet of Things can be divided into different categories and stored in a database. Specifically, the normal data of the Internet of Things can include multiple categories, such as temperature, humidity, location, weight, soil information, etc. The normal data of the Internet of Things can be stored in a corresponding database according to the category, and a normal data search system of the Internet of Things can be provided to users, so that users can query the normal data of the Internet of Things, such as Fig.12As shown, it is a schematic diagram of a normal data search system for the Internet of Things. Multiple sensors can be installed in the physical world, and the Internet of Things data collected by the sensors can be stored in the edge nodes, and then input into the abnormal processing long short-term memory network model for classification. According to different categories, the normal data of the Internet of Things can be input into the database of the corresponding category. Users can obtain the Internet of Things data collected by the Internet of Things sensors through situational awareness, analyze and count the data, establish a query matching function, and then link the query matching with the search engine. They can also perform fusion analysis on the normal data of the Internet of Things stored in the database, and build a knowledge base based on data mining. In this way, personalized recommendations and commonly used function recommendations can be made to users, and indexes can be established to speed up the search speed. The index is linked to the search engine, and users can monitor and view the normal data of the Internet of Things through the search engine on the mobile phone software or the front end of the web page.
[0123] Furthermore, since IoT data usually corresponds to time, an InfluxDB database with a timestamp can be used to store normal IoT data. Specifically, InfluxDB is an open source time series database designed to handle high write and query loads, and provides a SQL-like query language called InfluxQL for interacting with data. The reason why InfluxDB supports IoT systems is that it can read millions of times per second, which can meet the needs of the largest monitoring and IoT deployments. Using the InfluxDB database to store normal IoT data, you can directly use the database's built-in time-related functions to process IoT data (such as minimum, mean, sum, etc.).
[0124] In the data classification method provided in this example implementation, after acquiring the IoT data, the IoT data can be input into a data classification model to detect abnormal IoT data in the IoT data, correct the abnormal IoT data to normal IoT data, and classify the normal IoT data according to the data classification model.
[0125] The embodiments of the present disclosure can correct abnormal data in IoT data to normal data and classify normal IoT data. On the one hand, the abnormal data can be processed to improve the accuracy of data classification, avoiding the direct classification and storage of abnormal data, which causes users to query abnormal data, thereby causing the user experience to decline; on the other hand, correcting abnormal data instead of directly removing abnormal IoT data can ensure the continuity of IoT data, thereby improving users' product trust and enhancing their purchasing confidence.
[0126] It should be noted that the above figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0127] In addition, in an exemplary embodiment of the present disclosure, a data classification device is also provided. Fig.13 As shown, a data classification device 1300 includes: an Internet of Things data acquisition module 1310, an abnormal data monitoring module 1320, and an Internet of Things data classification module 1330.
[0128] Among them, the Internet of Things data acquisition module is used to acquire Internet of Things data; wherein the Internet of Things data includes normal Internet of Things data and abnormal Internet of Things data; the abnormal data monitoring module is used to input the Internet of Things data into the data classification model and detect the abnormal Internet of Things data in the Internet of Things data; the Internet of Things data classification module is used to correct the abnormal Internet of Things data into normal Internet of Things data, and classify the normal Internet of Things data according to the data classification model.
[0129] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, abnormal IoT data in IoT data is detected, and the device includes: a first IoT normal data acquisition unit, used to acquire first IoT normal data corresponding to the IoT data; wherein the first IoT normal data is the IoT normal data of the previous time unit of the IoT data; and an abnormal data detection unit, used to detect abnormal IoT data in the IoT data according to the first IoT normal data.
[0130] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, abnormal IoT data in IoT data is detected according to normal IoT data of the first IoT, and the device includes: an IoT data abnormality threshold acquisition unit, used to acquire an abnormal IoT data threshold; an abnormal threshold detection unit, used to detect abnormal IoT data in IoT data according to the first IoT normal data and the abnormal IoT data threshold.
[0131] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the IoT abnormal data in the IoT data is detected according to the first IoT normal data and the IoT data abnormal threshold, and the device includes: a difference calculation unit, which is used to calculate the difference between the first IoT normal data and the IoT data; and an abnormal data determination unit, which is used to determine whether the IoT data is IoT abnormal data according to the relationship between the difference and the IoT data abnormal threshold.
[0132] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the IoT abnormal data is corrected into IoT normal data, and the device includes: a second IoT normal data acquisition unit, used to acquire one or more second IoT normal data corresponding to the IoT abnormal data, and acquire an abnormal data correction factor; wherein the second IoT normal data is the IoT normal data within a time unit interval adjacent to the IoT abnormal data; and a first abnormal data correction unit, used to correct the IoT abnormal data into IoT normal data according to the second IoT normal data and the abnormal data correction factor.
[0133] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the abnormal data correction factor includes a first relevant correction factor and a second relevant correction factor, and the abnormal data of the Internet of Things is corrected into normal data of the Internet of Things according to the second normal data of the Internet of Things and the abnormal data correction factor. The device includes: a second Internet of Things prediction data acquisition unit, which is used to adjust the second normal data of the Internet of Things according to the first relevant correction factor and the second relevant correction factor to obtain second Internet of Things prediction data; wherein the second normal data of the Internet of Things includes the normal data of the Internet of Things in the front adjacent time unit interval and the normal data of the Internet of Things in the rear adjacent time unit interval; a second abnormal data correction unit, which is used to correct the abnormal data of the Internet of Things into normal data of the Internet of Things according to the second Internet of Things prediction data.
[0134] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the data classification model includes an exception processing long short-term memory network model.
[0135] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the exception processing long short memory network model includes a forget gate and an input gate, and the device also includes: an update gate determination unit, used to form an update gate according to the forget gate and the input gate; a second memory unit determination unit, used for the forget gate and the update gate to respectively control the temporary memory unit and the first memory unit to determine the second memory unit; wherein the first memory unit is a memory unit generated by the exception processing long short memory network model of the previous time unit; the temporary memory unit is a memory unit generated by the exception processing long short memory network model of the current time unit; and the second memory unit is a memory unit generated by the exception processing long short memory network model of the current time unit.
[0136] In an exemplary embodiment of the present disclosure, based on the aforementioned scheme, the device also includes: a first implicit state information acquisition unit, used to acquire the first implicit state information of the exception processing long and short memory network model; a second implicit state information determination unit, used to determine the second implicit state information based on the first implicit state information and the second memory unit; wherein the first implicit state information is the implicit state information generated by the exception processing long and short memory network model of the previous time unit; and the second implicit state information is the implicit state information generated by the exception processing long and short memory network model of the current time unit.
[0137] Since the various functional modules of the data classification device of the example embodiment of the present disclosure correspond to the steps of the example embodiment of the data classification method described above, for details not disclosed in the embodiment of the device of the present disclosure, please refer to the embodiment of the data classification method described above in the present disclosure.
[0138] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0139] In addition, in an exemplary embodiment of the present disclosure, an electronic device capable of implementing the above data classification method is also provided.
[0140] Those skilled in the art will appreciate that various aspects of the present disclosure may be implemented as systems, methods or program products. Therefore, various aspects of the present disclosure may be specifically implemented in the following forms, namely: complete hardware embodiments, complete software embodiments (including firmware, microcode, etc.), or embodiments combining hardware and software aspects, which may be collectively referred to herein as "circuits", "modules" or "systems".
[0141] Refer to the following Fig.14 1400 according to this embodiment of the present disclosure is described. Fig.14 The electronic device 1400 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0142] like Fig.14 As shown, the electronic device 1400 is in the form of a general computing device. The components of the electronic device 1400 may include, but are not limited to: the at least one processing unit 1410, the at least one storage unit 1420, a bus 1430 connecting different system components (including the storage unit 1420 and the processing unit 1410), and a display unit 1440.
[0143] The storage unit stores program codes, which can be executed by the processing unit 1410, so that the processing unit 1410 performs the steps according to various exemplary embodiments of the present disclosure described in the above “Exemplary Method” section of this specification. For example, the processing unit 1410 can perform the following steps: Figure 2In step S210 shown in the figure, IoT data is obtained, wherein the IoT data includes normal IoT data and abnormal IoT data; in step S220, the IoT data is input into a data classification model to detect abnormal IoT data in the IoT data; in step S230, the abnormal IoT data is corrected into normal IoT data, and the normal IoT data is classified according to the data classification model.
[0144] For example, electronic devices can achieve Figure 2 The steps shown.
[0145] The storage unit 1420 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 1421 and / or a cache storage unit 1422 , and may further include a read-only storage unit (ROM) 1423 .
[0146] The storage unit 1420 may also include a program / utility 1424 having a set (at least one) of program modules 1425, such program modules 1425 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0147] Bus 1430 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0148] The electronic device 1400 may also communicate with one or more external devices 1470 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1400, and / or communicate with any device that enables the electronic device 1400 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1450. In addition, the electronic device 1400 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1460. As shown, the network adapter 1460 communicates with other modules of the electronic device 1400 via a bus 1430. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1400, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0149] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the embodiment of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiment of the present disclosure.
[0150] In an exemplary embodiment of the present disclosure, a computer-readable storage medium is also provided, on which a program product capable of implementing the above method of the present specification is stored. In some possible embodiments, various aspects of the present disclosure can also be implemented in the form of a program product, which includes a program code. When the program product is run on a terminal device, the program code is used to enable the terminal device to execute the steps according to various exemplary embodiments of the present disclosure described in the above "Exemplary Method" section of the present specification.
[0151] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0152] The program code embodied on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0153] Program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., through the Internet using an Internet service provider).
[0154] In addition, the above-mentioned figures are only schematic illustrations of the processes included in the method according to the exemplary embodiments of the present disclosure, and are not intended to be limiting. It is easy to understand that the processes shown in the above-mentioned figures do not indicate or limit the time sequence of these processes. In addition, it is also easy to understand that these processes can be performed synchronously or asynchronously, for example, in multiple modules.
[0155] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
Claims
1. A data classification method, characterized in that: include: Acquire IoT data, wherein the IoT data includes normal IoT data and abnormal IoT data; Inputting the IoT data into a data classification model to detect IoT abnormal data in the IoT data; Acquire one or more second normal data of the Internet of Things corresponding to the abnormal data of the Internet of Things, and acquire an abnormal data correction factor, correct the abnormal data of the Internet of Things into normal data of the Internet of Things according to the second normal data of the Internet of Things and the abnormal data correction factor, and classify the normal data of the Internet of Things according to the data classification model; wherein the second normal data of the Internet of Things is the normal data of the Internet of Things within the adjacent time unit interval of the abnormal data of the Internet of Things; The data classification model includes an exception processing long short-term memory network model, the exception processing long short-term memory network model includes a forget gate and an input gate, and the method further includes: An update gate is formed according to the forget gate and the input gate; The forget gate and the update gate respectively control the temporary memory unit and the first memory unit to determine the second memory unit; wherein the first memory unit is a memory unit generated by the exception processing long-short memory network model in the previous time unit; the temporary memory unit is a memory unit generated by the exception processing long-short memory network model in the current time unit; the second memory unit is a memory unit generated by the exception processing long-short memory network model in the current time unit; Acquire first implicit state information of the exception processing long short-term memory network model; The second implicit state information is determined according to the first implicit state information and the second memory unit; wherein the first implicit state information is the implicit state information generated by the exception processing long short-term memory network model in the previous time unit; and the second implicit state information is the implicit state information generated by the exception processing long short-term memory network model in the current time unit.
2. The method according to claim 1, characterized in that The detecting abnormal IoT data in the IoT data includes: Acquire first normal Internet of Things data corresponding to the Internet of Things data; wherein the first normal Internet of Things data is normal Internet of Things data of a previous time unit of the Internet of Things data; The IoT abnormal data in the IoT data is detected according to the first IoT normal data.
3. The method according to claim 2, characterized in that The detecting the abnormal Internet of Things data in the Internet of Things data according to the first normal Internet of Things data includes: Get the IoT data anomaly threshold; The IoT abnormal data in the IoT data is detected according to the first IoT normal data and the IoT data abnormal threshold.
4. The method according to claim 3, characterized in that: The detecting the IoT abnormal data in the IoT data according to the first IoT normal data and the IoT data abnormal threshold comprises: Calculate the difference between the first IoT normal data and the IoT data; Whether the IoT data is IoT abnormal data is determined according to a size relationship between the difference and the IoT data abnormal threshold.
5. The method according to claim 1, characterized in that The abnormal data correction factor includes a first related correction factor and a second related correction factor, and the correcting the abnormal data of the Internet of Things to normal data of the Internet of Things according to the second normal data of the Internet of Things and the abnormal data correction factor includes: The second normal data of the Internet of Things is adjusted according to the first relevant correction factor and the second relevant correction factor to obtain the second predicted data of the Internet of Things; wherein the second normal data of the Internet of Things includes the normal data of the Internet of Things in the previous adjacent time unit interval and the normal data of the Internet of Things in the subsequent adjacent time unit interval; The abnormal Internet of Things data is corrected to normal Internet of Things data according to the second Internet of Things prediction data.
6. A data classification device, characterized in that: The device comprises: An IoT data acquisition module, used to acquire IoT data; wherein the IoT data includes normal IoT data and abnormal IoT data; An abnormal data monitoring module is used to input the IoT data into a data classification model to detect IoT abnormal data in the IoT data; wherein the data classification model includes an abnormal processing long short-term memory network model, and the abnormal processing long short-term memory network model includes a forget gate and an input gate; An Internet of Things data classification module, used to obtain one or more second Internet of Things normal data corresponding to the Internet of Things abnormal data, and obtain an abnormal data correction factor, correct the Internet of Things abnormal data into Internet of Things normal data according to the second Internet of Things normal data and the abnormal data correction factor, and classify the Internet of Things normal data according to the data classification model; wherein the second Internet of Things normal data is the Internet of Things normal data within a time unit interval adjacent to the Internet of Things abnormal data; An update gate determination unit, used for forming an update gate according to a forget gate and an input gate; A second memory unit determination unit is used for a forget gate and an update gate to respectively control a temporary memory unit and a first memory unit to determine a second memory unit; wherein the first memory unit is a memory unit generated by a long-short memory network model for abnormal processing of a previous time unit; the temporary memory unit is a memory unit generated by a long-short memory network model for abnormal processing of a current time unit; and the second memory unit is a memory unit generated by a long-short memory network model for abnormal processing of a current time unit; A first implicit state information acquisition unit, used to acquire first implicit state information of the exception processing long short-term memory network model; The second implicit state information determination unit is used to determine the second implicit state information based on the first implicit state information and the second memory unit; wherein the first implicit state information is the implicit state information generated by the long short-term memory network model for abnormal processing in the previous time unit; and the second implicit state information is the implicit state information generated by the long short-term memory network model for abnormal processing in the current time unit.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 5 is implemented.
8. An electronic device, characterized in that: include: processor; as well as A memory for storing one or more programs, which, when executed by the one or more processors, enables the one or more processors to implement the method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Electric energy metering device abnormality detecting method based on long and short term memory model
CN108761377A
False alarm information identification method and device, storage medium and electronic terminal
CN109379228A
Abnormal instruction detection method of source network load interaction industrial control system
CN109753049A
Regional anomaly detection method based on edge computing as well as edge computing equipment
CN109947079A
Metering instrument operating state online evaluation method
CN110375787A
