An operation method and system of an internet of things hard disk and an electronic device
By calculating the grouping coefficient of IoT hard drives and assigning them to queues, the problem of low efficiency in IoT hard drive usage is solved, achieving efficient hard drive management and data security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG DAHUA TECH CO LTD
- Filing Date
- 2023-02-07
- Publication Date
- 2026-04-28
AI Technical Summary
In the use of IoT hard drives, the lack of effective management leads to the need to check whether each hard drive meets the requirements of the business request, which reduces the efficiency of hard drive use.
By acquiring the physical state parameters of IoT hard drives, calculating grouping coefficients, and dividing the hard drives into corresponding queues, the target hard drive can be operated according to business requests, avoiding the need to search for target hard drives one by one.
It improves the efficiency of IoT hard drives, ensures data security and reliability, avoids data loss, and enhances the security and reliability of hard drives.
Smart Images

Figure CN116149556B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of distributed object storage technology, and in particular to an operating method, system and electronic device for an Internet of Things (IoT) hard drive. Background Technology
[0002] With the continuous development of social datafication, data is becoming increasingly important, and the volume of data is also increasing, especially in the video security industry, where data volume is experiencing explosive growth. As traditional local storage can no longer meet the storage needs of the ever-increasing data volume, distributed object storage with unlimited storage capacity has emerged and has been widely used in industries such as video security.
[0003] In distributed object storage, since the input and output of data ultimately reside on the hard drives inserted into the data nodes, the reliability and security of the hard drives determine the overall performance of the distributed object storage.
[0004] Currently, distributed object storage primarily utilizes Internet of Things (IoT) hard drives. Compared to traditional mechanical hard drives, IoT hard drives significantly increase single-disk capacity through Shingled Magnetic Recording (SMR) technology. Furthermore, the use of a special inert gas sealing technology enhances their security and allows them to better withstand harsh operating environments, thus improving their reliability. Therefore, based on their enhanced security and reliability, IoT hard drives play a crucial role in industries such as video security.
[0005] However, during the use of IoT hard drives, due to the lack of management of IoT hard drives, when a business request arrives, it is necessary to check whether each IoT hard drive meets the requirements of the business request. After finding the target IoT hard drive that meets the requirements of the business request, the operation is performed on the target IoT hard drive according to the operation indicated in the business request information, which reduces the efficiency of IoT hard drive usage. Summary of the Invention
[0006] This application provides an operation method, system, and electronic device for IoT hard drives, to solve the problem of low efficiency caused by searching for a target IoT hard drive one by one among different IoT hard drives. The specific implementation scheme is as follows:
[0007] Firstly, this application provides a method for operating an IoT hard drive, the method comprising:
[0008] Obtain the physical state parameters of each IoT hard drive in the first IoT hard drive set, wherein each IoT hard drive in the first IoT hard drive set is an IoT hard drive that is allowed to be accessed;
[0009] Based on the physical state parameters of each IoT hard drive in the first IoT hard drive set, calculate the grouping coefficient corresponding to each IoT hard drive.
[0010] Based on the grouping coefficient corresponding to each IoT hard drive, each IoT hard drive is divided into a queue corresponding to the grouping coefficient to obtain a second set of IoT hard drives;
[0011] Operate the target IoT hard drive in the second IoT hard drive set according to the operation indicated in the business request information.
[0012] By calculating the grouping coefficient for each IoT hard drive in the first set of IoT hard drives that are allowed to access, and then grouping the IoT hard drives according to the grouping coefficient, each IoT hard drive is assigned to the queue corresponding to the grouping coefficient to obtain the second set of IoT hard drives. Finally, according to the operation indicated in the business request information, the target IoT hard drive in the second set of IoT hard drives is operated, avoiding the need to search for the target IoT hard drive one by one in the first set of IoT hard drives, thereby improving the utilization efficiency of IoT hard drives.
[0013] In one possible implementation, before obtaining the individual physical state parameters of each IoT hard drive in the first IoT hard drive set, the method further includes:
[0014] Obtain the original set of IoT hard drives;
[0015] For each IoT hard drive in the original set of IoT hard drives, the following judgment operation is performed:
[0016] Retrieve the key file from the IoT hard drive;
[0017] Determine whether the key file passes verification;
[0018] If not, the IoT hard drive access will be rejected;
[0019] If so, allow the IoT hard drive to access and add the IoT hard drive to the first IoT hard drive set.
[0020] By verifying the key file in the IoT hard drive, it is confirmed whether the IoT hard drive is allowed to access, thus ensuring data security.
[0021] In one possible implementation, obtaining the key file from the IoT hard drive includes:
[0022] In response to the IoT hard drive being authorized, determine whether a key file exists in the IoT hard drive;
[0023] If not, allow the IoT hard drive to access and add the IoT hard drive to the first IoT hard drive set;
[0024] If so, retrieve the key file from the IoT hard drive.
[0025] By determining whether a key file exists in the IoT hard drive, it can be confirmed whether the IoT hard drive has been used in the target cluster, further enhancing data security.
[0026] In one possible implementation, before determining whether a key file exists in the IoT hard drive, the method further includes:
[0027] Obtain the device serial number of the IoT hard drive;
[0028] Check the authorization relationship table to see if the device serial number exists;
[0029] If not, confirm that the IoT hard drive is unauthorized, and refuse access to the IoT hard drive;
[0030] If so, confirm that the IoT hard drive has been authorized.
[0031] By matching the device serial number of the IoT hard drive in the authorization relationship table, it is confirmed whether the IoT hard drive has been authorized. This ensures that the IoT hard drive cannot be accessed without authorization, thereby improving data security.
[0032] In one possible implementation, prior to acquiring the original IoT hard drive set, the method further includes:
[0033] Obtain the device serial number corresponding to each IoT hard drive in the original IoT hard drive set that meets the first preset condition;
[0034] Based on the device serial number corresponding to each IoT hard drive that meets the first preset condition, generate the key information of the IoT hard drive corresponding to the device serial number.
[0035] Save the key information corresponding to each IoT hard drive that meets the first preset condition.
[0036] The device serial number of the IoT hard drive is used to generate the key information of the IoT hard drive, which ensures that the key information can be used to determine whether the IoT hard drive has passed the verification, thus further improving the security of the data.
[0037] In one possible implementation, after operating the target IoT hard drive in the second IoT hard drive set according to the operation indicated in the information of the business request, the method further includes:
[0038] In response to the insertion of a non-IoT hard drive and any IoT hard drive from the second set of IoT hard drives into the data node;
[0039] When the non-IoT hard drive contains corrupted data, determine whether any IoT hard drive in the second IoT hard drive set contains corrupted data.
[0040] If not, recover the damaged data from the non-IoT hard drive;
[0041] If so, prioritize recovering the damaged data from any of the IoT hard drives in the second set of IoT hard drives.
[0042] By using the above method, when both non-IoT hard drives and IoT hard drives are inserted into the data nodes, the damaged data in the IoT hard drives is recovered first, thus ensuring the reliability of the data in the IoT hard drives.
[0043] In one possible implementation, after operating the target IoT hard drive in the second IoT hard drive set according to the operation indicated in the information of the business request, the method further includes:
[0044] From the second set of IoT hard drives, obtain all IoT hard drives located in a designated queue, wherein the designated queue is a queue indicating that IoT hard drives have anomalies;
[0045] Repair all IoT hard drives in the specified queue to obtain a third set of IoT hard drives;
[0046] If the performance index of any IoT hard drive in the third IoT hard drive set meets the second preset condition, calculate the grouping coefficient of the IoT hard drive and assign the IoT hard drive to the queue corresponding to the grouping coefficient.
[0047] Based on the grouped IoT hard drives, in the designated queue indicating that an IoT hard drive has an anomaly, the abnormal IoT hard drive can be directly repaired, avoiding data loss in the IoT hard drive and further improving the security and reliability of the IoT hard drive. At the same time, it avoids selecting the abnormal IoT hard drive for operation when a business request arrives, further improving the utilization efficiency of the IoT hard drive.
[0048] Secondly, this application also provides an operating system for an Internet of Things (IoT) hard drive, the system comprising:
[0049] The acquisition module is used to acquire the physical state parameters of each IoT hard drive in the first IoT hard drive set, wherein each IoT hard drive in the first IoT hard drive set is an IoT hard drive that is allowed to be accessed.
[0050] The calculation module is used to calculate the grouping coefficient corresponding to each IoT hard drive based on the physical state parameters of each IoT hard drive in the first IoT hard drive set.
[0051] The grouping module is used to divide each IoT hard drive into a queue corresponding to the grouping coefficient according to the grouping coefficient of each IoT hard drive, so as to obtain a second IoT hard drive set.
[0052] The processing module is used to operate the target IoT hard drive in the second IoT hard drive set according to the operation indicated in the information of the business request.
[0053] In one possible implementation, the acquisition module is specifically used to acquire the original set of IoT hard drives;
[0054] For each IoT hard drive in the original set of IoT hard drives, the following judgment operation is performed:
[0055] Retrieve the key file from the IoT hard drive;
[0056] Determine whether the key file passes verification;
[0057] If not, the IoT hard drive access will be rejected;
[0058] If so, allow the IoT hard drive to access and add the IoT hard drive to the first IoT hard drive set.
[0059] In one possible implementation, the acquisition module is specifically used to determine whether a key file exists in the IoT hard drive in response to the IoT hard drive being authorized;
[0060] If not, allow the IoT hard drive to access and add the IoT hard drive to the first IoT hard drive set;
[0061] If so, retrieve the key file from the IoT hard drive.
[0062] In one possible implementation, the acquisition module is specifically used to acquire the device serial number of the IoT hard drive;
[0063] Check the authorization relationship table to see if the device serial number exists;
[0064] If not, confirm that the IoT hard drive is unauthorized, and refuse access to the IoT hard drive;
[0065] If so, confirm that the IoT hard drive has been authorized.
[0066] In one possible implementation, the acquisition module is specifically used to acquire the device serial number corresponding to each IoT hard drive in the original IoT hard drive set that meets the first preset condition;
[0067] Based on the device serial number corresponding to each IoT hard drive that meets the first preset condition, generate the key information of the IoT hard drive corresponding to the device serial number.
[0068] Save the key information corresponding to each IoT hard drive that meets the first preset condition.
[0069] In one possible implementation, the processing module is specifically configured to respond to the insertion of a non-IoT hard drive and any IoT hard drive from the second set of IoT hard drives into the data node;
[0070] When the non-IoT hard drive contains corrupted data, determine whether any IoT hard drive in the second IoT hard drive set contains corrupted data.
[0071] If not, recover the damaged data from the non-IoT hard drive;
[0072] If so, prioritize recovering the damaged data from any of the IoT hard drives in the second set of IoT hard drives.
[0073] In one possible implementation, the processing module is specifically configured to obtain all IoT hard drives located in a designated queue from the second IoT hard drive set, wherein the designated queue is a queue indicating that there are abnormalities in the IoT hard drives;
[0074] Repair all IoT hard drives in the specified queue to obtain a third set of IoT hard drives;
[0075] If the performance index of any IoT hard drive in the third IoT hard drive set meets the second preset condition, calculate the grouping coefficient of the IoT hard drive and assign the IoT hard drive to the queue corresponding to the grouping coefficient.
[0076] Thirdly, this application provides an electronic device, comprising:
[0077] Memory, used to store computer programs;
[0078] When the processor executes the computer program stored in the memory, it implements the above-described operation method steps of an IoT hard drive.
[0079] Fourthly, this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the above-described operation method steps of an IoT hard drive.
[0080] For the various aspects of the second to fourth aspects mentioned above, and the technical effects that each aspect may achieve, please refer to the above description of the technical effects that can be achieved for the first aspect or the various possible solutions in the first aspect, which will not be repeated here. Attached Figure Description
[0081] Figure 1 A flowchart of an operation method for an IoT hard drive provided in this application;
[0082] Figure 2 A schematic diagram illustrating the processing steps of an IoT hard drive operation method provided in this application;
[0083] Figure 3 A schematic diagram of an operating system for an IoT hard drive provided in this application;
[0084] Figure 4 A schematic diagram of an electronic device provided in this application. Detailed Implementation
[0085] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The specific operational methods in the method embodiments can also be applied to the device embodiments or system embodiments. It should be noted that in the description of this application, "multiple" is understood as "at least two". "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. A connected to B can represent: A and B directly connected, and A and B connected through C. Furthermore, in the description of this application, terms such as "first" and "second" are used only for distinguishing the purpose of description and should not be construed as indicating or implying relative importance or order.
[0086] The embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0087] Currently, distributed object storage mainly uses IoT hard drives. However, due to the lack of management of IoT hard drives, when a business request arrives, it is necessary to check whether each IoT hard drive meets the requirements of the business request. After finding the target IoT hard drive that meets the requirements of the business request, the operation is performed according to the instructions in the business request information, which reduces the efficiency of IoT hard drive utilization.
[0088] Therefore, this application proposes an operation method for IoT hard drives. By calculating the grouping coefficients for each IoT hard drive in the first set of allowed IoT hard drives based on its physical state parameters, the IoT hard drives are grouped according to the grouping coefficients, and each IoT hard drive is assigned to a queue corresponding to the grouping coefficient to obtain a second set of IoT hard drives. Finally, the target IoT hard drive in the second set of IoT hard drives is operated according to the operation indicated in the service request information. This avoids searching for the target IoT hard drive one by one in the first set of IoT hard drives, thereby improving the utilization efficiency of IoT hard drives.
[0089] Reference Figure 1 The diagram shown is a flowchart of an operation method for an IoT hard drive provided in an embodiment of this application. The method includes:
[0090] S1, Obtain the physical state parameters of each IoT hard drive in the first IoT hard drive set;
[0091] Before obtaining the physical state parameters of each IoT hard drive in the first IoT hard drive set, it is necessary to determine which specific IoT hard drives are in the first IoT hard drive set.
[0092] Specifically, first, the original set of IoT disks is obtained, and then for each IoT disk in the original set of IoT disks, the following judgment operation is performed:
[0093] First, obtain the device serial number of the IOT hard drive.
[0094] It should be noted that, in this embodiment of the application, the device serial number of the IoT hard drive can be obtained by inserting a data node into the IoT hard drive; then the device serial number of the IoT hard drive uploaded by the data node is received; and the device serial number of the IoT hard drive is obtained only after parsing the device serial number of the IoT hard drive through the protocol.
[0095] Further, check if the device serial number exists in the authorization relationship table.
[0096] It should be noted that, in this embodiment, the authorization relationship table is stored in the authorization management system. This authorization management system generates an authorization file using information such as the device serial number of the imported IoT hard drive.
[0097] If the device serial number does not exist in the authorization relationship table, it is confirmed that the IoT hard drive is not authorized, and the access of the IoT hard drive is rejected; if the device serial number exists in the authorization relationship table, it is confirmed that the IoT hard drive is authorized.
[0098] By matching the device serial number of the IOT hard drive in the authorization relationship table, the authorization status of the IOT hard drive is confirmed, thus preventing unauthorized access to the IOT hard drive and improving data security.
[0099] After confirming that the IOT hard drive has been authorized, determine whether a key file exists on the IOT hard drive.
[0100] Since a key file is generated on an IOT disk when it is used in the target cluster, determining whether a key file exists on the IOT disk is equivalent to determining whether the IOT disk has never been used in the target cluster.
[0101] If the IOT disk does not contain a key file, meaning that the IOT disk has never been used in the target cluster, then the remaining capacity of the IOT disk is considered to be full, the IOT disk is directly allowed to connect, the current remaining capacity of the IOT disk is reported, and the IOT disk is added to the first IOT disk set; if the IOT disk contains a key file, then the key file in the IOT disk is retrieved.
[0102] By using the above method, based on the determination of whether the key file exists in the IOT hard drive, it is confirmed whether the IOT hard drive has been used in the target cluster, further improving data security.
[0103] After obtaining the key file from the IoT hard drive, determine whether the key file passes verification.
[0104] It should be noted that, in this embodiment of the application, when determining whether the key file passes the verification, the first step is to receive the key file uploaded by the data node, and then match the key information of the device serial number in the key file with the key information of the corresponding device serial number in the authorization relationship table, thereby realizing the verification of the key file.
[0105] If the key file fails verification, it means that the IOT hard drive does not belong to the target cluster, and the access of the IOT hard drive is rejected; if the key file passes verification, the access of the IOT hard drive is allowed, the remaining capacity of the IOT hard drive is reported, and the IOT hard drive is added to the first IOT hard drive set.
[0106] It should be noted that, in this embodiment of the application, for the IoT hard disk that has been connected, the key information in the key file will be updated periodically, and the updated key file will be saved in the corresponding IoT hard disk through the data node, thereby preventing the key information in the key file from being stolen and further improving data security.
[0107] By verifying the key file in the IoT hard drive using the above method, the access permission of the IoT hard drive is confirmed, thus ensuring data security.
[0108] Finally, after each IoT hard drive in the original IoT hard drive set has completed the above judgment operation, the first IoT hard drive set can be obtained. At this time, each IoT hard drive in the first IoT hard drive set is an IoT hard drive that can be connected.
[0109] In one possible approach, before obtaining the original set of IoT hard drives, it is also necessary to obtain the device serial number corresponding to each IoT hard drive in the original set of IoT hard drives that meets the first preset condition; then, based on the device serial number corresponding to each IoT hard drive that meets the first preset condition, the key information of the IoT hard drive corresponding to the device serial number is generated.
[0110] It should be noted that, in this embodiment of the application, meeting the first preset condition means that the IOT hard disk needs to be added to the target cluster.
[0111] After generating the key information of the IOT hard drive corresponding to the device serial number, the key information corresponding to each IOT hard drive that meets the first preset condition is stored in the authorization relationship table.
[0112] Using the above method, the key information of the IoT hard drive is generated based on the device serial number of the IoT hard drive, ensuring that the key information can be used to determine whether the IoT hard drive has passed verification, thus further improving data security.
[0113] At this point, obtain the physical state parameters of each IOT hard drive in the first IOT hard drive set.
[0114] It should be noted that, in this embodiment of the application, when obtaining the physical state parameters of each IOT hard disk in the first IOT hard disk set, the physical state parameters of each IOT hard disk in the first IOT hard disk set are collected multiple times based on a preset period. This avoids misjudgment of the physical state of the IOT hard disk, improves the accuracy of IOT hard disk state monitoring, and thus improves the overall performance of the distributed object storage.
[0115] S2, based on the physical state parameters of each IoT hard drive in the first IoT hard drive set, calculate the grouping coefficient corresponding to each IoT hard drive respectively;
[0116] Specifically, the following calculation operations are performed for each IoT disk in the first set of IoT disks:
[0117] Calculate the average value of each physical state parameter based on the various physical state parameters of the IoT hard drive.
[0118] It should be noted that, in this embodiment of the application, the average value of each physical state parameter is calculated by using a sliding time window.
[0119] Furthermore, based on the average value of each physical state parameter of the IoT hard drive, the grouping coefficient corresponding to the IoT hard drive is calculated.
[0120] For example, the physical state parameters of the acquired IoT hard drive are the number of start-stop cycles, cumulative power-on time, and impact error rate. These three physical state parameters are acquired once every hour within 4 hours to obtain the number of start-stop cycles a1, a2, a3, a4, cumulative power-on time b1, b2, b3, b4, and impact error rate c1, c2, c3, c4. Thus, the average number of start-stop cycles is a = (a1 + a2 + a3 + a4) / 4, the average cumulative power-on time is b = (b1 + b2 + b3 + b4) / 4, and the average impact error rate is c = (c1 + c2 + c3 + c4) / 4.
[0121] Then, based on the average number of start-stop cycles, the average cumulative power-on time, and the average impact error rate, the grouping coefficient is calculated. The specific formula for calculating the grouping coefficient is as follows:
[0122] w i =p1*a+p2*b+p3*c
[0123] p1 + p2 + p3 = 1
[0124] Among them, w i This represents the grouping coefficients of the IoT hard drive at time i. p1 represents the weighting coefficient for the number of start-stop cycles, p2 represents the weighting coefficient for the cumulative power-on time, and p3 represents the weighting coefficient for the impact error rate. These p1, p2, and p3 are set according to the characteristics of the IoT hard drive.
[0125] After each IOT disk in the first IOT disk set has completed the above calculation operations, the grouping coefficient corresponding to each IOT disk in the first IOT disk set can be obtained.
[0126] S3, according to the grouping coefficient corresponding to each IoT hard drive, divide each IoT hard drive into the queue corresponding to the grouping coefficient to obtain the second IoT hard drive set;
[0127] After obtaining the grouping coefficient corresponding to each IOT hard drive, each IOT hard drive is divided into the queue corresponding to the grouping coefficient according to the grouping coefficient, and the second IOT hard drive set can be obtained.
[0128] Specifically, the range of the grouping coefficient for each queue is first determined. For example, there are currently four queues: the prohibited queue, the 50% probability queue, the 75% probability queue, and the normal queue. The range of the grouping coefficient for the prohibited queue is from the first preset threshold to the second preset threshold, the range of the grouping coefficient for the 50% probability queue is from the second preset threshold to the third preset threshold, the range of the grouping coefficient for the 75% probability queue is from the third preset threshold to the fourth preset threshold, and the range of the grouping coefficient for the normal queue is from the fourth preset threshold to the fifth preset threshold.
[0129] Then, determine which threshold range the grouping coefficient falls within, and then assign the corresponding IOT hard drive to the corresponding queue.
[0130] For example, the grouping coefficient for the IoT hard drive is calculated to be 98. Currently, there are three queues: a prohibited queue, a 50% probability queue, a 75% probability queue, and a normal queue. The threshold range for the prohibited queue is [0, 40), the threshold range for the 50% probability queue is [40, 60), the threshold range for the 75% probability queue is [60, 90), and the threshold range for the normal queue is [90, 100]. Therefore, the grouping coefficient for the IoT hard drive falls within the range of [90, 100), and the IoT hard drive is thus assigned to the normal queue.
[0131] S4, according to the operation indicated in the business request information, operate the target IoT hard drive in the second IoT hard drive set;
[0132] After obtaining the second set of IoT hard disks, the business request is obtained, and the target IoT hard disk is identified in the second set of IoT hard disks according to the business request; then, the target IoT hard disk is operated according to the operation indicated in the information of the business request.
[0133] For example, if a business request to store the first data block of movie A is received, the target IOT hard drive is determined directly in the normal queue of the second IOT hard drive set, and then the first data block of movie A is stored in the target IOT hard drive according to the storage operation indicated in the business request information.
[0134] In this embodiment of the application, since network or hardware failures may occur in distributed object storage, resulting in data corruption on the hard drive, when the corrupted data meets the recovery conditions of erasure coding (EC) contained in the distributed object storage, a recovery task will be triggered to ensure the safety and reliability of the data.
[0135] It should be noted that EC is a data protection method. In distributed object storage, when writing data to IoT disks, the data is first divided into N data blocks, and M check blocks are obtained through the EC encoding algorithm, where N and M are both integers greater than zero; then the N data blocks and M check blocks are stored in N+M IoT disks respectively.
[0136] In EC, data can be restored from any N data blocks and M parity blocks. In other words, if any M data blocks are corrupted, the data can still be restored from the remaining data blocks or parity blocks, so that the data is not actually corrupted, thus improving the fault tolerance and reliability of IoT hard drives in distributed object storage.
[0137] Therefore, in this embodiment of the application, the recovery condition for EC is that the total number of data blocks of the currently damaged data is not greater than M.
[0138] Furthermore, after operating the target IOT hard drive according to the operation indicated in the information of the business request, it responds by inserting a non-IOT hard drive and any IOT hard drive from the set of IOT hard drives into the data node.
[0139] When corrupted data exists on a non-IoT hard drive, first determine whether corrupted data exists on any IoT hard drive in the second IoT hard drive set; if no corrupted data exists on any IoT hard drive in the second IoT hard drive set, then recover the corrupted data on the non-IoT hard drive; if corrupted data exists on any IoT hard drive in the second IoT hard drive set, then prioritize recovering any IoT hard drive in the second IoT hard drive set.
[0140] By using the above method, when both non-IoT hard drives and IoT hard drives are inserted into the data nodes, the damaged data in the IoT hard drives is recovered first, thus ensuring the reliability of the data in the IoT hard drives.
[0141] Furthermore, since IoT hard drives can prioritize the recovery of damaged data, their reliability is higher than that of non-IoT hard drives. Therefore, specific data can be backed up to IoT hard drives.
[0142] Specifically, the process begins by receiving a backup task; then, the backup task is sent to the data node; once the data node receives the backup task, it prioritizes using an IOT hard drive to store the backup data.
[0143] In one possible implementation, after operating the target IoT hard drive according to the operation indicated in the business request information, all IoT hard drives located in a specified queue can be obtained from the second set of IoT hard drives. The specified queue indicates a queue where there are abnormal IoT hard drives, such as a prohibited selection queue.
[0144] Then, repair all IOT hard drives in the specified queue to obtain the third IOT hard drive set; then determine whether the performance indicators corresponding to any IOT hard drive in the third IOT hard drive set meet the second preset condition.
[0145] It should be noted that, in this embodiment of the application, meeting the second preset condition means that the specific value of the performance index corresponding to the IoT hard drive is within a specified range.
[0146] If the performance indicators of any IoT hard drive in the third set of IoT hard drives do not meet the second preset conditions, then continue to repair that IoT hard drive.
[0147] If the performance index of any IoT hard drive in the third IoT hard drive set meets the second preset condition, then obtain the current physical state parameters of that IoT hard drive, calculate the average value of each physical state parameter, calculate the grouping coefficient of that IoT hard drive based on the average value of each physical state parameter, and finally divide that IoT hard drive into the queue corresponding to the grouping coefficient according to the grouping coefficient.
[0148] Using the above method, based on the grouped IOT disks, the abnormal IOT disks can be directly repaired in the designated queue indicating that the IOT disks are abnormal, thus avoiding data loss in the IOT disks and further improving the security and reliability of the IOT disks. At the same time, it avoids selecting abnormal IOT disks for operation when business requests arrive, thus further improving the utilization efficiency of the IOT disks.
[0149] In summary, the IoT hard drive operation method proposed in this application calculates the grouping coefficient for each IoT hard drive in the first set of allowed access based on its various physical state parameters. Then, based on these grouping coefficients, the IoT hard drives are grouped, and each IoT hard drive is assigned to a queue corresponding to its grouping coefficient, resulting in a second set of IoT hard drives. Finally, the target IoT hard drive in the second set is operated according to the operation indicated in the service request information. This method avoids searching for the target IoT hard drive one by one in the first set, thereby improving the utilization efficiency of the IoT hard drives.
[0150] On the one hand, based on the grouped IOT disks, the IOT disks with abnormalities can be directly repaired in the designated queue indicating that the IOT disks are abnormal, thus avoiding the loss of data in the IOT disks and further improving the security and reliability of the IOT disks; on the other hand, it avoids selecting the abnormal IOT disks for operation when business requests arrive, thus further improving the utilization efficiency of the IOT disks.
[0151] On the other hand, based on the grouped IOT hard drives, when hard drives are mixed in data nodes, the damaged data in the IOT hard drives is recovered first, ensuring the reliability and security of the data in the IOT hard drives.
[0152] Furthermore, the authorization and key management based on the IoT hard drive ensures that the IoT hard drive cannot be accessed if it is not authorized or if the key file of the IoT hard drive fails verification, thereby improving data security.
[0153] The technical solution of this application will be further explained below with reference to a specific application process.
[0154] like Figure 2 The diagram shows the process of operating an IoT hard drive. First, each IoT hard drive that needs to be added to the target cluster is inserted into the data node. Then, the data node uploads the device serial number corresponding to each IoT hard drive to the authorization module.
[0155] In the authorization module, for each IoT hard drive in each IoT hard drive, it is necessary to check whether the corresponding device serial number of the IoT hard drive exists in the authorization relationship table. If the device serial number of the IoT hard drive does not exist in the authorization relationship table, it means that the IoT hard drive is not authorized; if the device serial number of the IoT hard drive exists in the authorization relationship table, it means that the IoT hard drive is authorized. Then, the authorized IoT hard drives are transferred to the key module, and the unauthorized IoT hard drives are transferred to the data node. Then, the data node rejects the access of the unauthorized IoT hard drives.
[0156] In the key module, for each authorized IoT hard drive received, it is necessary to check whether a key file exists on the IoT hard drive. If the key file does not exist, it means that the IoT hard drive has never been used in the target cluster, and the IoT hard drive is directly allowed to connect. If the key file exists, it means that the IoT hard drive has been used in the target cluster, and the key file needs to be further verified. Then, the IoT hard drives without key files are transmitted to the acquisition module, while the IoT hard drives with key files are transmitted to the verification module.
[0157] In the verification module, for each IOT disk containing a key file, it is necessary to determine whether the key file in the IOT disk has passed verification. If the key file in the IOT disk fails verification, it means that the IOT disk is not an IOT disk in the target cluster, and the access of the IOT disk is rejected. If the IOT disk passes verification, the access of the IOT disk is allowed. Then, the IOT disks that fail verification are transmitted to the data nodes, and the data nodes reject the access of IOT disks that fail verification, while the IOT disks that pass verification are transmitted to the acquisition module.
[0158] In the acquisition module, for each IOT hard drive that receives an IOT hard drive without a key file and for each IOT hard drive that passes verification, it is necessary to acquire each physical state parameter of the IOT hard drive; then, each physical state parameter of each IOT hard drive is transmitted to the computing module.
[0159] In the calculation module, based on the various physical state parameters of each received IoT hard drive, the grouping coefficient corresponding to each IoT hard drive is calculated, and then the grouping coefficient corresponding to each IoT hard drive is transmitted to the grouping module.
[0160] In the grouping module, the IOT hard drives are divided into queues corresponding to the grouping coefficients of each received IOT hard drive.
[0161] When a business request arrives, the target IoT hard drive is transmitted to the operation module in the grouping module. Then, in the operation module, the target IoT hard drive is operated according to the operation indicated in the business request information.
[0162] Furthermore, the grouping module transfers all IoT hard drives in the specified queue to the disk recovery module. The specified queue indicates the queue where IoT hard drives are abnormal. In the disk recovery module, the IoT hard drives in the specified queue are repaired, and the queue to which the recovered IoT hard drives belong is adjusted.
[0163] Furthermore, the grouping module transmits the damaged data to the data recovery module, which prioritizes the recovery of damaged data from the IoT hard drive.
[0164] Using the method described above, based on the physical state parameters of each allowed IoT hard drive collected by the acquisition module, the calculation module calculates the grouping coefficient for each IoT hard drive. Then, in the grouping module, the IoT hard drives are grouped according to the grouping coefficient, and each IoT hard drive is assigned to the queue corresponding to the grouping coefficient. Finally, according to the operation indicated in the business request information, the operation module operates on the target IoT hard drive. This method avoids searching for the target IoT hard drive one by one among multiple IoT hard drives, thereby improving the utilization efficiency of IoT hard drives.
[0165] On the one hand, based on the IoT hard drives in the grouping module, in the designated queue indicating that the IoT hard drives are abnormal, the abnormal IoT hard drives can be directly repaired in the disk recovery module, avoiding data loss in the IoT hard drives and further improving the security and reliability of the IoT hard drives; at the same time, it avoids selecting abnormal IoT hard drives for operation when business requests arrive, further improving the utilization efficiency of IoT hard drives.
[0166] On the other hand, based on the IOT hard drive in the grouping module, the damaged data in the IOT hard drive is recovered first in the data recovery module, which ensures the reliability and security of the data in the IOT hard drive.
[0167] Furthermore, the management based on the authorization and verification modules ensures that the IOT hard drive cannot be accessed if it is not authorized or if the key file of the IOT hard drive fails verification, thereby improving data security.
[0168] Based on the same inventive concept, this application also provides an operating system for an IoT hard drive, such as... Figure 3 The diagram shown is a structural schematic of an operating system for an IoT hard drive provided in this application. The system includes:
[0169] The acquisition module 301 is used to acquire the physical status parameters of each IoT hard disk in the first IoT hard disk set, wherein each IoT hard disk in the first IoT hard disk set is an IoT hard disk that is allowed to be accessed.
[0170] The calculation module 302 is used to calculate the grouping coefficient corresponding to each IoT hard disk based on the physical state parameters of each IoT hard disk in the first IoT hard disk set.
[0171] Grouping module 303 is used to divide each IOT hard disk into a queue corresponding to the grouping coefficient according to the grouping coefficient of each IOT hard disk, so as to obtain the second IOT hard disk set;
[0172] The processing module 304 is used to operate the target IOT disk in the second IOT disk set according to the operation indicated in the information of the business request.
[0173] In one possible implementation, the acquisition module 301 is specifically used to acquire the original set of IoT hard disks;
[0174] For each IoT disk in the original IoT disk set, perform the following judgment operation:
[0175] Retrieve the key file from the IoT hard drive;
[0176] Determine if the key file passes verification;
[0177] If the key file fails verification, IoT hard drive access will be rejected.
[0178] If the key file passes verification, allow the IOT hard drive to connect and add the IOT hard drive to the first IOT hard drive set.
[0179] In one possible implementation, the acquisition module 301 is specifically used to determine whether a key file exists in the IOT hard drive in response to the IOT hard drive being authorized;
[0180] If the key file does not exist in the IOT hard drive, allow the IOT hard drive to connect and add the IOT hard drive to the first IOT hard drive set;
[0181] If a key file exists on the IOT hard drive, retrieve the key file from the IOT hard drive.
[0182] In one possible implementation, the acquisition module 301 is specifically used to acquire the device serial number of the IoT hard drive;
[0183] Check the authorization relationship table to see if the device serial number exists;
[0184] If the device serial number is not found in the authorization relationship table, it is confirmed that the IOT hard drive is not authorized, and the IOT hard drive access is rejected;
[0185] If the device serial number exists in the authorization relationship table, it confirms that the IOT hard drive has been authorized.
[0186] In one possible implementation, the acquisition module 301 is specifically used to acquire the device serial number corresponding to each IoT hard drive in the original IoT hard drive set that meets the first preset condition.
[0187] Based on the device serial number corresponding to each IoT hard drive that meets the first preset condition, generate the key information of the IoT hard drive corresponding to the device serial number;
[0188] Save the key information corresponding to each IoT hard drive that meets the first preset condition.
[0189] In one possible implementation, the processing module 304 is specifically configured to respond to the insertion of a non-IoT hard drive and any IoT hard drive from the second set of IoT hard drives into the data node.
[0190] When there is corrupted data on a non-IoT hard drive, determine whether there is corrupted data on any IoT hard drive in the second set of IoT hard drives;
[0191] If no corrupted data exists in any of the IoT hard drives in the second set of IoT hard drives, recover the corrupted data in the non-IoT hard drives.
[0192] If any IoT hard drive in the second IoT hard drive set contains corrupted data, the corrupted data in any IoT hard drive in the second IoT hard drive set will be recovered first.
[0193] In one possible implementation, the processing module 304 is specifically used to obtain all IOT disks located in a specified queue from the second IOT disk set, wherein the specified queue is a queue indicating that there are abnormalities in the IOT disks;
[0194] Repair all IOT disks in the specified queue to obtain the third set of IOT disks;
[0195] If the performance index of any IOT hard drive in the third IOT hard drive set meets the second preset condition, calculate the grouping coefficient of any IOT hard drive and assign any IOT hard drive to the queue corresponding to the grouping coefficient.
[0196] Based on the same inventive concept, this application also provides an electronic device that can implement the operating system functions of the aforementioned IoT hard drive. (Refer to...) Figure 4 The aforementioned electronic devices include:
[0197] At least one processor 401 and a memory 402 connected to at least one processor 401. In this embodiment, the specific connection medium between the processor 401 and the memory 402 is not limited. Figure 4 The example shown is the connection between processor 401 and memory 402 via bus 400. Bus 400 is... Figure 4 The connections between other components are indicated by thick lines and are for illustrative purposes only, not as limiting information. The 400 bus can be divided into address bus, data bus, control bus, etc., for ease of representation. Figure 4 The term is represented by a single thick line, but this does not imply that there is only one bus or one type of bus. Alternatively, processor 401 can also be called a controller; there is no restriction on the name.
[0198] In this embodiment, the memory 402 stores instructions executable by at least one processor 401. By executing the instructions stored in the memory 402, the at least one processor 401 can perform the operation method of the IoT hard drive discussed above. The processor 401 can implement... Figure 4 The system shown illustrates the functions of each module.
[0199] The processor 401 is the control center of the system. It can connect to various parts of the control device through various interfaces and lines. By running or executing instructions stored in memory 402 and calling data stored in memory 402, the system can perform various functions and process data, thereby monitoring the system as a whole.
[0200] In one possible design, processor 401 may include one or more processing units. Processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor may also not be integrated into processor 401. In some embodiments, processor 401 and memory 402 may be implemented on the same chip; in some embodiments, they may also be implemented separately on separate chips.
[0201] Processor 401 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit, field-programmable gate array or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the IoT hard drive operation method disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0202] Memory 402, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 402 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 402 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures that can be accessed by a computer, but is not limited thereto. In the embodiments of this application, memory 402 can also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.
[0203] By designing and programming the processor 401, the code corresponding to the operation method of the IoT hard drive described in the foregoing embodiments can be embedded into the chip, thereby enabling the chip to execute the code during operation. Figure 3 The steps of the operation method of the IoT hard drive in the illustrated embodiment are as follows. How to design and program the processor 401 is a technique well-known to those skilled in the art and will not be described further here.
[0204] Based on the same inventive concept, embodiments of this application also provide a storage medium that stores computer instructions, which, when executed on a computer, cause the computer to perform the operation method of the IoT hard drive described above.
[0205] In some possible implementations, various aspects of the IoT hard drive operation method provided in this application can also be implemented in the form of a program product, which includes program code. When the program product is run on a device, the program code is used to cause the control device to perform the steps in the IoT hard drive operation method according to the various exemplary embodiments of this application described above.
[0206] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0207] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0208] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0209] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0210] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A method for operating an IoT hard drive, characterized in that, The method includes: Obtain the physical state parameters of each IoT hard drive in the first IoT hard drive set, wherein each IoT hard drive in the first IoT hard drive set is an IoT hard drive that is allowed to be accessed; Based on the physical state parameters of each IoT hard drive in the first IoT hard drive set, calculate the grouping coefficient corresponding to each IoT hard drive. Based on the grouping coefficient corresponding to each IoT hard drive, each IoT hard drive is divided into a queue corresponding to the grouping coefficient to obtain a second set of IoT hard drives; Operate the target IoT hard drive in the second IoT hard drive set according to the operation indicated in the business request information; From the second set of IoT hard drives, obtain all IoT hard drives located in a designated queue, wherein the designated queue is a queue indicating that IoT hard drives have anomalies; Repair all IoT hard drives in the specified queue to obtain a third set of IoT hard drives; If the performance index of any IoT hard drive in the third IoT hard drive set meets the second preset condition, calculate the grouping coefficient of the IoT hard drive and assign the IoT hard drive to the queue corresponding to the grouping coefficient.
2. The method as described in claim 1, characterized in that, Before obtaining the physical state parameters of each IoT hard drive in the first IoT hard drive set, the method further includes: Obtain the original set of IoT hard drives; For each IoT hard drive in the original set of IoT hard drives, the following judgment operation is performed: Retrieve the key file from the IoT hard drive; Determine whether the key file passes verification; If not, the IoT hard drive access will be rejected; If so, allow the IoT hard drive to access and add the IoT hard drive to the first IoT hard drive set.
3. The method as described in claim 2, characterized in that, The process of obtaining the key file from the IoT hard drive includes: In response to the IoT hard drive being authorized, determine whether a key file exists in the IoT hard drive; If not, allow the IoT hard drive to access and add the IoT hard drive to the first IoT hard drive set; If so, retrieve the key file from the IoT hard drive.
4. The method as described in claim 3, characterized in that, Before determining whether a key file exists in the IoT hard drive, the method further includes: Obtain the device serial number of the IoT hard drive; Check the authorization relationship table to see if the device serial number exists; If not, confirm that the IoT hard drive is unauthorized, and refuse access to the IoT hard drive; If so, confirm that the IoT hard drive has been authorized.
5. The method as described in claim 2, characterized in that, Before obtaining the original IoT hard drive set, the following is also included: Obtain the device serial number corresponding to each IoT hard drive in the original IoT hard drive set that meets the first preset condition; Based on the device serial number corresponding to each IoT hard drive that meets the first preset condition, generate the key information of the IoT hard drive corresponding to the device serial number. Save the key information corresponding to each IoT hard drive that meets the first preset condition.
6. The method as described in claim 1, characterized in that, After operating the target IoT hard drive in the second IoT hard drive set as indicated in the information of the business request, the process further includes: In response to the insertion of a non-IoT hard drive and any IoT hard drive from the second set of IoT hard drives into the data node; When the non-IoT hard drive contains corrupted data, determine whether any IoT hard drive in the second IoT hard drive set contains corrupted data. If not, recover the damaged data from the non-IoT hard drive; If so, prioritize recovering the damaged data from any of the IoT hard drives in the second set of IoT hard drives.
7. An operating system for an Internet of Things (IoT) hard drive, characterized in that, The system includes: The acquisition module is used to acquire the physical state parameters of each IoT hard drive in the first IoT hard drive set, wherein each IoT hard drive in the first IoT hard drive set is an IoT hard drive that is allowed to be accessed. The calculation module is used to calculate the grouping coefficient corresponding to each IoT hard drive based on the physical state parameters of each IoT hard drive in the first IoT hard drive set. The grouping module is used to divide each IoT hard drive into a queue corresponding to the grouping coefficient according to the grouping coefficient of each IoT hard drive, so as to obtain a second IoT hard drive set. The processing module is configured to operate the target IoT hard drive in the second IoT hard drive set according to the operation indicated in the information of the business request; obtain all IoT hard drives located in a designated queue from the second IoT hard drive set, wherein the designated queue is a queue indicating that IoT hard drives are abnormal; repair all IoT hard drives in the designated queue to obtain a third IoT hard drive set; if the performance index corresponding to any IoT hard drive in the third IoT hard drive set meets the second preset condition, calculate the grouping coefficient corresponding to the IoT hard drive and assign the IoT hard drive to the queue corresponding to the grouping coefficient.
8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, when executing a computer program stored in the memory, implements the method of any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-6.
Citation Information
Patent Citations
Distributed storage system tree search management method and device, equipment and medium
CN115510292A