Internet of Things data processing method based on artificial intelligence
By introducing artificial intelligence technology into IoT data processing, and using digital signature and intelligent blocking strategies, the problem of insufficient data importance judgment and backup mechanism in traditional methods is solved, and efficient and reliable IoT data storage and management is achieved.
Patent Information
- Application Number
- CN202510128045.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-04
- Publication Date
- 2025-06-06
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional IoT data processing methods cannot effectively judge the importance of data, resulting in the failure to store important data in a timely manner and lack of intelligent backup mechanisms, which may lead to data loss or inconsistency.
Using an IoT data processing method based on artificial intelligence, we determine the data source through digital signatures, dynamically analyze the data storage order, design intelligent blocking strategies, and set up a dual backup mechanism.
It realizes orderly storage and management of data, improves the pertinence and efficiency of data storage, ensures the priority of key data, optimizes storage efficiency, reduces storage time, and ensures the reliability and consistency of data.
Smart Images

Figure CN120104625A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of Internet of Things data processing, and in particular to an Internet of Things data processing method based on artificial intelligence. Background Art
[0002] With the rapid development of Internet of Things (IoT) technology, more and more physical devices are connected to the Internet, realizing real-time data collection, exchange and processing; these devices cover a wide range of fields from smart homes, smart cities to Industry 4.0, and the amount of data generated every day is growing exponentially; according to IDC's forecast, the amount of data generated every day in the world will reach 500 billion GB, of which the amount of data generated by IoT devices accounts for a significant proportion; these data are not only huge in scale, but also diverse, real-time and distributed, which poses severe challenges to traditional data processing, especially storage and backup methods;
[0003] Traditional IoT data processing methods often store data in a random order or in the order in which data is received, ignoring the relative importance of various types of data, which may result in the failure to store important IoT data in a timely manner, thus affecting the subsequent equipment abnormality analysis and decision-making process; secondly, traditional methods often use a fixed block size or a simple block strategy, and are unable to comprehensively judge the optimal block method based on the data size and storage time length, which increases the storage time; in addition, most traditional methods set a backup data and lack a more intelligent data backup mechanism, which may result in untimely updates of backup data, resulting in data loss or inconsistency. Summary of the invention
[0004] 1. Technical issues to be resolved
[0005] In response to the technical problems in the background technology, the present invention proposes an IoT data processing method based on artificial intelligence, which classifies the IoT data to be stored, dynamically analyzes and determines the storage order of various types of IoT data, designs an intelligent blocking strategy, determines the blocking method based on storage events, and sets a dual backup mechanism; thereby solving the technical problems recorded in the background technology.
[0006] (II) Technical solution
[0007] To achieve the above objectives, the present invention is implemented through the following technical solutions:
[0008] An Internet of Things data processing method based on artificial intelligence, comprising:
[0009] Determine the associated device of the IoT data to be stored based on the digital signature data, and determine the storage area of the IoT data to be stored based on the mark of the associated device; classify and mark various types of IoT data in the IoT data to be stored before storage;
[0010] Based on the number of data categories in the IoT data to be stored, determine whether to execute the storage order determination strategy; when determining to execute the storage order determination strategy, calculate the correlation index of each type of IoT data for each type of anomaly, and determine the storage order of each type of IoT data based on the comprehensive correlation index;
[0011] The first block determination strategy or the second block determination strategy is triggered based on the data size judgment of various types of IoT data; the first block determination strategy and the second block determination strategy calculate the storage time required under different block determination methods and determine the block determination method based on the storage time; after the block storage operation, the pointer and CID of each data block are generated, and the DHT is updated;
[0012] The first and second backup data block groups are generated respectively, which are used to store the real-time backup and the saved backup of the original data blocks respectively; when the user reads the data, the first and second backup data block groups and the original data block group are updated respectively based on the first and second monitoring events in the monitoring smart contract.
[0013] Specifically, in the blockchain network, whenever a data storage request for IoT data of a new type of device appears, an RSA encryption operation is performed on the device to generate a pair of public and private keys, and the public key is made public, and the private key is sent to the person who manages or uses the device.
[0014] When IoT data is ready to be stored in the blockchain network, the management or user of the corresponding associated device uses his or her own private key to perform a digital signature operation, encrypts the data to be signed with his or her own private key, and generates a digital signature;
[0015] The IoT data and the corresponding digital signature data are packaged and sent to the blockchain network; the associated device of the IoT data indicates the data source of the IoT data.
[0016] Further, the number of tag types in the IoT data to be stored is obtained, and if the number of tag types in the IoT data is one, the storage order determination strategy is not executed;
[0017] If there are multiple types of tags in the IoT data, the storage order determination strategy is executed, that is, the storage order of each type of IoT data is determined.
[0018] Further, the IoT data storage strategy is executed: the associated device of the IoT data to be stored is obtained, and the various types of anomalies that the associated device needs to monitor are obtained, and the correlation index between various types of IoT data and various types of anomalies is obtained, and the correlation index of various types of IoT data for each type of anomaly is calculated based on the entropy weight method;
[0019] Obtain the associated anomaly type of each type of IoT data in the IoT data to be stored, and obtain the associated index of the IoT data corresponding to each associated anomaly type; add the associated index of each type of IoT data and each associated anomaly type in the IoT data to be stored to obtain a comprehensive associated index of each type of IoT data, and perform storage operations on each type of IoT data in sequence based on the order of the comprehensive associated index from large to small.
[0020] Specifically, after determining the type of IoT data to be stored, the data size Ds of the IoT data of this type is obtained, and it is determined whether it exceeds the data block size threshold. If it exceeds the data block size threshold, the first block determination strategy is triggered; if it does not exceed the data block size threshold, the second block determination strategy is triggered;
[0021] After determining whether the first block determination strategy or the second block determination strategy is triggered, obtain several data blocks storing this type of IoT data in the current blockchain network, and obtain the minimum value Ds of the amount of data stored in these data blocks. min ;
[0022] Based on the current size of IoT data to be stored, calculate the maximum number of blocks N, expressed as: in, Indicates a round-up operation; starting from dividing the IoT data to be stored into two blocks, all the numbers of blocks to be selected that are not greater than the maximum number of blocks are obtained based on the maximum number of blocks.
[0023] Specifically, the first block determination strategy is: obtain the number of all blocks to be selected for the current IoT data to be stored; simulate and calculate the storage time St under different numbers of blocks respectively. l , the expression is: Among them, St l represents the storage time required to divide the IoT data to be stored into l blocks, where l∈{2,3,…,N}, v represents the storage rate in each data block, t represents the time required for block division, and is obtained by averaging the time required for block division based on historical data; obtain the number of blocks with the minimum storage time, and perform the corresponding number of block storage operations on the IoT data to be stored;
[0024] The second block judgment strategy is: the analysis method is the same as the first block judgment strategy, but this time, l∈{1,2,…,N}; the storage time St under different block numbers is also simulated and calculated l , and select the number of blocks with the shortest storage time for subsequent block storage operations.
[0025] Furthermore, according to the order of IoT data before block division, a pointer pointing to the next data block is generated for each data block except the last data block after storage; a hash operation is performed on each data block to generate a unique hash value for each data block;
[0026] The hash value generated for each data block is combined with the pointer to the next data block stored in each data block to form a content identifier CID; the mapping relationship between the CID of each data block and the node location where it is stored is stored in a distributed hash table DHT.
[0027] Specifically, for all original data blocks generated by the IoT data to be stored, two groups of data blocks that are completely identical to the stored data are generated as the first and second backup data blocks;
[0028] The first backup data block group is used to store the real-time backup of the data modified by the user; the second backup data block group is used to store the saved backup after the data is modified by the user.
[0029] Furthermore, a monitoring smart contract is defined in the blockchain network; after the data in the first backup data block group is sent to the corresponding user, the first monitoring event in the monitoring smart contract is started to monitor the user's operation on the data in real time, and the data in the two groups of backup data blocks are updated in real time according to the monitored user operation information, and the CID of each data block in the first backup data block group and the DHT in each data block in the first backup data block group are also updated in real time.
[0030] Furthermore, the second monitoring event in the monitoring smart contract is enabled to monitor the user's operation data on the online platform. When it is detected that the user clicks the "Save" button on the online platform, the data in the second backup data block group is updated so that the data in the second backup data block group is the same as the data in the first backup data block group; and the corresponding CID and DHT are updated;
[0031] When it is detected that the user clicks the "Close" button on the online platform, the data, CID and DHT in the original data block group are updated accordingly according to the corresponding data in the second backup data block group.
[0032] (III) Beneficial effects
[0033] The present invention provides an Internet of Things data processing method based on artificial intelligence, which has the following beneficial effects:
[0034] 1. The digital signature technology is used to ensure that the source of IoT data is traceable, safe and reliable. At the same time, the device tags and IoT data classification tags are used to achieve orderly storage and management of data, improve the pertinence and efficiency of data storage, and facilitate subsequent data processing and analysis;
[0035] 2. By dynamically deciding whether to execute the storage order determination strategy based on the number of IoT data categories, and combining the entropy weight method to calculate the correlation index of each type of IoT data for each type of anomaly, the intelligent optimization of data storage order is achieved; this not only improves the pertinence and effectiveness of data storage, but also ensures the priority of key data in anomaly monitoring and processing, providing more accurate and timely information support for subsequent data analysis and decision-making;
[0036] 3. Dynamically determine the data block method through intelligent block judgment strategy, optimize storage efficiency and reduce storage time; generate data block pointers and CIDs, and combine DHT to map storage locations, so as to achieve efficient management and fast retrieval of data blocks;
[0037] 4. By generating two sets of backup data blocks and using them for real-time backup and saved backup respectively, and combining the monitoring smart contract to monitor user operations in real time, intelligent and real-time updating and management of data are realized; it not only ensures the reliability and consistency of data, but also improves the flexibility and efficiency of data processing, allowing users to view and modify data safely and conveniently, while ensuring the integrity and traceability of the original data. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 A schematic diagram of the steps of an Internet of Things data processing method based on artificial intelligence provided by the present invention;
[0039] Figure 2 This is an implementation flow chart of confirming the block division method in step three of an artificial intelligence-based Internet of Things data processing method provided by the present invention. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] refer to Figure 1 The present invention provides an Internet of Things data processing method based on artificial intelligence, comprising:
[0042] Step 1: Determine the associated device of the IoT data to be stored based on the digital signature data, and determine the storage area of the IoT data to be stored based on the mark of the associated device; classify and mark various types of IoT data in the IoT data to be stored before storage;
[0043] The step one includes the following steps:
[0044] Step 101: Distribute and store IoT data monitored during the operation of the equipment in the blockchain network. The IoT data generated by the same type of equipment are of the same category, while the IoT data generated by different types of equipment are not completely the same. For example, IoT data monitored during the operation of CNC machine tools include various IoT data such as current, voltage, power consumption, and temperature. IoT data monitored during the operation of smart home equipment include various IoT data such as equipment power consumption, switch status, and frequency of use. Uniquely mark each type of equipment stored in the blockchain network, and also uniquely mark each type of IoT data in the same type of equipment.
[0045] The IoT data monitored during the operation of various types of equipment are used by the managers or users of the corresponding equipment, that is, only the managers or users of the corresponding equipment have the authority to view or modify them; in the blockchain network, whenever a data storage request for IoT data of a new type of equipment appears, an RSA encryption operation is performed on the device of this type to generate a pair of public and private keys, and the public key is made public, and the private key is sent to the managers or users of this type of equipment; the private key data of all devices are stored in the private key management library;
[0046] When IoT data is ready to be stored in the blockchain network, the manager or user of the corresponding associated device will use his or her own private key to perform a digital signature operation, encrypt the data to be signed with his or her own private key, and generate a digital signature. The digital signature is used to determine the source device of the IoT data; the IoT data and the corresponding digital signature data are uniformly packaged and sent to the blockchain network; the associated device of the IoT data indicates the data source of the IoT data, such as the associated devices of the current, voltage, power consumption, temperature and other data of the above-mentioned CNC machine tool equipment are all CNC machine tool equipment;
[0047] Step 102: After the blockchain network receives the IoT data to be stored and the corresponding digital signature data, the private key data in the digital signature data is compared with the private key data stored in the private key management library to identify the corresponding management or user personnel, and then identify the associated device of the IoT data to be stored, and determine the storage area to be stored for the IoT data to be stored based on the mark of the associated device;
[0048] Step 103: The management personnel or the user marks various types of IoT data in the IoT data to be stored during storage, and the marks are the same as those of the various types of IoT data in step 101, that is, the IoT data to be stored are classified.
[0049] When using, combine the contents in steps 101 to 103:
[0050] Digital signature technology is used to ensure that the source of IoT data is traceable, safe and reliable. At the same time, device tags and IoT data classification tags are used to achieve orderly storage and management of data, improve the pertinence and efficiency of data storage, and provide convenience for subsequent data processing and analysis.
[0051] Step 2: based on the number of data categories in the IoT data to be stored, determine whether to execute the storage order determination strategy; when determining to execute the storage order determination strategy, calculate the correlation index of each type of IoT data for each type of anomaly, and determine the storage order of each type of IoT data based on the comprehensive correlation index;
[0052] The step 2 includes the following steps:
[0053] Step 201: after determining the storage area for the IoT data to be stored, judging whether to execute the storage order determination strategy based on the number of data categories in the IoT data to be stored;
[0054] Obtain the number of tag types in the IoT data to be stored. If the number of tag types in the IoT data is one, the storage order determination strategy is not executed; if the number of tag types in the IoT data is multiple, the storage order determination strategy is executed, that is, the storage order of various IoT data is determined;
[0055] Execute IoT data storage strategy: obtain the associated devices for IoT data to be stored, obtain the various types of anomalies that the associated devices need to monitor, and obtain the correlation index between various types of IoT data and various types of anomalies. Specifically, the weight of various types of IoT data for each type of anomaly is calculated based on the entropy weight method, that is, the correlation index, which includes:
[0056] Step 2011: Combine the feature vectors of various anomalies. Different anomalies have different associated feature data. Specifically, obtain the associated feature data of various anomalies by consulting the data; obtain the historical associated feature data records from the blockchain network and combine them to form a feature matrix for each type of anomaly. in, represents the value of the first type of associated feature data in the first group of historical data, n represents the total number of abnormal associated feature data, and m represents the total number of historical data obtained;
[0057] Step 2012: normalize the feature matrix to obtain a standardized feature matrix, which is expressed as:
[0058]
[0059] in, represents the value of the standardized associated feature data of the i-th category in the j-th group of historical data, and in, represents the minimum value of the historical data selected by the i-th type of associated feature data, Represents the maximum value of the historical data selected by the i-th type of associated feature data;
[0060] Step 213: Calculate the value of each type of associated feature data in each group of historical data and the proportion of the sum of the values of the corresponding associated feature data in all historical data. The expression is:
[0061] Step 2014: Calculate the information entropy E of each associated feature data i , the expression is:
[0062] Step 2015: Information entropy E of all associated feature data i Combine and calculate the weight δ of each associated feature data one by one i , the expression is:
[0063] Step 202: Obtain the associated exception type of each type of IoT data in the IoT data to be stored, and obtain the associated index of the IoT data corresponding to each associated exception type; add the associated index of each type of IoT data in the IoT data to be stored and each associated exception type to obtain a comprehensive associated index of each type of IoT data, and perform storage operations on each type of IoT data in sequence based on the order of the comprehensive associated index from large to small.
[0064] When using, combine the contents in steps 201 to 202:
[0065] By dynamically deciding whether to execute the storage order determination strategy based on the number of IoT data categories, and combining the entropy weight method to calculate the correlation index of each type of IoT data for each type of anomaly, intelligent optimization of the data storage order is achieved. This not only improves the pertinence and effectiveness of data storage, but also ensures the priority of key data in anomaly monitoring and processing, providing more accurate and timely information support for subsequent data analysis and decision-making.
[0066] Step 3: Trigger the first block determination strategy or the second block determination strategy based on the data size of each type of IoT data; the first block determination strategy and the second block determination strategy calculate the storage time required under different block determination methods and determine the block determination method based on the storage time; after the block storage operation, generate each data block pointer and CID, and update the DHT;
[0067] refer to Figure 2 , the step three includes the following steps:
[0068] Step 301: The blockchain network allocates a number of data blocks to each type of IoT data, and the size of each data block is not fixed but does not exceed a preset data block size threshold;
[0069] The same type of IoT data to be stored from different times is stored in different data blocks. The same type of IoT data to be stored from different times may be stored in different data blocks, which is determined based on the size of each type of IoT data and the length of storage time.
[0070] After determining the type of IoT data to be stored, the data size Ds of the IoT data of this type is obtained based on the data analysis tool to determine whether it exceeds the data block size threshold. If it exceeds the data block size threshold, the first block judgment strategy is triggered; if it does not exceed the data block size threshold, the second block judgment strategy is triggered; after determining whether the first block judgment strategy or the second block judgment strategy is triggered, a number of data blocks storing the IoT data of this type in the current blockchain network are obtained, and the minimum value Ds of the amount of data stored in these data blocks is obtained. min ; Based on the current size of IoT data to be stored, calculate the maximum number of blocks N, the expression is: in, Indicates a round-up operation; starting from dividing the IoT data to be stored into two blocks, all the numbers of blocks to be selected that are not greater than the maximum number of blocks are obtained based on the maximum number of blocks. For example, if the maximum number of blocks is calculated to be 5, the numbers of blocks to be selected are 2, 3, 4, and 5;
[0071] The first block determination strategy is specifically as follows: obtaining the number of all blocks to be selected for the current IoT data to be stored; simulating and calculating the storage time St under different numbers of blocks respectively. l , the expression is: Among them, St l represents the storage time required to divide the IoT data to be stored into l blocks, and l∈{2,3,…,N}, v represents the storage rate in each data block, and the storage rate of all data blocks storing the same type of IoT data is the same, t represents the time required for block division, and is obtained by averaging the time required for block division based on the historical data;
[0072] Obtain the number of blocks with the minimum storage time, and perform a corresponding number of block storage operations on the IoT data to be stored;
[0073] The analysis method of the second block determination strategy is the same as that of the first block determination strategy, but the value of l in the second block determination strategy has changed. At this time, l∈{1,2,…,N}; the storage time St under different block numbers is also simulated and calculated. l , and select the number of blocks with the shortest storage time for subsequent block storage operations;
[0074] Step 302: Generate a pointer to the next data block for each data block except the last data block after storage in the order before the IoT data is divided into blocks, and generate a pointer to the first data block currently generated for the last data block of the same type of IoT data in the blockchain network before storage; these pointers to the same type of data blocks are connected in order to form a directed acyclic graph;
[0075] For the currently generated data blocks, the block storage engine in the blockchain network will perform hash operations based on the SHA2-256 algorithm to generate a unique hash value for each data block. The hash value of each data block is generated based on the content of each data block. If the data in the data block changes, the corresponding hash value will also change.
[0076] Step 303: The blockchain network combines the hash value generated by each data block with the pointer to the next data block stored in each data block to form a new string, namely, CID; CID represents the content identifier of each data block;
[0077] Each data block is stored on a different node in the blockchain network. The mapping relationship between the CID of each data block and the node location where it is stored is stored is stored in a distributed hash table, namely DHT. By using CID as a keyword and then querying the node of the corresponding data block in DHT, the storage location of the data block can be obtained.
[0078] The RSA public key held by the manager or user of the associated device of the IoT data stored in the data block is stored in the CID of each data block to achieve access control to the data. Only users holding the corresponding private key can decrypt, access, modify or delete the data; the user refers to the manager or user of each device.
[0079] When using, combine the contents in steps 301 to 303:
[0080] The data partitioning method is dynamically determined through intelligent partitioning judgment strategy, which optimizes storage efficiency and reduces storage time. By generating data block pointers and CIDs and combining DHT for storage location mapping, efficient management and fast retrieval of data blocks are achieved.
[0081] Step 4: Generate the first and second backup data block groups respectively, which are used to store the real-time backup and the saved backup of the original data block respectively; when the user reads the data, based on the first and second monitoring events in the monitoring smart contract, update the first and second backup data block groups and the original data block group respectively;
[0082] The step 4 includes the following steps:
[0083] Step 401: for all original data blocks generated by the IoT data to be stored, two groups of data blocks that are completely identical to the stored data are generated as backup data blocks; and the two groups of data blocks are also stored in a first backup data block storage area and a second backup data block storage area respectively;
[0084] Generate the CID of each backup data block and update the DHT of the two backup data block groups;
[0085] The first backup data block storage area is used to store a first backup data block group, and the first backup data block group is used to store a real-time backup of data modified by a user;
[0086] The second backup data block storage area is used to store a second backup data block group, and the second backup data block group is used to store a saved backup after the user modifies the data;
[0087] Step 402: After receiving the user's data reading request, obtain the user's private key, obtain the CID holding the public key corresponding to the user's private key from the DHT of the first backup data block group, and query the node location of the data blocks corresponding to these CIDs in the blockchain network;
[0088] According to the pointer information in each data block CID, each data block is connected in the order pointed by the pointer to form a complete data hash value; according to the complete data hash value and the pointer data, the obtained data blocks are sorted in order and restored to the original data, and the original data at this time is the data in the first backup data block group;
[0089] Step 403: define a monitoring smart contract in the blockchain network; after sending the data in the first backup data block group to the corresponding user, start the first monitoring event in the monitoring smart contract, monitor the user's operation on the data in real time, and update the data in the two groups of backup data blocks in real time according to the monitored user operation information, and the CID of each data block in the first backup data block group and the DHT in each data block in the first backup data block group are also updated in real time;
[0090] At the same time, the second monitoring event in the monitoring smart contract is started to monitor the user's operation data on the online platform. When it is detected that the user clicks the "Save" button on the online platform, the data in the second backup data block group is updated so that the data in the second backup data block group is the same as the data in the first backup data block group; and the corresponding CID and DHT are updated;
[0091] When it is detected that the user clicks the "Close" button on the online platform, that is, closes the viewing and modification of the data, the data, CID and DHT in the original data block group are updated accordingly according to the corresponding data in the second backup data block group; during the user's modification process, only the two backup data blocks are modified, and the original data blocks are not modified, thereby realizing intelligent data update.
[0092] When used, combine the contents in steps 401 to 403:
[0093] By generating two sets of backup data blocks and using them for real-time backup and saved backup respectively, combined with monitoring smart contracts to monitor user operations in real time, intelligent and real-time updating and management of data is achieved; it not only ensures the reliability and consistency of data, but also improves the flexibility and efficiency of data processing, allowing users to view and modify data safely and conveniently, while ensuring the integrity and traceability of the original data.
[0094] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of the present invention are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer storage medium or transmitted via a computer storage medium.
[0095] Computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. Computer storage media can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media. Available media can be magnetic media (e.g., floppy disks, hard disks, tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid state drives (SSDs)).
[0096] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An Internet of Things data processing method based on artificial intelligence, characterized in that: The steps include: Determine the associated device of the IoT data to be stored based on the digital signature data, and determine the storage area of the IoT data to be stored based on the mark of the associated device; classify and mark various types of IoT data in the IoT data to be stored before storage; Based on the number of data categories in the IoT data to be stored, determining whether to execute a storage order determination strategy; When determining the execution storage order determination strategy, the correlation index of each type of IoT data for each type of anomaly is calculated, and the storage order of each type of IoT data is determined based on the comprehensive correlation index; Based on the data size of various IoT data, the first block judgment strategy or the second block judgment strategy is triggered; The first block determination strategy and the second block determination strategy calculate the storage time required under different block determination modes and determine the block determination mode based on the storage time; After the block storage operation, the pointers and CIDs of each data block are generated, and the DHT is updated; Generating a first backup data block group and a second backup data block group respectively, which are used to store a real-time backup and a saved backup of the original data block respectively; When the user reads the data, the first and second backup data block groups and the original data block group are updated respectively based on the first and second monitoring events in the monitoring smart contract.
2. The method for processing IoT data based on artificial intelligence as claimed in claim 1, characterized in that: In the blockchain network, whenever a data storage request for IoT data of a new type of device appears, an RSA encryption operation is performed on the device to generate a pair of public and private keys. The public key is made public and the private key is sent to the person who manages or uses the device. When IoT data is ready to be stored in the blockchain network, the management or user of the corresponding associated device uses his or her own private key to perform a digital signature operation, encrypts the data to be signed with his or her own private key, and generates a digital signature; The IoT data and the corresponding digital signature data are packaged and sent to the blockchain network; the associated device of the IoT data indicates the data source of the IoT data.
3. The method for processing IoT data based on artificial intelligence as claimed in claim 2, characterized in that: Obtain the number of tag types in the IoT data to be stored. If the number of tag types in the IoT data is one, the storage order determination strategy is not executed. If there are multiple types of tags in the IoT data, the storage order determination strategy is executed, that is, the storage order of each type of IoT data is determined.
4. The method for processing IoT data based on artificial intelligence as claimed in claim 3, characterized in that: Execute IoT data storage strategy: obtain the associated devices of IoT data to be stored, obtain the various types of anomalies that the associated devices need to monitor, and obtain the correlation index between various types of IoT data and various types of anomalies, and calculate the correlation index of various types of IoT data for each type of anomaly based on the entropy weight method; Obtain the associated anomaly type of each type of IoT data in the IoT data to be stored, and obtain the associated index of the IoT data corresponding to each associated anomaly type; add the associated index of each type of IoT data and each associated anomaly type in the IoT data to be stored to obtain a comprehensive associated index of each type of IoT data, and perform storage operations on each type of IoT data in sequence based on the order of the comprehensive associated index from large to small.
5. The method for processing IoT data based on artificial intelligence as claimed in claim 4, characterized in that: After determining the type of IoT data to be stored, obtain the data size Ds of the IoT data of this type, and determine whether it exceeds the data block size threshold. If it exceeds the data block size threshold, trigger the first block determination strategy; if it does not exceed the data block size threshold, trigger the second block determination strategy; After determining whether the first block determination strategy or the second block determination strategy is triggered, obtain several data blocks storing this type of IoT data in the current blockchain network, and obtain the minimum value Ds of the amount of data stored in these data blocks. min ; Based on the current size of IoT data to be stored, calculate the maximum number of blocks N, expressed as: in, Indicates rounding up operation; Starting from dividing the IoT data to be stored into two blocks, all the numbers of blocks to be selected that are not greater than the maximum number of blocks are obtained based on the maximum number of blocks.
6. The method for processing IoT data based on artificial intelligence as claimed in claim 5, characterized in that: The first block judgment strategy is: obtain the number of all blocks to be selected for the current IoT data to be stored; simulate and calculate the storage time St under different numbers of blocks respectively. l , the expression is: Among them, St l represents the storage time required to divide the IoT data to be stored into l blocks, where l∈{2,3,…,N}, v represents the storage rate in each data block, t represents the time required for block division, and is obtained by averaging the time required for block division based on historical data; obtain the number of blocks with the minimum storage time, and perform the corresponding number of block storage operations on the IoT data to be stored; The second block judgment strategy is: the analysis method is the same as the first block judgment strategy, but this time, l∈{1,2,…,N}; the storage time St under different block numbers is also simulated and calculated l , and select the number of blocks with the shortest storage time for subsequent block storage operations.
7. The method for processing IoT data based on artificial intelligence as claimed in claim 6, characterized in that: According to the order of IoT data before block division, a pointer to the next data block is generated for each data block except the last data block after storage; a hash operation is performed on each data block to generate a unique hash value for each data block; The hash value generated for each data block is combined with the pointer to the next data block stored in each data block to form a content identifier CID; The mapping relationship between the CID of each data block and the node location where it is stored is stored in a distributed hash table DHT.
8. The method for processing IoT data based on artificial intelligence as claimed in claim 1, characterized in that: For all original data blocks generated by the IoT data to be stored, two sets of data blocks that are completely identical to the stored data are generated as the first and second backup data blocks; The first backup data block group is used to store the real-time backup of the data modified by the user; the second backup data block group is used to store the saved backup after the data is modified by the user.
9. The method for processing IoT data based on artificial intelligence as claimed in claim 8, characterized in that: A monitoring smart contract is defined in the blockchain network; after the data in the first backup data block group is sent to the corresponding user, the first monitoring event in the monitoring smart contract is started to monitor the user's operation on the data in real time, and the data in the two groups of backup data blocks are updated in real time according to the monitored user operation information, and the CID of each data block in the first backup data block group and the DHT in each data block in the first backup data block group are also updated in real time.
10. The method for processing IoT data based on artificial intelligence according to claim 9, characterized in that: Start monitoring the second monitoring event in the smart contract, monitor the user's operation data on the online platform, and when it is detected that the user clicks the "Save" button on the online platform, update the data in the second backup data block group so that the data in the second backup data block group is the same as the data in the first backup data block group; and update the corresponding CID and DHT; When it is detected that the user clicks the "Close" button on the online platform, the data, CID and DHT in the original data block group are updated accordingly according to the corresponding data in the second backup data block group.