An intelligent equipment control system, method and storage medium using OPS computer
By comparing the device resource requirements and the remaining amount of OPS resources in an OPS computer, generating the resource allocation sequence, and predicting the resource requirements based on the historical task reception frequency, the problem of unfair allocation of OPS resources is solved, and the normal operation and completion of the equipment tasks are achieved.
Patent Information
- Application Number
- CN202411591792.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-11
- Estimated Expiration
- 2044-11-08
AI Technical Summary
When OPS computers interact with multiple devices at the same time, resource competition and conflict lead to unfair resource allocation, which may lead to task failure, data loss or system crash.
By comparing the resource requirements of each device with the resource remaining in the OPS, a set of resource allocation orders is generated, and resource requirements are predicted based on the historical task reception frequency, setting the reserved resource number. When the OPS resources are insufficient, the probability and risk values of the calculation device appear abnormal, set the inalienable state and sort the resource deprivation order.
It realizes the fairness and rationality of resource allocation, avoids resource competition and conflicts between devices, ensures the normal operation and completion of device tasks, and prevents data loss or system crash.
Smart Images

Figure CN119127621B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of equipment control, and in particular to an intelligent equipment control system, method and storage medium using an OPS computer. Background Art
[0002] The OPS computer is an external computing module used to increase computing power for interactive flat-panel displays. It is designed to enable interactive display devices such as digital signage and flat-panel displays to have computing and network functions by inserting the OPS computer module, thereby simplifying the deployment and maintenance of digital signage and interactive display devices. The OPS computer module usually has a high-performance processor, memory, storage and network interface, which can meet the computing needs of various scenarios, such as digital signage, digital advertising, conference room display systems, etc.
[0003] OPS provides a unified interface that enables it to communicate and collaborate with multiple devices, regardless of whether the devices are of the same or different types, to achieve functions such as data exchange, resource sharing, and collaborative work; however, in the process of interacting with multiple devices at the same time, multiple devices may require the same resource at the same time, but the corresponding resources in OPS are limited, which will lead to resource competition and conflict between devices, which may make OPS resource allocation unfair, resulting in the failure of tasks or operations of some devices, causing data loss or system crashes, etc. Summary of the invention
[0004] The object of the present invention is to provide an intelligent equipment control system, method and storage medium using an OPS computer to solve the problems raised in the above-mentioned background technology.
[0005] In order to solve the above technical problems, the present invention provides the following technical solutions: an intelligent device control method using an OPS computer, the device control method comprising the following steps:
[0006] Step S100: When several devices are connected to the OPS, by comparing the resource demand of each device with the remaining resources in the OPS, determine whether to send a resource shortage reminder to the OPS; obtain the remaining time of the task deadline of each device, obtain the task urgency of each device, and generate a preliminary resource allocation sequence set; according to the historical OPS task reception frequency, predict the remaining time of the next task received by the OPS, and set the reserved resource quantity of various resources;
[0007] Step S200: Whenever an OPS receives a resource requirement for a new task, it calculates the task urgency of the new task; obtains the real-time urgency of each remaining task in the preliminary resource allocation sequence set, and obtains a real-time resource allocation sequence;
[0008] Step S300: Obtain the remaining completion time and the abnormality of the device each time the device is deprived of resources, and calculate the probability of the device being abnormal; extract the minimum and maximum values of the remaining completion time, obtain the reference remaining completion time when the device is deprived of resources, and analyze the distribution between the remaining completion time and the reference remaining completion time; calculate the abnormality probability of the device being abnormal due to the current deprivation of resources based on the current remaining completion time of the device;
[0009] Step S400: When the remaining resources in the OPS cannot meet the new resource demand, the risk value of each device being deprived of resources is calculated based on the abnormal probability of each device. If the risk value exceeds the set risk threshold, the device is set to a non-deprivable state, and the remaining devices are sorted according to the risk value to generate a resource deprivation order.
[0010] Furthermore, step S100 includes the following steps:
[0011] Step S101: Obtain the resource demand of the ath device for the bth resource in OPS: , the device sends a resource demand signal to OPS, including the demand for each resource in OPS; the number of devices connected to OPS is set to n, and the total demand of n devices for the bth resource is obtained as ; Get the remaining amount of the b-th resource in OPS , if exists , then send a resource shortage reminder to OPS;
[0012] Step S102: Get the remaining time of the task deadline of the ath device. , get the task urgency of the ath device ; Get the task urgency of n devices, sort them from large to small according to the task urgency, and get the preliminary resource allocation order set of n tasks , The cth task in the preliminary resource allocation sequence; some equipment tasks have no remaining deadline, indicating that the tasks of these equipment are not urgent, and are ranked later in the resource allocation process, and are allocated to urgent tasks first;
[0013] Step S103: Obtain the average receiving frequency f of historical OPS receiving device tasks, and predict the remaining time of the next OPS receiving device task as ,in, is the time from the last OPS to receive the resource demand signal; obtain the remaining time of the task deadline corresponding to the cth task in the preliminary resource allocation sequence set , set an inequality group, and when the following inequality group is satisfied, the first e tasks in the preliminary resource allocation sequence set are allocated resources in order:
[0014]
[0015] in, is the remaining time of the task deadline corresponding to the e-th task in the preliminary resource allocation sequence set; when the e-th device allocates resources, the remaining amount of the b-th resource in OPS is ,in, is the resource demand of the e-th task for the b-th resource in OPS, When allocating resources to the e-th task, the used amount of the b-th resource; the remaining amount of the resource Set the number of reserved resources for the b-th resource to obtain the reserved resource set of OPS , where m is the number of resource types in OPS;
[0016] By predicting the remaining time for the next OPS to receive the device task, the resources in the remaining time are allocated normally in the allocation order until the OPS is about to receive the device task. In this case, some of the remaining resources need to be reserved to prevent new high-urgency tasks from occurring later. This allows subsequent tasks to use resources normally to complete their tasks without depriving other device resources as much as possible.
[0017] Further, step S200 includes the following steps:
[0018] Step S201: Obtain the resource requirements of the new task for various resources in the OPS, and set the new resource requirement of the i-th task for the b-th resource to , get the remaining time of the corresponding task deadline , and the task urgency of the new task is ;
[0019] Step S202: Set the remaining time of the task deadline of the jth remaining task in the preliminary resource allocation order set to , get the waiting time of the jth remaining task as According to the formula, the real-time urgency of the jth remaining task is calculated when OPS receives a new resource demand signal :
[0020]
[0021] in, is the task urgency of the jth remaining task, is the resource demand of the jth remaining task for the bth resource in OPS, is the number of reserved resources for the bth resource, and m is the number of resource types in the OPS; the urgency of the remaining tasks in the resource allocation order will also be affected by factors such as the waiting time for waiting for resource allocation and the length of time from the task deadline. By calculating with the above formula, the allocation order of each task can be obtained in real time, ensuring the rationality of resource allocation and promoting the consistency of equipment task completion;
[0022] Step S203: If , then the resource allocation order of the i-th task is placed after the j-th remaining task; according to the real-time urgency of each remaining task and the numerical size between the i-th task, a real-time resource allocation order is obtained.
[0023] Further, step S300 includes the following steps:
[0024] Step S301: Obtain the remaining completion time when the ath device is deprived of resources for the kth time in history , determine whether the deprivation of resources causes the device to be abnormal, and set a device abnormality judgment function , if the ath device is deprived of resources for the kth time, causing the device to become abnormal, then ,otherwise, ;
[0025] Step S302: Obtain the remaining completion time and device abnormality of each time the ath device is deprived of resources in history, establish a two-dimensional rectangular coordinate system with the remaining completion time of the ath device as the horizontal coordinate and the device abnormality as the vertical coordinate, and obtain a device abnormality distribution map of the ath device;
[0026] Step S303: Extract the number of abnormalities of the ath device from the device abnormality distribution map. , the probability of abnormality of the ath device is calculated to be ,in, is the number of times the ath device has been deprived of resources in history; select the minimum remaining completion time when the ath device has been deprived of resources in history and the maximum remaining completion time , the reference remaining completion time when the ath device is deprived of resources is calculated as ; Filter all the remaining completion times of the a-th device with abnormalities, and get the number of times the remaining completion time is less than the reference remaining completion time. , the probability that the remaining completion time is less than the reference remaining completion time when the ath device is abnormal is calculated as ;
[0027] Set a reference remaining completion time to determine the distribution of abnormalities when the device was deprived of resources in the past. By comparing each remaining completion time with the reference remaining completion time, it is analyzed that when the device is abnormal, most of the remaining completion time will be in a certain time period. To a certain extent, when the remaining completion time of the device is within a certain range, resource deprivation will greatly increase the probability of abnormality of the device.
[0028] Step S304: Set a risk probability X. If X, the remaining completion time that is less than the reference remaining completion time is set as the risk time; obtain the current remaining completion time of the ath device in real time , according to the formula, the probability that the current remaining completion time of the ath device is less than the reference remaining completion time is calculated :
[0029]
[0030] Among them, Sel() is a judgment function. If it satisfies ,but , , if satisfied ,but , ;
[0031] The Sel() function is used to analyze the relationship between the current remaining completion time of the device and the reference remaining completion time, and the probability of the occurrence of the current remaining completion time of the device can be obtained;
[0032] Get the probability of abnormality of the ath device , according to the formula:
[0033]
[0034] Calculate the probability that the ath device is currently deprived of resources and causes the device to become abnormal By comparing the probability of anomalies in the current remaining completion time with the risk probability, if the probability exceeds the risk probability, it means that when the device is in the current remaining completion time, the probability of being deprived of resources and causing device anomalies is extremely high. Therefore, the formula adds the probability based on the historical probability of device anomalies.
[0035] Step S401: Obtain the probability that the ath device is currently deprived of resources, causing the device to be abnormal and the remaining time of the task deadline of the current a-th device , the risk value of the ath device being deprived of resources is calculated according to the formula :
[0036]
[0037] in, The total remaining time of task deadlines for all current devices;
[0038] Step S402: Set a risk threshold ,like , then set the ath device to a non-preemptible state; except for all devices in the non-preemptible state, sort the remaining devices from low to high according to the risk value to generate a resource deprivation order; when the risk value of a device being deprived of resources is too high, it may cause device crash or resource loss, so for such devices, resources should be released spontaneously after the task is completed.
[0039] In order to better implement the above method, an intelligent equipment control system using an OPS computer is also proposed, wherein the equipment control system includes a resource allocation module, an equipment abnormality analysis module and a resource deprivation analysis module;
[0040] The resource allocation module is used to determine whether to send a resource shortage reminder to the OPS by comparing the resource demand of each device and the remaining resource in the OPS when several devices are connected to the OPS; obtain the remaining time of the task deadline of each device, obtain the urgency of the task of each device, and generate a preliminary resource allocation sequence set; predict the remaining time of the next task received by the OPS based on the historical OPS task reception frequency, and set the reserved resource quantity of various resources;
[0041] The device abnormality analysis module is used to obtain the remaining completion time and the device abnormality each time the device is deprived of resources, and calculate the probability of the device abnormality; extract the minimum and maximum values of the remaining completion time, obtain the reference remaining completion time when the device is deprived of resources, and analyze the distribution between the remaining completion time and the reference remaining completion time; according to the current remaining completion time of the device, calculate the abnormality probability of the device abnormality caused by the current deprivation of resources;
[0042] The resource deprivation analysis module is used to calculate the risk value of each device being currently deprived of resources based on the abnormal probability of each device when the remaining resources in the OPS cannot meet the new resource demand; if the risk value exceeds the set risk threshold, the device is set to a non-deprivable state, and the remaining devices are sorted according to the risk value to generate a resource deprivation order.
[0043] Further, the resource allocation module includes a resource quantity comparison unit, an allocation sequence analysis unit and a reserved resource setting unit;
[0044] The resource quantity comparison unit is used to determine whether to send a resource shortage reminder to the OPS by comparing the resource demand of each device with the resource remaining in the OPS when several devices are connected to the OPS; the allocation sequence analysis unit is used to obtain the remaining time of the task deadline of each device, obtain the task urgency of each device, and generate a preliminary resource allocation sequence set; the reserved resource setting unit is used to predict the remaining time of the next task received by the OPS based on the historical OPS task reception frequency, and set the reserved resource quantity of various resources.
[0045] Further, the device anomaly analysis module includes an anomaly distribution analysis unit and an anomaly probability calculation unit;
[0046] The abnormal distribution analysis unit is used to obtain the remaining completion time and the device abnormality each time the device is deprived of resources, and calculate the probability of the device abnormality; extract the minimum and maximum values of the remaining completion time, obtain the reference remaining completion time when the device is deprived of resources, and analyze the distribution between the remaining completion time and the reference remaining completion time; the abnormal probability calculation unit is used to calculate the abnormal probability of the device abnormality caused by the current deprivation of resources of the device based on the current remaining completion time of the device.
[0047] Further, the resource deprivation analysis module includes a risk value calculation unit and a deprivation order setting unit;
[0048] The risk value calculation unit is used to calculate the risk value of each device being currently deprived of resources based on the abnormal probability of each device when the remaining resources in the OPS cannot meet the new resource demand; the deprivation order setting unit is used to set the device to a non-deprivable state if the risk value exceeds a set risk threshold, and sort the remaining devices according to the risk value to generate a resource deprivation order.
[0049] A storage medium stores computer instructions, which, when executed by a processor, can implement an intelligent device control method using an OPS computer.
[0050] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: (1) The present invention reasonably arranges the resource allocation order of each device task according to the urgency and resource demand of each device task, thereby ensuring that the device tasks can be operated and completed normally at all times, and preventing multiple devices from occupying limited resources at the same time, resulting in each device being unable to operate normally; (2) The present invention simultaneously considers the two methods of resource allocation order and depriving resources from other devices for reallocation, thereby avoiding resource competition and conflict between devices, making OPS resource allocation more fair and reasonable; (3) The present invention analyzes the probability of abnormality when a device is deprived of resources, obtains the risk value of each device being deprived of resources, and selectively deprives each device of resources, effectively ensuring the normal operation of the device and avoiding data loss or system crash. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:
[0052] Figure 1 It is a schematic diagram of the steps of an intelligent equipment control method using an OPS computer;
[0053] Figure 2 It is a structural diagram of an intelligent equipment control system using an OPS computer. DETAILED DESCRIPTION
[0054] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0055] See also Figure 1 to Figure 2 The present invention provides a technical solution: an intelligent device control method using an OPS computer, the device control method comprising the following steps:
[0056] Step S100: When several devices are connected to the OPS, by comparing the resource demand of each device with the remaining resources in the OPS, determine whether to send a resource shortage reminder to the OPS; obtain the remaining time of the task deadline of each device, obtain the task urgency of each device, and generate a preliminary resource allocation sequence set; according to the historical OPS task reception frequency, predict the remaining time of the next task received by the OPS, and set the reserved resource quantity of various resources;
[0057] Wherein, step S100 includes the following steps:
[0058] Step S101: Obtain the resource demand of the ath device for the bth resource in OPS: , assuming the number of devices connected to OPS is n, the total demand of n devices for the bth resource is ; Get the remaining amount of the b-th resource in OPS , if exists , then send a resource shortage reminder to OPS;
[0059] Step S102: Get the remaining time of the task deadline of the ath device. , get the task urgency of the ath device ; Get the task urgency of n devices, sort them from large to small according to the task urgency, and get the preliminary resource allocation order set of n tasks , Assign the cth task in the preliminary resource allocation sequence;
[0060] Step S103: Obtain the average receiving frequency f of historical OPS receiving device tasks, and predict the remaining time of the next OPS receiving device task as ,in, is the time from the last OPS to receive the resource demand signal; obtain the remaining time of the task deadline corresponding to the cth task in the preliminary resource allocation sequence set , set an inequality group, and when the following inequality group is satisfied, the first e tasks in the preliminary resource allocation sequence set are allocated resources in order:
[0061]
[0062] in, is the remaining time of the task deadline corresponding to the e-th task in the preliminary resource allocation sequence set; when the e-th device allocates resources, the remaining amount of the b-th resource in OPS is ,in, is the resource demand of the e-th task for the b-th resource in OPS, When allocating resources to the e-th task, the used amount of the b-th resource; the remaining amount of the resource Set the number of reserved resources for the b-th resource to obtain the reserved resource set of OPS , where m is the number of resource types in OPS.
[0063] Step S200: Whenever an OPS receives a resource requirement for a new task, it calculates the task urgency of the new task; obtains the real-time urgency of each remaining task in the preliminary resource allocation sequence set, and obtains a real-time resource allocation sequence;
[0064] Wherein, step S200 includes the following steps:
[0065] Step S201: Obtain the resource requirements of the new task for various resources in the OPS, and set the new resource requirement of the i-th task for the b-th resource to , get the remaining time of the corresponding task deadline , and the task urgency of the new task is ;
[0066] Step S202: Set the remaining time of the task deadline of the jth remaining task in the preliminary resource allocation order set to , get the waiting time of the jth remaining task as According to the formula, the real-time urgency of the jth remaining task is calculated when OPS receives a new resource demand signal :
[0067]
[0068] in, is the task urgency of the jth remaining task, is the resource demand of the jth remaining task for the bth resource in OPS, is the number of reserved resources for the bth resource, and m is the number of resource types in OPS;
[0069] Step S203: If , then the resource allocation order of the i-th task is placed after the j-th remaining task; according to the real-time urgency of each remaining task and the numerical size between the i-th task, a real-time resource allocation order is obtained.
[0070] Step S300: Obtain the remaining completion time and the abnormality of the device each time the device is deprived of resources, and calculate the probability of the device being abnormal; extract the minimum and maximum values of the remaining completion time, obtain the reference remaining completion time when the device is deprived of resources, and analyze the distribution between the remaining completion time and the reference remaining completion time; calculate the abnormality probability of the device being abnormal due to the current deprivation of resources based on the current remaining completion time of the device;
[0071] Wherein, step S300 includes the following steps:
[0072] Step S301: Obtain the remaining completion time when the ath device is deprived of resources for the kth time in history , determine whether the deprivation of resources causes the device to be abnormal, and set a device abnormality judgment function , if the ath device is deprived of resources for the kth time, causing the device to become abnormal, then ,otherwise, ;
[0073] Step S302: Obtain the remaining completion time and device abnormality of each time the ath device is deprived of resources in history, establish a two-dimensional rectangular coordinate system with the remaining completion time of the ath device as the horizontal coordinate and the device abnormality as the vertical coordinate, and obtain a device abnormality distribution map of the ath device;
[0074] Step S303: Extract the number of abnormalities of the ath device from the device abnormality distribution map. , the probability of abnormality of the ath device is calculated to be ,in, is the number of times the ath device has been deprived of resources in history; select the minimum remaining completion time when the ath device has been deprived of resources in history and the maximum remaining completion time , the reference remaining completion time when the ath device is deprived of resources is calculated as ; Filter all the remaining completion times of the a-th device with abnormalities, and get the number of times the remaining completion time is less than the reference remaining completion time. , the probability that the remaining completion time is less than the reference remaining completion time when the ath device is abnormal is calculated as ;
[0075] Step S304: Set a risk probability X. If X, the remaining completion time that is less than the reference remaining completion time is set as the risk time; obtain the current remaining completion time of the a-th device in real time , according to the formula, the probability that the current remaining completion time of the ath device is less than the reference remaining completion time is calculated :
[0076]
[0077] Among them, Sel() is a judgment function. If it satisfies ,but , , if satisfied ,but , ;
[0078] Get the probability of abnormality of the ath device , according to the formula:
[0079]
[0080] Calculate the probability that the ath device is currently deprived of resources and causes the device to become abnormal .
[0081] Step S400: When the remaining resources in the OPS cannot meet the new resource demand, the risk value of each device being deprived of resources is calculated according to the abnormal probability of each device being abnormal; if the risk value exceeds the set risk threshold, the device is set to a non-deprivable state, and the remaining devices are sorted according to the risk value to generate a resource deprivation order;
[0082] Wherein, step S400 includes the following steps:
[0083] Step S401: Obtain the probability that the ath device is currently deprived of resources, causing the device to be abnormal and the remaining time of the task deadline of the current a-th device , the risk value of the ath device being deprived of resources is calculated according to the formula :
[0084]
[0085] in, The total remaining time of task deadlines for all current devices;
[0086] Step S402: Set a risk threshold ,like , then set the ath device to a non-preemptible state; except for all devices in a non-preemptible state, sort the remaining devices from low to high according to the risk value to generate a resource preemption order.
[0087] An intelligent equipment control system using an OPS computer, the equipment control system comprising a resource allocation module, an equipment abnormality analysis module and a resource deprivation analysis module;
[0088] The resource allocation module is used to determine whether to send a resource shortage reminder to the OPS by comparing the resource demand of each device and the remaining resource in the OPS when several devices are connected to the OPS; obtain the remaining time of the task deadline of each device, obtain the urgency of the task of each device, and generate a preliminary resource allocation sequence set; predict the remaining time of the next task received by the OPS based on the historical OPS task reception frequency, and set the reserved resource quantity of various resources;
[0089] The device abnormality analysis module is used to obtain the remaining completion time and the device abnormality each time the device is deprived of resources, and calculate the probability of the device abnormality; extract the minimum and maximum values of the remaining completion time, obtain the reference remaining completion time when the device is deprived of resources, and analyze the distribution between the remaining completion time and the reference remaining completion time; according to the current remaining completion time of the device, calculate the abnormality probability of the device abnormality caused by the current deprivation of resources;
[0090] The resource deprivation analysis module is used to calculate the risk value of each device being currently deprived of resources based on the abnormal probability of each device when the remaining resources in the OPS cannot meet the new resource demand; if the risk value exceeds the set risk threshold, the device is set to a non-deprivable state, and the remaining devices are sorted according to the risk value to generate a resource deprivation order.
[0091] The resource allocation module includes a resource quantity comparison unit, an allocation sequence analysis unit and a reserved resource setting unit;
[0092] The resource quantity comparison unit is used to determine whether to send a resource shortage reminder to the OPS by comparing the resource demand of each device with the resource remaining in the OPS when several devices are connected to the OPS; the allocation sequence analysis unit is used to obtain the remaining time of the task deadline of each device, obtain the task urgency of each device, and generate a preliminary resource allocation sequence set; the reserved resource setting unit is used to predict the remaining time of the next task received by the OPS based on the historical OPS task reception frequency, and set the reserved resource quantity of various resources.
[0093] Among them, the equipment abnormality analysis module includes an abnormality distribution analysis unit and an abnormality probability calculation unit;
[0094] The abnormal distribution analysis unit is used to obtain the remaining completion time and the device abnormality each time the device is deprived of resources, and calculate the probability of the device abnormality; extract the minimum and maximum values of the remaining completion time, obtain the reference remaining completion time when the device is deprived of resources, and analyze the distribution between the remaining completion time and the reference remaining completion time; the abnormal probability calculation unit is used to calculate the abnormal probability of the device abnormality caused by the current deprivation of resources of the device based on the current remaining completion time of the device.
[0095] Wherein, the resource deprivation analysis module includes a risk value calculation unit and a deprivation order setting unit;
[0096] The risk value calculation unit is used to calculate the risk value of each device being currently deprived of resources based on the abnormal probability of each device when the remaining resources in the OPS cannot meet the new resource demand; the deprivation order setting unit is used to set the device to a non-deprivable state if the risk value exceeds a set risk threshold, and sort the remaining devices according to the risk value to generate a resource deprivation order.
[0097] A storage medium stores computer instructions, which, when executed by a processor, can implement an intelligent device control method using an OPS computer.
[0098] Assume that there are three types of resources in the OPS computer, and the OPS computer is connected to three devices. The resource requirements of device A are 1, 2, and 0, the resource requirements of device B are 1, 0, and 2, and the resource requirements of device C are 0, 1, and 2; the remaining resources of the OPS computer are 3, 2, and 3;
[0099] Because the total demand for the second type of resource is 2+1=3>2, the remaining resources of OPS cannot meet the overall resource demand of the three devices, so a resource shortage reminder is sent to OPS; the remaining deadline of the task of device A is 10h, the remaining deadline of the task of device B is 30h, and the remaining deadline of the task of device C is 40h, and the urgency of the task of device A is calculated. =1 / 10, the urgency of the task of device B =1 / 30, the mission urgency of device C =1 / 40, generating a preliminary resource allocation order of A, B, C;
[0100] The remaining time for the next OPS receiving device task is predicted to be =20h, because 10h<20h<10+30h, so the resources are allocated to device A first. Assuming that after 20h, the task of device A is completed, the resources are released, and the remaining resources are used as reserved resources of OPS;
[0101] When an OPS receives a new resource demand signal from device D, the urgency of obtaining a new task is 1 / 50. There are also devices B and C in the preliminary resource allocation sequence set. The remaining time for the task deadline of device B is 10 hours, and the remaining time for the task deadline of device C is 20 hours. The waiting time for waiting for resource allocation of device B is 20 hours, and the waiting time for waiting for resource allocation of device C is 20 hours. According to the formula: , the real-time urgency of device B is calculated to be 0.03+2×3 / 8=0.78, and the real-time urgency of device C is 0.025+1×3 / 8=0.4; therefore, the order of real-time resource allocation is B, C, D;
[0102] Get the remaining completion time of the first time that historical device A was deprived of resources, which is 5h, with an exception. The remaining completion time of the second time that it was deprived of resources is 15h, with no exception. The remaining completion time of the third time that it was deprived of resources is 6h, with an exception. Select the minimum remaining completion time when historical device A was deprived of resources and the maximum remaining completion time , the reference remaining completion time when device A is deprived of resources is calculated as = 10h, the probability that the remaining completion time is less than the reference remaining completion time when device A is abnormal is calculated as =1; Set a risk probability of 70%, then set the remaining completion time less than 10h as the risk time; Get the current remaining completion time of device A in real time ; According to the formula: =1×1+0=1; According to the formula: =2 / 3×(1+1)=1.33, and the probability that device A is currently deprived of resources and thus becomes abnormal is 1.33;
[0103] When the remaining resources in OPS cannot meet the new resource requirements of the new task, the risk value of device A being deprived of resources is calculated. =1.33×10h=13.3, and the risk threshold is set to 10. Since 13.3>10, device A is set to a non-deprivable state. Except for all devices in a non-deprivable state, the remaining devices are sorted from low to high according to the risk value to generate a resource deprivation order.
[0104] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.
[0105] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art can still modify the technical solutions described in the aforementioned embodiments or replace some of the technical features therein by equivalents. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. An intelligent equipment control method using an OPS computer, characterized in that: The device control method comprises the following steps: Step S100: When several devices are connected to the OPS, by comparing the resource demand of each device with the remaining resources in the OPS, determine whether to send a resource shortage reminder to the OPS; obtain the remaining time of the task deadline of each device, obtain the task urgency of each device, and generate a preliminary resource allocation sequence set; according to the historical OPS task reception frequency, predict the remaining time of the next task received by the OPS, and set the reserved resource quantity of various resources; Step S200: Whenever an OPS receives a resource requirement for a new task, it calculates the task urgency of the new task; obtains the real-time urgency of each remaining task in the preliminary resource allocation sequence set, and obtains a real-time resource allocation sequence; Step S300: Obtain the remaining completion time and the abnormality of the device each time the device is deprived of resources, and calculate the probability of the device being abnormal; extract the minimum and maximum values of the remaining completion time, obtain the reference remaining completion time when the device is deprived of resources, and analyze the distribution between the remaining completion time and the reference remaining completion time; calculate the abnormality probability of the device being abnormal due to the current deprivation of resources based on the current remaining completion time of the device; Step S400: When the remaining resources in the OPS cannot meet the new resource demand, the risk value of each device being deprived of resources is calculated according to the abnormal probability of each device being abnormal; if the risk value exceeds the set risk threshold, the device is set to a non-deprivable state, and the remaining devices are sorted according to the risk value to generate a resource deprivation order; The step S200 includes the following steps: Step S201: Obtain the resource requirements of the new task for various resources in the OPS, and set the new resource requirement of the i-th task for the b-th resource to , get the remaining time of the corresponding task deadline , and the task urgency of the new task is ; Step S202: Set the remaining time of the task deadline of the jth remaining task in the preliminary resource allocation order set to , get the waiting time of the jth remaining task as According to the formula, the real-time urgency of the jth remaining task is calculated when OPS receives a new resource demand signal : in, is the task urgency of the jth remaining task, is the resource demand of the jth remaining task for the bth resource in OPS, is the number of reserved resources for the bth resource, and m is the number of resource types in OPS; Step S203: If , then the resource allocation order of the i-th task is placed after the j-th remaining task; according to the real-time urgency of each remaining task and the numerical size between the i-th task, a real-time resource allocation order is obtained.
2. The intelligent device control method using an OPS computer according to claim 1, characterized in that: The step S100 includes the following steps: Step S101: Obtain the resource demand of the ath device for the bth resource in OPS: , assuming the number of devices connected to OPS is n, the total demand of n devices for the bth resource is ; Get the remaining amount of the b-th resource in OPS , if exists , then send a resource shortage reminder to OPS; Step S102: Get the remaining time of the task deadline of the ath device. , get the task urgency of the ath device ; Get the task urgency of n devices, sort them from large to small according to the task urgency, and get the preliminary resource allocation order set of n tasks , Assign the cth task in the preliminary resource allocation sequence; Step S103: Obtain the average receiving frequency f of historical OPS receiving device tasks, and predict the remaining time of the next OPS receiving device task as ,in, is the time from the last OPS to receive the resource demand signal; obtain the remaining time of the task deadline corresponding to the cth task in the preliminary resource allocation sequence set , set an inequality group, and when the following inequality group is satisfied, the first e tasks in the preliminary resource allocation sequence set are allocated resources in order: in, is the remaining time of the task deadline corresponding to the e-th task in the preliminary resource allocation sequence set; when the e-th device allocates resources, the remaining amount of the b-th resource in OPS is ,in, is the resource demand of the e-th task for the b-th resource in OPS, When allocating resources to the e-th task, the used amount of the b-th resource; the remaining amount of the resource Set the number of reserved resources for the b-th resource to obtain the reserved resource set of OPS , where m is the number of resource types in OPS.
3. The intelligent device control method using an OPS computer according to claim 2, characterized in that: The step S300 includes the following steps: Step S301: Obtain the remaining completion time when the ath device is deprived of resources for the kth time in history , determine whether the deprivation of resources causes the device to be abnormal, and set a device abnormality judgment function , if the ath device is deprived of resources for the kth time, causing the device to become abnormal, then ,otherwise, ; Step S302: Obtain the remaining completion time and device abnormality of each time the ath device is deprived of resources in history, establish a two-dimensional rectangular coordinate system with the remaining completion time of the ath device as the horizontal coordinate and the device abnormality as the vertical coordinate, and obtain a device abnormality distribution map of the ath device; Step S303: Extract the number of abnormalities of the ath device from the device abnormality distribution map. , the probability of abnormality of the ath device is calculated to be ,in, is the number of times the ath device has been deprived of resources in history; select the minimum remaining completion time when the ath device has been deprived of resources in history and the maximum remaining completion time , the reference remaining completion time when the ath device is deprived of resources is calculated as ; Filter all the remaining completion times of the a-th device with abnormalities, and get the number of times the remaining completion time is less than the reference remaining completion time. , the probability that the remaining completion time is less than the reference remaining completion time when the ath device is abnormal is calculated as ; Step S304: Set a risk probability X. If X, the remaining completion time that is less than the reference remaining completion time is set as the risk time; obtain the current remaining completion time of the a-th device in real time , according to the formula, the probability that the current remaining completion time of the ath device is less than the reference remaining completion time is calculated : Among them, Sel() is a judgment function. If it satisfies ,but , , if satisfied ,but , ; Get the probability of abnormality of the ath device , according to the formula: Calculate the probability that the ath device is currently deprived of resources and causes the device to become abnormal .
4. The intelligent device control method using an OPS computer according to claim 3 is characterized in that: The step S400 includes the following steps: Step S401: Obtain the probability that the ath device is currently deprived of resources and causes the device to be abnormal and the remaining time of the task deadline of the current a-th device , the risk value of the ath device being deprived of resources is calculated according to the formula : in, The total remaining time of task deadlines for all current devices; Step S402: Set a risk threshold ,like , then set the ath device to a non-preemptible state; except for all devices in a non-preemptible state, sort the remaining devices from low to high according to the risk value to generate a resource preemption order.
5. An intelligent equipment control system applied to an intelligent equipment control method using an OPS computer as described in claim 1, characterized in that: The equipment control system includes a resource allocation module, an equipment anomaly analysis module and a resource deprivation analysis module; The resource allocation module is used to determine whether to send a resource shortage reminder to the OPS by comparing the resource demand of each device and the remaining resource in the OPS when several devices are connected to the OPS; obtain the remaining time of the task deadline of each device, obtain the urgency of the task of each device, and generate a preliminary resource allocation sequence set; predict the remaining time of the next task received by the OPS based on the historical OPS task reception frequency, and set the reserved resource quantity of various resources; The device abnormality analysis module is used to obtain the remaining completion time and the device abnormality each time the device is deprived of resources, and calculate the probability of the device abnormality; extract the minimum and maximum values of the remaining completion time, obtain the reference remaining completion time when the device is deprived of resources, and analyze the distribution between the remaining completion time and the reference remaining completion time; according to the current remaining completion time of the device, calculate the abnormality probability of the device abnormality caused by the current deprivation of resources; The resource deprivation analysis module is used to calculate the risk value of each device being currently deprived of resources according to the abnormal probability of each device being abnormal when the remaining resources in the OPS cannot meet the new resource demand; If the risk value exceeds the set risk threshold, the device is set to a non-deprivable state, and the remaining devices are sorted according to the risk value to generate a resource deprivation order.
6. The intelligent equipment control system according to claim 5, characterized in that: The resource allocation module includes a resource quantity comparison unit, an allocation sequence analysis unit and a reserved resource setting unit; The resource quantity comparison unit is used to determine whether to send a resource shortage reminder to the OPS by comparing the resource demand of each device with the resource remaining amount in the OPS when several devices are connected to the OPS; the allocation sequence analysis unit is used to obtain the remaining time of the task deadline of each device, obtain the task urgency of each device, and generate a preliminary resource allocation sequence set; The reserved resource setting unit is used to predict the remaining time for the OPS to receive a task next time according to the historical OPS task reception frequency, and set the reserved resource quantity of various resources.
7. The intelligent equipment control system according to claim 5, characterized in that: The device abnormality analysis module includes an abnormality distribution analysis unit and an abnormality probability calculation unit; The abnormal distribution analysis unit is used to obtain the remaining completion time and the device abnormality each time the device is deprived of resources, and calculate the probability of the device abnormality; extract the minimum and maximum values of the remaining completion time, obtain the reference remaining completion time when the device is deprived of resources, and analyze the distribution between the remaining completion time and the reference remaining completion time; the abnormal probability calculation unit is used to calculate the abnormal probability of the device abnormality caused by the current deprivation of resources of the device based on the current remaining completion time of the device.
8. The intelligent equipment control system according to claim 5, characterized in that: The resource deprivation analysis module includes a risk value calculation unit and a deprivation order setting unit; The risk value calculation unit is used to calculate the risk value of each device being currently deprived of resources based on the abnormal probability of each device when the remaining resources in the OPS cannot meet the new resource demand; the deprivation order setting unit is used to set the device to a non-deprivable state if the risk value exceeds a set risk threshold, and sort the remaining devices according to the risk value to generate a resource deprivation order.
9. A storage medium, characterized in that: The storage medium stores computer instructions, and when the computer instructions are executed by the processor, an intelligent device control method using an OPS computer as described in any one of claims 1 to 4 can be implemented.
Citation Information
Patent Citations
Task scheduling optimization method and system based on equipment state analysis
CN118193169A
Resource monitoring device, resource monitoring system, method for monitoring resource, resource monitoring program
JP2013161305A