An Internet of Things-based device sharing method and system
By obtaining the device operation parameters and task schedule in real time, combining the device stability and task volume, traversal comparison and random allocation methods are adopted to solve the security and efficiency of task allocation in device sharing, and efficient and secure task allocation is achieved.
Patent Information
- Application Number
- CN202510300889.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-14
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-03-14
AI Technical Summary
During the existing device sharing process, the task allocation architecture is fixed and vulnerable to attack, resulting in low security and low task processing efficiency, making it difficult to improve efficiency on the basis of ensuring security.
By obtaining the operating parameters and task scheduling table of the equipment in real time, calculating the benchmark selection probability, and using traversal comparison and random allocation methods to dynamically update the task target equipment, combining the stability of the equipment and task volume, ensuring the safety and efficiency of task allocation.
It realizes that while ensuring security, the efficiency and flexibility of task processing are improved, task stacking is avoided, and the security and resource utilization of the equipment sharing system are enhanced.
Smart Images

Figure CN119829295B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of equipment sharing management, and specifically to an equipment sharing method and system based on the Internet of Things. Background Art
[0002] Equipment sharing refers to enabling multiple users or institutions to jointly use certain equipment through the Internet of Things (IoT), cloud computing, and intelligent management platforms, so as to improve resource utilization rate, reduce usage costs, and enhance service efficiency.
[0003] The task allocation architecture in the existing equipment sharing process is a fixed rule-based allocation architecture. When receiving a to-be-processed task sent by a certain user, according to the preset allocation rules, the to-be-processed task is allocated to a certain device. This allocation rule is fixed and it is very easy for a third party to know which device the to-be-processed task will be allocated to. If there is an attack intention, it is very easy to locate the relevant device and carry out subsequent attacks. If a pure random task allocation rule is adopted, then efficiency problems are likely to occur, and the phenomenon of task stacking may occasionally occur, and the overall task processing efficiency is very low. How to improve the task processing efficiency on the basis of ensuring security is the technical problem that the technical solution of the present invention wants to solve. Summary of the Invention
[0004] The purpose of the present invention is to provide an equipment sharing method and system based on the Internet of Things to solve the problems raised in the above background art.
[0005] To achieve the above purpose, the present invention provides the following technical solutions:
[0006] An equipment sharing method based on the Internet of Things, the method includes:
[0007] Obtain the operating parameters and task schedules of each device in real time, and determine the benchmark selection probability of the device according to the operating parameters and task schedules; wherein, the total number of devices is included in the calculation process of the benchmark selection probability, and the total number of devices is a variable and is updated in real time based on a preset equipment filing port;
[0008] Receive the to-be-processed task sent by the user, perform a traversal comparison between the to-be-processed task and the task schedules of each device, and update the benchmark selection probability of each device according to the traversal comparison result;
[0009] Determine the target device of the to-be-processed task according to the updated benchmark selection probability, and synchronously update the task schedule of the target device;
[0010] For any device, before the device executes a certain task, query the user corresponding to the task, establish a connection channel with the user, and real-time feedback the task processing progress.
[0011] As a further solution of the present invention: The step of obtaining the operation parameters and task scheduling table of each device in real time and determining the reference selection probability of the device according to the operation parameters and task scheduling table includes:
[0012] Based on a preset device filing port, receive device filing requests in real time, number the filed devices, and generate a unique label for each device as an identity label;
[0013] Obtain the operation parameters of the device based on the sensors built into the device; the operation parameters are an array containing time tags and identity tags, and the number of columns of the array corresponds one-to-one with the number of sensors, and the corresponding relationship is a preset value;
[0014] Trigger the probability calculation process according to a preset time interval. When a probability calculation process is triggered, read the task scheduling table at the current moment, and obtain the operation parameters before the preset duration based on the current moment;
[0015] Determine the reference selection probability of the device according to the read task scheduling table and operation parameters.
[0016] As a further solution of the present invention: The step of determining the reference selection probability of the device according to the read task scheduling table and operation parameters includes:
[0017] Query the historical average processing duration of each task in the task scheduling table and calculate the task volume; the historical average processing duration of each task is updated in real time according to the processing progress of each device;
[0018] Perform self-comparison on the operation parameters at different read times to determine the device stability;
[0019] Determine the reference selection probability according to the task volume and device stability;
[0020] The calculation process of the task volume is:
[0021] ; where is the task volume, is a proportionality constant, is the historical average processing duration;
[0022] The calculation process of the device stability is:
[0023] ; where is the device stability at the current moment, is the dimension of the operation parameters, is the number of operation parameters within the preset self-comparison duration, is a preset proportionality constant, is the The time point corresponding to a running parameter, is the current time; is a preset constant, is the th element value among the running parameters within the comparison duration, and is the value at the th
[0024] The process of determining the reference selection probability is as follows:
[0025] ; where, is the reference selection probability at the current time, is a preset proportionality constant.
[0026] As a further solution of the present invention: The step of receiving a to-be-processed task sent by a user, traversing and comparing the to-be-processed task with the task scheduling tables of each device, and updating the reference selection probability of each device according to the traversing comparison result includes:
[0027] Receiving a to-be-processed task sent by a user;
[0028] Traversing and comparing the to-be-processed task with the task scheduling tables of each device to obtain the number of tasks in the task scheduling tables of each device that are the same as the to-be-processed task, and taking it as the number of identical tasks;
[0029] Correcting the reference selection probability according to the number of identical tasks;
[0030] The correction process is as follows:
[0031] ; where, is the corrected reference selection probability, is the reference selection probability before correction; is the number of identical tasks, is a preset quantity threshold.
[0032] As a further solution of the present invention: The step of determining the target device of the to-be-processed task according to the updated reference selection probability and synchronously updating the task scheduling table of the target device includes:
[0033] Reading the updated reference selection probabilities of all devices, normalizing the updated reference selection probabilities of all devices to obtain the normalized probabilities of each device; the sum of the normalized probabilities of all devices is one;
[0034] Divide and allocate the range from zero to one based on the specification probabilities of each device to obtain the numerical segments corresponding to each device;
[0035] Generate a random number within the range of zero to one, determine the numerical segment where the random number is located, and query the device corresponding to the numerical segment as the target device for the task to be processed;
[0036] Insert the task to be processed into the task scheduling table of the target device.
[0037] As a further solution of the present invention: The method further includes:
[0038] When determining the target device for the task to be processed, calculate the predicted processing duration according to the task scheduling table of the target device;
[0039] Feed back the predicted processing duration to the user;
[0040] When receiving an acceleration request input by the user, read the task volume of each device and narrow down the selection range of the target device based on the task volume.
[0041] The technical solution of the present invention also provides an Internet of Things-based device sharing system, and the system includes:
[0042] A reference probability determination module, configured to obtain the operation parameters and task scheduling tables of each device in real time, and determine the reference selection probability of the device according to the operation parameters and task scheduling tables; wherein, the total number of devices is included in the calculation process of the reference selection probability, and the total number of devices is a variable and is updated in real time based on a preset device registration port;
[0043] A reference probability update module, configured to receive the task to be processed sent by the user, perform a traversal comparison between the task to be processed and the task scheduling tables of each device, and update the reference selection probabilities of each device according to the traversal comparison results;
[0044] A device selection module, configured to determine the target device of the task to be processed according to the updated reference selection probability, and synchronously update the task scheduling table of the target device;
[0045] A task progress interaction module, configured to, for any device, before the device executes a certain task, query the user corresponding to the task, establish a connection channel with the user, and feedback the task processing progress in real time.
[0046] As a further solution of the present invention: The reference probability determination module includes:
[0047] An identity label generation unit, configured to receive device registration requests in real time based on a preset device registration port, number the registered devices, and generate a unique label for each device as the identity label;
[0048] An operating parameter acquisition unit for acquiring the operating parameters of a device based on sensors built into the device; the operating parameters are an array containing time tags and identity tags, and the number of columns of the array corresponds one-to-one with the sensor numbers, and the correspondence relationship is a preset value;
[0049] An intermittent trigger unit for triggering the probability calculation process according to a preset time interval. When triggering a probability calculation process once, read the task scheduling table at the current moment and acquire the operating parameters before a preset duration based on the current moment;
[0050] An operation execution unit for determining the reference selection probability of the device according to the read task scheduling table and operating parameters.
[0051] As a further solution of the present invention: the operation execution unit includes:
[0052] A task volume calculation sub-unit for querying the historical average processing duration of each task in the task scheduling table and calculating the task volume; the historical average processing duration of each task is updated in real time according to the processing process of each device;
[0053] A self-comparison sub-unit for performing self-comparison on the operating parameters at different read times to determine the device stability;
[0054] A parameter application sub-unit for determining the reference selection probability according to the task volume and the device stability;
[0055] The calculation process of the task volume is:
[0056] ; where is the task volume, is a proportionality constant, is the historical average processing duration;
[0057] The calculation process of the device stability is:
[0058] ; where is the device stability at the current moment, is the dimension of the operating parameters, is the number of operating parameters within a preset self-comparison duration, is a preset proportionality constant, is the time point corresponding to the th operating parameter within the preset self-comparison duration, is the current moment; is a preset constant, is the th operating parameter within the self-comparison duration and the value at the th element, is the value at the th element among the operation parameters corresponding to the current moment; is a preset constant;
[0059] The process of determining the reference selection probability is as follows:
[0060] ; where is the reference selection probability at the current moment, is a preset proportionality constant.
[0061] As a further solution of the present invention: The reference probability update module includes:
[0062] A task receiving unit for receiving a task to be processed sent by a user;
[0063] A traversal comparison unit for traversing and comparing the task to be processed with the task scheduling tables of each device to obtain the number of tasks in the task scheduling tables of each device that are the same as the task to be processed, as the number of identical tasks;
[0064] A correction execution unit for correcting the reference selection probability according to the number of identical tasks;
[0065] The correction process is as follows:
[0066] ; where is the corrected reference selection probability, is the reference selection probability before correction; is the number of identical tasks, is a preset quantity threshold.
[0067] Compared with the prior art, the beneficial effects of the present invention are: The present invention adopts a random task allocation scheme. When allocating tasks, it determines the selection probability of each device in real time according to the actual situation, improving the task processing efficiency on the basis of ensuring safety in random allocation. BRIEF DESCRIPTION OF THE DRAWINGS
[0068] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings in the following description are only some embodiments of the present invention.
[0069] Figure 1 is a flowchart of the device sharing method based on the Internet of Things.
[0070] Figure 2 is the first sub-flowchart of the device sharing method based on the Internet of Things.
[0071] Figure 3It is the block diagram of the second sub - process of the device sharing method based on the Internet of Things.
[0072] Figure 4 It is the block diagram of the third sub - process of the device sharing method based on the Internet of Things.
[0073] Figure 5 It is the block diagram of the composition structure of the device sharing system based on the Internet of Things. Detailed implementation manners
[0074] In order to make the technical problems, technical solutions and beneficial effects to be solved by the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0075] Figure 1 It is the flow chart of the device sharing method based on the Internet of Things. In the embodiments of the present invention, a device sharing method based on the Internet of Things, the method includes:
[0076] Step S100: Obtain the operation parameters and task scheduling tables of each device in real - time, and determine the reference selection probability of the device according to the operation parameters and task scheduling tables; wherein, the total number of devices is included in the calculation process of the reference selection probability, and the total number of devices is a variable, which is updated in real - time based on a preset device record port.
[0077] The devices targeted by this application are of the same type, and only differ in usage frequency and task scheduling tables. Generally speaking, they are the same kind of devices. There may be differences in components or usage duration between the same kind of devices. In addition, the tasks faced by different devices are also different; in the actual scenario, the platform providing device sharing services generally does not provide only one type of device. In this case, the platform needs to first classify the same - type devices into one category, perform independent analysis and processing on the same - type devices, and build a sharing architecture; the solution provided by this application is the independent analysis and processing process for the same - type devices.
[0078] For each device, obtain the operation parameters and task scheduling table of the device. According to the operation parameters, it can be determined whether the device is in a stable state. According to the task scheduling table, the workload to be processed by the device can be determined. Combining these two kinds of data, the probability that each device is selected when facing a new task can be determined, which is called the reference selection probability; the new task can be assigned to the corresponding device according to the reference selection probability.
[0079] It should be noted that the devices on the platform are updated in real time because the platform provider will increase or decrease devices according to the actual situation. Generally, when adding devices, they are leased from other places. Under the architecture of the technical solution of the present invention, generally a group of users each provide different devices to the platform, and the platform provider also provides a part of the devices. Finally, these devices are used to provide different services to users, thus constructing a device sharing architecture.
[0080] Step S200: Receive the task to be processed sent by the user, perform a traversal comparison between the task to be processed and the task scheduling tables of each device, and update the baseline selection probability of each device according to the traversal comparison result;
[0081] Each user can upload a task to be processed. By performing a traversal comparison between the task to be processed and the task scheduling tables of each device, the similarity degree between the task to be processed and each task scheduling table can be judged, and then the baseline selection probability of each device can be updated. The update logic of this application is to place the task to be processed in the task scheduling table with a higher similarity degree as much as possible. This is because for a device, when it processes a task, it will definitely perform some preprocessing processes. If it processes the same task, then it can save a part of the preprocessing time and improve the task processing efficiency.
[0082] However, the core of this application is that the task allocation process retains randomness. The higher the similarity degree, the greater the corresponding corrected baseline selection probability, but it is not necessarily assigned to the corresponding device.
[0083] In addition, regarding the similarity degree between the task to be processed and each task scheduling table, a relatively simple method is to obtain the number of tasks in the task scheduling table that are the same as the task to be processed. The larger the number of tasks, the higher the similarity degree.
[0084] Step S300: Determine the target device for the task to be processed according to the updated baseline selection probability, and synchronously update the task scheduling table of the target device;
[0085] After the baseline selection probability of each device is updated, a device is randomly selected from multiple devices according to the updated baseline selection probability as the device for processing the task to be processed, which is called the target device; insert the task to be processed into the task scheduling table corresponding to the target device and update its task scheduling table.
[0086] From the above content, it can be obtained that the process of selecting the target device is random and has a strong randomness. This randomness also means unpredictability. It is impossible to know which device will process a certain task to be processed, and the security is higher.
[0087] Step S400: For any device, before executing a certain task, the device queries the user corresponding to the task, establishes a connection channel with the user, and provides real-time feedback on the task processing progress.
[0088] For any device, the device processes the tasks in the task schedule in sequence. Whenever it is necessary to process the next task, the device queries the user corresponding to the task, establishes a connection channel with the user, and provides real-time feedback on the task processing progress to the user. There is no limit on the amount of feedback content. It can be all processing data or only the processing progress. The processing progress generally uses a percentage form to represent the proportion of the processed tasks.
[0089] Figure 2 For the first sub-process block diagram of the device sharing method based on the Internet of Things, the steps of obtaining the operating parameters and task schedule of each device in real time and determining the baseline selection probability of the device according to the operating parameters and task schedule include:
[0090] Step S101: Based on a preset device filing port, receive device filing requests in real time, number the filed devices, and generate a unique label for each device as an identity label.
[0091] Step S102: Obtain the operating parameters of the device based on the sensors built into the device; the operating parameters are an array containing time tags and identity tags, and the number of columns of the array corresponds one-to-one with the sensor numbers, and the corresponding relationship is a preset value.
[0092] Step S103: Trigger the probability calculation process according to a preset time interval. When triggering a probability calculation process once, read the task schedule at the current moment and obtain the operating parameters before a preset duration based on the current moment.
[0093] Step S104: Determine the baseline selection probability of the device according to the read task schedule and operating parameters.
[0094] The device is a sharable device, which is mainly provided by users. The platform only assists in providing some devices. Whether users provide devices is completely autonomous. They can send a provision request at any time or send a withdrawal request at any time. The preset device filing port receives device filing requests (including provision requests and withdrawal requests) in real time, numbers the filed devices, and generates a unique label for each device as an identity label. This process is carried out in real time.
[0095] Then, based on the sensors built into the device, the operating parameters of the device are obtained. Since all devices are of the same type and the sensors in the devices are the same, the sensors in the device are pre-numbered, and an array is created. Each element in the array corresponds to a sensor. In practical applications, the operating data of the sensors at each moment is obtained and inserted into the corresponding position in the array. The array containing specific data obtained is called the operating parameter; the operating parameter contains an identity tag indicating which device's operating data it is, and the operating parameter contains a time tag indicating when the operating data was obtained.
[0096] As a preferred embodiment of the technical solution of the present invention, the step of determining the reference selection probability of the device according to the read task schedule and operating parameters includes:
[0097] Query the historical average processing duration of each task in the task schedule and calculate the task volume; the historical average processing duration of each task is updated in real time according to the processing process of each device.
[0098] Perform self-comparison on the read operating parameters at different times to determine the device stability.
[0099] Determine the reference selection probability according to the task volume and device stability.
[0100] The above content provides a specific scheme for generating the reference selection probability. In the technical solution of the present invention, the types of tasks that the user needs to process are limited (the types of devices are limited, and the tasks that each type of device can complete are also limited). For each type of task, the processing duration of it in each device is recorded in real time, which is called the historical processing duration. Calculate the mean value of the historical processing duration to obtain the historical average processing duration. The historical average processing duration represents the amount of the task. Perform numerical conversion on the historical average processing duration to obtain the parameter used to represent the amount of the task, which is the task volume in the above content; among them, since the work of each device is carried out in real time, therefore, the historical average processing duration of each task is updated in real time according to the processing process of each device.
[0101] Perform self-comparison on the read operating parameters at different times. The operating parameter is the data of the device during operation. Analyzing this data can determine a parameter reflecting the working stability of the device, which is called the device stability.
[0102] Finally, combine the two parameters of task volume and device stability to comprehensively determine the reference selection probability.
[0103] In an example of the technical solution of the present invention, a scheme for determining the reference selection probability is provided, which is as follows:
[0104] The calculation process of the task volume is:
[0105] ; Wherein, is the task volume, is the proportionality constant, is the historical average processing duration;
[0106] The calculation process of the equipment stability is as follows:
[0107] ; Wherein, is the equipment stability at the current moment, is the dimension of the operation parameter, is the number of operation parameters within the preset self-comparison duration, is the preset proportionality constant, is the time point corresponding to the th operation parameter within the preset self-comparison duration, is the current moment; is the preset constant, is the th operation parameter within the self-comparison duration, and is the value at the th element of the operation parameter corresponding to the current moment, is the value at the th element of the operation parameter corresponding to the current moment;
[0108] The determination process of the reference selection probability is as follows:
[0109] ; Wherein, is the reference selection probability at the current moment, is the preset proportionality constant.
[0110] The above content respectively provides the determination schemes for the task volume, equipment stability and reference selection probability. The principle of the determination process is described as follows:
[0111] The task volume is directly proportional to the historical average processing duration, which also means is a positive number.
[0112] The device stability at each moment is considered. For a device, its operating parameters form an array, where each element corresponds to a sensor. When calculating the device stability at a certain moment, a preset time duration is first determined. Starting from the current moment, the preset time duration is inversely deduced backward to obtain the operating parameters within the inversely deduced preset time duration. For each element in the operating parameters, the absolute value of the difference between it and the corresponding element in the operating parameters at the current moment is calculated. Then, these absolute values are summed up to represent the fluctuation value of this element (reflecting the degree of fluctuation). Among them, when summing up the absolute values, a Gaussian weight is introduced, such that the greater the time difference of the difference, the smaller the corresponding weight. That is, item.
[0113] After determining the fluctuation situation of each element, the fluctuation values of each element are summed up to obtain the final fluctuation value. By compounding a decreasing function on the final fluctuation value, the device stability reflecting the stability can be obtained.
[0114] The probability of benchmark selection is directly proportional to the device stability and inversely proportional to the task volume.
[0115] Figure 3 It is the second sub - process block diagram of the device sharing method based on the Internet of Things. The steps of receiving the to - be - processed task sent by the user and traversing and comparing the to - be - processed task with the task scheduling tables of each device, and updating the probability of benchmark selection of each device according to the traversing and comparing result include:
[0116] Step S201: Receive the to - be - processed task sent by the user;
[0117] Step S202: Traverse and compare the to - be - processed task with the task scheduling tables of each device to obtain the number of tasks in the task scheduling tables of each device that are the same as the to - be - processed task, which is used as the number of identical tasks;
[0118] Step S203: Modify the probability of benchmark selection according to the number of identical tasks.
[0119] Receive the to - be - processed task sent by the user and traverse and compare the to - be - processed task with the task scheduling tables of each device. Since the task names are limited and preset in advance, the most basic AND operation can be used in the comparison process. After the traversing comparison is completed, the number of tasks in the task scheduling tables of each device that are the same as the to - be - processed task can be obtained, which is called the number of identical tasks. The more the number of identical tasks, the more similar the to - be - processed task is to the corresponding task scheduling table and the more suitable it is for the corresponding device. Finally, the probability of benchmark selection is modified according to the number of identical tasks.
[0120] Regarding the process of modifying the probability of benchmark selection, one feasible solution is as follows:
[0121] The modification process is:
[0122] ; where, is the corrected probability of benchmark selection, is the probability of benchmark selection before correction; is the number of identical tasks, is the preset quantity threshold.
[0123] The correction process is not complicated. Calculate the ratio of the number of identical tasks to the quantity threshold as the correction coefficient, and multiply it by the original probability of benchmark selection. The more identical tasks there are, the greater the corrected probability of benchmark selection.
[0124] Figure 4 Figure 3 is a block diagram of the third sub-process of the device sharing method based on the Internet of Things. The steps of determining the target device of the task to be processed according to the updated probability of benchmark selection and synchronously updating the task schedule of the target device include:
[0125] Step S301: Read the updated probability of benchmark selection of all devices, and perform normalization processing on the updated probability of benchmark selection of all devices to obtain the normalized probability of each device; the sum of the normalized probabilities of all devices is one;
[0126] Step S302: Based on the normalized probability of each device, divide and allocate the range from zero to one to obtain the numerical segment corresponding to each device;
[0127] Step S303: Generate a random number within the range from zero to one, determine the numerical segment where the random number is located, and query the device corresponding to the numerical segment as the target device of the task to be processed;
[0128] Step S304: Insert the task to be processed into the task schedule of the target device.
[0129] The values of the updated probability of benchmark selection of each device are independent of each other and have no relationship. When randomly selecting a device, it is inconvenient to operate. Therefore, in this application, normalization processing is performed on the updated probability of benchmark selection of all devices to obtain the normalized probability of each device. The normalization process is to first calculate the sum of the probabilities of benchmark selection of all devices, and then calculate the ratio of the probability of benchmark selection of each device to the sum to obtain the normalized probability of each device; after this calculation, the sum of the normalized probabilities of all devices is one.
[0130] Then, read the specification probabilities of the devices in sequence (by the device numbers), divide and allocate the range from zero to one. The process of division and allocation is easy to understand. For example, if the specification probability of the first device is 2%, then the range (0, 0.02] corresponds to the first device. After the division and allocation are completed, generate a random number within the range from zero to one. Whichever numerical segment the random number corresponds to, the corresponding device is the selected target device. Finally, insert the task to be processed into the task schedule of the target device.
[0131] It is worth mentioning that there are many ways to insert the task to be processed into the task schedule of the target device. For example, insert it in chronological order. At this time, the task to be processed is at the end of the task schedule. If the efficiency of the preprocessing process is considered, the task identical to the task to be processed can be located in the task schedule, and the task to be processed can be inserted behind the identical task. At this time, one preprocessing process can be saved. In fact, there are also many ways to insert the task to be processed behind the identical task because there may be multiple identical tasks in the task schedule. Generally, insert it behind the last identical task to ensure the sequential task processing architecture as much as possible.
[0132] As a preferred embodiment of the technical solution of the present invention, the method further includes:
[0133] When determining the target device for the task to be processed, calculate the predicted processing duration according to the task schedule of the target device;
[0134] Feed back the predicted processing duration to the user;
[0135] When receiving an acceleration request input by the user, read the task volume of each device, and limit the selection range of the target device based on the task volume.
[0136] In an example of the technical solution of the present invention, an interaction solution is provided. When the user sends a task to be processed and the execution platform of the method determines the target device for the task to be processed, calculate the predicted processing duration according to the insertion position of the task to be processed. Since the historical average processing duration of each task is known, query the task to be processed and all the tasks before it, and calculate the sum of the historical average processing durations of the queried tasks as the predicted processing duration.
[0137] Feed back the predicted processing duration to the user. The user judges whether to input an acceleration request. When receiving an acceleration request input by the user, read the task volume of each device, and select the devices with a task volume less than the preset task volume threshold as the selection range of the target device.
[0138] In the above content, devices with a task volume less than the preset task volume threshold are selected as the selection range of the target device. This process actually affects step S301. When the selection range of the target device is narrowed, "reading the updated baseline selection probabilities of all devices" in step S301 becomes "reading the updated baseline selection probabilities of the devices within the selection range". Correspondingly, the subsequent target device selection process only occurs within the selection range.
[0139] It is worth mentioning that the above solution essentially provides a recursive correction architecture. In practical applications, the concept of security level can also be introduced. For example, obtain the number of times each device has been attacked. When allocating tasks to be processed, select devices with the number of attacks less than the preset number threshold as the selection range, and recursively adjust the process of step S301 in the same way as above. At this time, the selected target devices are devices with a high enough security level (a small enough number of attacks).
[0140] Figure 5 For the block diagram of the composition structure of the device sharing system based on the Internet of Things, in an embodiment of the present invention, a device sharing system based on the Internet of Things, the system 10 includes:
[0141] A baseline probability determination module 11, configured to obtain the operation parameters and task scheduling tables of each device in real time, and determine the baseline selection probability of the device according to the operation parameters and task scheduling tables; wherein, the total number of devices is included in the calculation process of the baseline selection probability, and the total number of devices is a variable and is updated in real time based on a preset device filing port.
[0142] A baseline probability update module 12, configured to receive the tasks to be processed sent by the user, perform a traversal comparison between the tasks to be processed and the task scheduling tables of each device, and update the baseline selection probabilities of each device according to the traversal comparison result.
[0143] A device selection module 13, configured to determine the target device of the task to be processed according to the updated baseline selection probability, and synchronously update the task scheduling table of the target device.
[0144] A task progress interaction module 14, configured to, for any device, before the device executes a certain task, query the user corresponding to the task, establish a connection channel with the user, and feedback the task processing progress in real time.
[0145] Further, the baseline probability determination module 11 includes:
[0146] An identity label generation unit, configured to receive device filing requests in real time based on a preset device filing port, number the filed devices, and generate a unique label for each device as the identity label.
[0147] An operating parameter acquisition unit, configured to acquire the operating parameters of a device based on sensors built in the device; the operating parameters are an array containing time tags and identity tags, and the number of columns of the array corresponds one by one to the numbers of the sensors, and the corresponding relationship is a preset value;
[0148] An intermittent trigger unit, configured to trigger the probability calculation process according to a preset time interval. When triggering a probability calculation process once, read the task scheduling table at the current moment, and acquire the operating parameters before a preset duration based on the current moment;
[0149] An operation execution unit, configured to determine the reference selection probability of the device according to the read task scheduling table and operating parameters.
[0150] Specifically, the operation execution unit includes:
[0151] A task volume calculation subunit, configured to query the historical average processing duration of each task in the task scheduling table and calculate the task volume; the historical average processing duration of each task is updated in real time according to the processing process of each device;
[0152] A self-comparison subunit, configured to perform self-comparison on the operating parameters at different moments read to determine the device stability;
[0153] A parameter application subunit, configured to determine the reference selection probability according to the task volume and the device stability;
[0154] The calculation process of the task volume is:
[0155] ; where is the task volume, is a proportionality constant, is the historical average processing duration;
[0156] The calculation process of the device stability is:
[0157] ; where is the device stability at the current moment, is the dimension of the operating parameters, is the number of operating parameters within a preset self-comparison duration, is a preset proportionality constant, is the time point corresponding to the th operating parameter within the preset self-comparison duration, is the current moment; is a preset constant, is the th operating parameter within the self-comparison duration, and is the value at the th element of the operating parameter corresponding to the current moment; The value at an element; is a preset constant;
[0158] The process of determining the reference selection probability is as follows:
[0159] ; where, is the reference selection probability at the current moment, is a preset proportionality constant.
[0160] Furthermore, the reference probability update module 12 includes:
[0161] A task receiving unit, configured to receive a task to be processed sent by a user;
[0162] A traversal comparison unit, configured to perform a traversal comparison between the task to be processed and the task scheduling tables of each device, and obtain the number of tasks in the task scheduling tables of each device that are the same as the task to be processed as the number of identical tasks;
[0163] A correction execution unit, configured to correct the reference selection probability according to the number of identical tasks;
[0164] The correction process is as follows:
[0165] ; where, is the corrected reference selection probability, is the reference selection probability before correction; is the number of identical tasks, is a preset quantity threshold.
[0166] The above are only the preferred embodiments of the present invention, and are not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present invention shall be included within the protection scope of the present invention.
Claims
1. An Internet of Things-based device sharing method, characterized in that, The method includes: Obtaining the operation parameters and task scheduling tables of each device in real time, and determining the baseline selection probability of the device according to the operation parameters and task scheduling tables; wherein, the total number of devices is involved in the calculation process of the baseline selection probability, and the total number of devices is a variable, which is updated in real time based on a preset device registration port; for each device, obtain the operation parameters and task scheduling table of the device, determine whether the device is in a stable state according to the operation parameters, and determine the workload to be processed by the device according to the task scheduling table. Combining these two types of data, determine the probability of each device being selected when facing a new task, which is called the baseline selection probability; Receive the task to be processed sent by the user, perform a traversal comparison between the task to be processed and the task scheduling tables of each device, and update the baseline selection probability of each device according to the traversal comparison result; perform a traversal comparison between the task to be processed and the task scheduling tables of each device, determine the similarity between the task to be processed and each task scheduling table, and then update the baseline selection probability of each device; obtain the number of tasks in the task scheduling table that are the same as the task to be processed. The larger the number of tasks, the higher the similarity; Determine the target device of the task to be processed according to the updated baseline selection probability, and synchronously update the task scheduling table of the target device; For any device, before the device executes a certain task, query the user corresponding to the task, establish a connection channel with the user, and provide real-time feedback on the task processing progress.
2. The device sharing method based on the Internet of Things according to claim 1, characterized in that, The steps of obtaining the operation parameters and task scheduling tables of each device in real time, and determining the baseline selection probability of the device according to the operation parameters and task scheduling tables include: Receive device registration requests in real time based on a preset device registration port, number the registered devices, and generate a unique label for each device as an identity label; Obtain the operation parameters of the device based on sensors built into the device; the operation parameters are an array containing time tags and identity tags, and the number of columns of the array corresponds one-to-one with the sensor numbers, and the corresponding relationship is a preset value; Trigger the probability calculation process according to a preset time interval. When triggering the probability calculation process once, read the task scheduling table at the current moment, and obtain the operation parameters before the preset duration based on the current moment; Determine the baseline selection probability of the device according to the read task scheduling table and operation parameters.
3. The method for sharing devices based on the Internet of Things according to claim 2, wherein The steps of determining the baseline selection probability of the device according to the read task scheduling table and operation parameters include: Query the historical average processing duration of each task in the task scheduling table and calculate the task volume; the historical average processing duration of each task is updated in real time according to the processing progress of each device; Perform self-comparison on the operation parameters at different moments read to determine the device stability; Determine the baseline selection probability according to the task volume and device stability; The calculation process of the task volume is: In the formula, is the task volume, is the proportionality constant, is the historical average processing duration; The calculation process of the device stability is: In the formula, is the device stability at the current moment, is the dimension of the operating parameters, is the number of operating parameters within the preset self-comparison duration, is the preset proportionality constant, is the time point corresponding to the th operating parameter within the preset self-comparison duration, is the current moment; is the preset constant, is the th operating parameter within the self-comparison duration, and is the value at the th element, is the value at the th element of the operating parameter corresponding to the current moment; is the preset constant; The determination process of the baseline selection probability is: In the formula, is the reference selection probability at the current moment, is a preset proportional constant.
4. The method for sharing devices based on the Internet of Things according to claim 3, wherein The steps of receiving the task to be processed sent by the user, performing a traversal comparison between the task to be processed and the task scheduling tables of each device, and updating the baseline selection probability of each device according to the traversal comparison result include: Receive the task to be processed sent by the user; Traverse and compare the task to be processed with the task scheduling tables of each device to obtain the number of tasks in the task scheduling tables of each device that are the same as the task to be processed, which is used as the number of identical tasks; Correct the baseline selection probability according to the number of identical tasks; The correction process is as follows: In the formula, is the corrected reference selection probability, is the reference selection probability before correction; is the number of identical tasks, is the preset quantity threshold.
5. The device sharing method based on the Internet of Things according to claim 1, characterized in that The steps of determining the target device of the task to be processed according to the updated baseline selection probability and synchronously updating the task scheduling table of the target device include: Read the updated baseline selection probabilities of all devices, perform normalization processing on the updated baseline selection probabilities of all devices to obtain the normalized probabilities of each device; the sum of the normalized probabilities of all devices is one; Based on the normalized probabilities of each device, divide and allocate the range from zero to one to obtain the numerical segments corresponding to each device; Generate a random number within the range from zero to one, determine the numerical segment where the random number is located, and query the device corresponding to the numerical segment as the target device of the task to be processed; Insert the task to be processed into the task scheduling table of the target device.
6. The device sharing method based on the Internet of Things according to claim 1, characterized in that, The method further includes: When determining the target device of the task to be processed, calculate the predicted processing duration according to the task scheduling table of the target device; Feed back the predicted processing duration to the user; When receiving an acceleration request input by the user, read the task volume of each device and limit the selection range of the target device based on the task volume.
7. An Internet of Things-based device sharing system, characterized in that, The system includes: A baseline probability determination module, which is used to obtain the operation parameters and task scheduling tables of each device in real time, and determine the baseline selection probability of the device according to the operation parameters and task scheduling tables; among them, the total number of devices is included in the calculation process of the baseline selection probability, and the total number of devices is a variable, which is updated in real time based on a preset device filing port; for each device, obtain the operation parameters and task scheduling table of the device, determine whether the device is in a stable state according to the operation parameters, determine the workload to be processed by the device according to the task scheduling table, and combine these two pieces of data to determine the probability of each device being selected when facing a new task, which is called the baseline selection probability; A baseline probability update module, which is used to receive the task to be processed sent by the user, traverse and compare the task to be processed with the task scheduling tables of each device, and update the baseline selection probabilities of each device according to the traversal comparison results; traverse and compare the task to be processed with the task scheduling tables of each device, judge the similarity between the task to be processed and each task scheduling table, and then update the baseline selection probabilities of each device; obtain the number of tasks in the task scheduling table that are the same as the task to be processed, and the larger the number of tasks, the higher the similarity; A device selection module, which is used to determine the target device of the task to be processed according to the updated baseline selection probability and synchronously update the task scheduling table of the target device; A task progress interaction module, which is used for any device, before the device executes a certain task, query the user corresponding to the task, establish a connection channel with the user, and feedback the task processing progress in real time.
8. The device sharing system based on the Internet of Things according to claim 7, wherein The baseline probability determination module includes: An identity label generation unit, which is used to receive device filing requests in real time based on a preset device filing port, number the filed devices, and generate a unique label for each device as the identity label; An operating parameter acquisition unit, configured to acquire the operating parameters of a device based on sensors built in the device; the operating parameters are an array containing time tags and identity tags, and the number of columns of the array corresponds one by one to the numbers of the sensors, and the corresponding relationship is a preset value; An intermittent trigger unit, configured to trigger a probability calculation process according to a preset time interval. When triggering a probability calculation process once, read the task scheduling table at the current moment, and acquire the operating parameters before a preset duration based on the current moment; An operation execution unit, configured to determine the reference selection probability of the device according to the read task scheduling table and operating parameters.
9. The device sharing system based on the Internet of Things according to claim 8, characterized in that, The operation execution unit includes: A task volume calculation subunit, configured to query the historical average processing duration of each task in the task scheduling table and calculate the task volume; the historical average processing duration of each task is updated in real time according to the processing process of each device; A self-comparison subunit, configured to perform self-comparison on the operating parameters at different moments read, and determine the device stability; A parameter application subunit, configured to determine the reference selection probability according to the task volume and the device stability; The calculation process of the task volume is: In the formula, is the task volume, is the proportionality constant, is the historical average processing duration; The calculation process of the device stability is: In the formula, is the device stability at the current moment, is the dimension of the operation parameters, is the number of operation parameters within the preset self-comparison duration, is the preset proportional constant, is the time point corresponding to the th operation parameter within the preset self-comparison duration, is the current moment; is the preset constant, is the th among the rd element value of the th operation parameter within the self-comparison duration, is the value at the th element of the operation parameter corresponding to the current moment; is the preset constant; The determination process of the reference selection probability is: In the formula, is the reference selection probability at the current moment, is a preset proportionality constant.
10. The device sharing system based on the Internet of Things according to claim 9, characterized in that, The reference probability update module includes: A task receiving unit, configured to receive a to-be-processed task sent by a user; A traversal comparison unit, configured to perform traversal comparison on the to-be-processed task and the task scheduling tables of each device, and obtain the number of tasks that are the same as the to-be-processed task in the task scheduling tables of each device as the number of same tasks; A correction execution unit, configured to correct the reference selection probability according to the number of same tasks; The correction process is: In the formula, is the corrected reference selection probability, is the reference selection probability before correction; is the number of identical tasks, is the preset quantity threshold.
Citation Information
Patent Citations
Production and maintenance coupling task allocation method and system considering equipment operation state
CN115619171A
Peripheral network facility scheduling management method and system
CN117479235A