Method, system, device, medium and program product for plugging and unplugging electronic devices
By merging and aggregating the plug-in and unplug-out task queues and calculating the combined task queue with the minimum operation time, the problem of low utilization of the robotic arm is solved and the movement path and efficiency of the robotic arm are optimized.
Patent Information
- Application Number
- CN202511114357.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-08
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2045-08-08
AI Technical Summary
During the plugging and unplugging tasks, the robot arm has increased idle movement due to the long distance between adjacent tasks, resulting in low utilization.
By merging and aggregating the plug-in and plug-out task queues, the combined task queue with the shortest operation time is calculated, and the upper computer controls the robotic arm to perform the plug-in and plug-out operations.
The moving path of the robot arm is optimized, which improves the utilization rate of the robot arm and reduces the idle moving time.
Smart Images

Figure CN120606405B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, system, device, medium, and program product for plugging and unplugging electronic devices. Background Art
[0002] The plugging and unplugging maintenance of electronic components is one of the core operations of computer operation and maintenance. With the explosive growth of data volume, the number of electronic components deployed in data centers has also increased dramatically.
[0003] In this scenario, the scheduling system queues the plugging and unplugging tasks and processes them sequentially. During this sequential processing, the robot arm must move according to the corresponding operating positions. If the operating positions of two adjacent tasks are far apart, the robot arm's idle movement increases, significantly reducing its utilization. Summary of the Invention
[0004] The present application provides a method, system, device, medium and program product for plugging and unplugging electronic devices, so as to at least solve the problem in the related art of low utilization rate of a robotic arm caused by increased idle movement of the robotic arm.
[0005] The present application provides a method for plugging and unplugging an electronic device, which is applied to a terminal device and includes:
[0006] Obtain the original task queue of each server, the original task queue of any server includes at least one plug-in and unplug-out task for the server, and the plug-in and unplug-out task includes the plug-in and unplug-out position and plug-in and unplug-out duration; according to the original task queue of each server, obtain the merged task queue and / or aggregated task queue of each server, the merged task queue of any server is a task queue obtained by merging the plug-in and unplug-out tasks that meet the first merging condition in the original task queue of the server, and the aggregated task queue of any server is a task queue obtained by merging the original task queue of the server and the plug-in and unplug-out tasks that meet the second merging condition in the original task queues of other servers into the original task queue of the server; select one from the original task queue, merged task queue, and aggregated task queue of each server respectively for combination to obtain multiple combined task queues; calculate the operation time corresponding to each combined task queue according to the plug-in and unplug-out position, plug-in and unplug-out duration, and the preset moving speed of the robotic arm, and determine the combined task queue with the smallest operation time as the target task queue; send the target task queue to the host computer so that the host computer controls the robotic arm to perform the plug-in and unplug operation according to the target task queue.
[0007] The present application also provides a method for plugging and unplugging an electronic device, which is applied to a host computer and includes:
[0008] Obtain a target plugging and unplugging task from a queue of tasks to be executed; generate a plugging and unplugging instruction according to the target plugging and unplugging task; and send the plugging and unplugging instruction to the robotic arm to control the robotic arm to execute the target plugging and unplugging task.
[0009] The present application also provides an electronic device plugging and unplugging system, characterized in that the system includes:
[0010] Terminal device, host computer, robotic arm and server; terminal device, used to execute the plugging and unplugging method of electronic devices applied to the terminal device; host computer, used to execute the plugging and unplugging method of electronic devices applied to the host computer; robotic arm, used to perform plugging and unplugging operations of electronic devices based on the server according to the plugging and unplugging instructions issued by the host computer.
[0011] The present application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for implementing the steps of any of the above-mentioned methods for plugging and unplugging electronic devices when executing the computer program.
[0012] The present application also provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned methods for plugging and unplugging electronic devices are implemented.
[0013] The present application also provides a computer program product, including a computer program, which implements the steps of any of the above-mentioned methods for plugging and unplugging electronic devices when the computer program is executed by a processor.
[0014] Through this application, after merging the plug-in and unplug-out tasks within the original task queues to obtain a merged task queue and merging the plug-in and unplug-out tasks between the original task queues to obtain an aggregated task queue, the original task queues, merged task queues, and aggregated task queues corresponding to each server are combined in different ways to obtain a variety of combined task queues. This solution calculates the operation time of each combined task queue, selects the target task queue with the shortest operation time, and enables the host computer to control the robotic arm to perform plug-in and unplug operations according to the target task queue. This solves the problem of low robotic arm utilization, ensures the optimal movement path of the robotic arm, reduces the idle movement time of the robotic arm, and improves the utilization of the robotic arm. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0016] Figure 1 A schematic flow chart of a method for plugging and unplugging an electronic device applied to a terminal device provided in an embodiment of the present application;
[0017] Figure 2 A flowchart of a method for merging tasks by inserting and removing tasks from an original task queue according to an embodiment of the present application;
[0018] Figure 3 A flowchart of a method for merging tasks between original task queues provided in an embodiment of the present application;
[0019] Figure 4 A flow chart of a method for plugging and unplugging an electronic device applied to a host computer provided in an embodiment of the present application;
[0020] Figure 5 A flow chart showing the structure and connection of an electronic device plugging and unplugging system according to an embodiment of the present application;
[0021] Figure 6 A signaling diagram of the preferred interaction solution provided in an embodiment of the present application;
[0022] Figure 7 A flow chart showing the structure and connection of an electronic device plugging and unplugging device according to an embodiment of the present application;
[0023] Figure 8 This is a process structure connection diagram of another electronic device plugging and unplugging device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] The following will be combined with the accompanying drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0025] It should be noted that, in the description of this application, the terms "comprises," "includes," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. The terms "first," "second," etc., in this application are used to distinguish similar objects, and are not used to describe a particular order or sequence.
[0026] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0027] In conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the plugging and unplugging method of the electronic device depends, the specific application environment architecture or the specific hardware architecture is described herein.
[0028] The plugging and unplugging maintenance of electronic components is one of the core operations of computer operation and maintenance. With the explosive growth of data volume, the number of electronic components deployed in data centers has also increased dramatically.
[0029] In this scenario, the scheduling system queues the plugging and unplugging tasks and processes them sequentially. During this sequential processing, the robot arm must move according to the corresponding operating positions. If the operating positions of two adjacent tasks are far apart, the robot arm's idle movement increases, significantly reducing its utilization.
[0030] Based on this, the plugging and unplugging method of electronic devices provided by the embodiment of the present application, after merging the plugging and unplugging tasks within the original task queue to obtain a merged task queue and merging the plugging and unplugging tasks between the original task queues to obtain an aggregated task queue, combines the original task queues, merged task queues and aggregated task queues corresponding to each server in different ways to obtain a variety of combined task queues. This solution calculates the operation time of each combined task queue, selects the target task queue with the shortest operation time, and enables the upper computer to control the robotic arm to perform the plugging and unplugging operation according to the target task queue. It solves the problem of low utilization of the robotic arm, ensures the optimal movement path of the robotic arm, reduces the idle movement time of the robotic arm, and improves the utilization of the robotic arm.
[0031] The electronic devices involved in this application include, but are not limited to, hard disks (including mobile hard disks and solid-state hard disks), memory sticks, USB flash drives, graphics cards, network cards, batteries, card readers, etc. The subsequent embodiments of this application will use hard disks as an example to illustrate the plugging and unplugging methods of electronic devices.
[0032] An embodiment of the present application provides a method for plugging and unplugging an electronic device, and the method is described in detail in conjunction with the execution flow of the method for plugging and unplugging an electronic device.
[0033] The present application provides a method for plugging and unplugging an electronic device, which is applied to terminal equipment, including but not limited to desktop computers, laptops, tablet computers, mobile phones, etc. Figure 1 A schematic diagram of a method for plugging and unplugging an electronic device provided in an embodiment of the present application, specifically including the following steps: Figure 1 Steps shown:
[0034] S101, obtaining the original task queue of each server.
[0035] The original task queue corresponds to each server one by one. The original task queue of any server includes at least one plug-in / plug-out task for the server, and the plug-in / plug-out task includes a plug-in / plug-out location and a plug-in / plug-out duration.
[0036] Specifically, an externally input task package is received, and the plugging and unplugging tasks in the task package are written into the original task queue corresponding to each server, thereby achieving acquisition of the original task queue corresponding to each server.
[0037] Exemplarily, a task package uploaded by a staff member is received, and the task package is parsed to obtain the plug-in and unplug-in tasks and the task information corresponding to the plug-in and unplug-in tasks. According to the service identifier in the task information, the plug-in and unplug-in tasks are classified to obtain at least one plug-in and unplug-in task corresponding to each server and the task information corresponding to at least one plug-in and unplug-in task. An original task queue corresponding to each server is constructed, and at least one plug-in and unplug-in task corresponding to each server and the task information corresponding to at least one plug-in and unplug-in task are written into the original task queue, thereby obtaining the original task queue of each server. The embodiment of the present application does not limit the format of the task package, such as the JSON format.
[0038] Task information includes basic attribute information, dynamic attribute information and extended attribute information.
[0039] Basic attribute information includes, but is not limited to, the task identifier, server identifier, plug-in / out location, operation type, and drive identifier. Task identifiers, such as the task ID, are used to track the task lifecycle and can be globally unique identifiers. Server identifiers, such as the server ID, can be server numbers. Plug-in / out location, such as the slot number. Operation type, such as Insert or Eject, represents the specific operation corresponding to the task. Drive identifiers, such as the drive serial number (SN).
[0040] Dynamic attribute information includes, but is not limited to, initial priority coefficient, status, and dependency information. The initial priority coefficient corresponds to the user-specified initial priority. The status represents the task execution status, such as Pending, Scheduled, Executing, Completed, or Failed. Dependency information refers to information corresponding to plug-in / plug-out tasks that are dependent on the current plug-in / plug-out task. This dependency information includes at least the operation type, hard disk identifier, and timing information of the dependent plug-in / plug-out task.
[0041] Extended attribute information includes, but is not limited to, preset timeout thresholds, resource information, pre-plugging and unplugging test operations, pre-plugging and unplugging test operation duration, post-plugging and unplugging test operations, post-plugging and unplugging test operations duration, plugging and unplugging test operations, plugging and unplugging test operation duration, plugging and unplugging duration, and estimated start time. The preset timeout threshold refers to the maximum execution time of the task. Resource information refers to the posture information of the robot arm when performing the plugging and unplugging task, such as the robot arm joint angles and end position. The pre-plugging and unplugging test operation refers to the test operation that needs to be performed before performing the plugging and unplugging task. The pre-plugging and unplugging test operation duration refers to the duration required for the pre-plugging and unplugging test operation. The post-plugging and unplugging test operation refers to the test operation that needs to be performed after performing the plugging and unplugging task. The post-plugging and unplugging test operation duration refers to the duration required for the post-plugging and unplugging test operation. The plugging and unplugging test operation refers to the test operation that needs to be performed when performing the plugging and unplugging task. The plugging and unplugging test operation duration refers to the duration required for the plugging and unplugging test operation. The plugging and unplugging duration refers to the operation duration corresponding to the plugging and unplugging task. The estimated start time is the estimated start time of the plug-in / plug-out task.
[0042] S102: Acquire the merged task queue and / or aggregated task queue of each server according to the original task queue of each server.
[0043] Among them, the merged task queue of any server is the task queue obtained by merging the plug-in and unplug-in tasks that meet the first merging condition in the original task queue of the server, and the aggregated task queue of any server is the task queue obtained by merging the original task queue of the server and the plug-in and unplug-in tasks that meet the second merging condition in the original task queues of other servers into the original task queue of the server. The first merging condition is the merging condition that needs to be met when merging the plug-in and unplug-in tasks in the original task queues. The second merging condition is the merging condition that needs to be met when merging the plug-in and unplug-in tasks in different original task queues.
[0044] Specifically, after obtaining the original task queues of each server, for the original task queue corresponding to each server, first determine whether there are at least two plug-in and plug-out tasks that meet the first merging condition in the original task queue. When there are not at least two plug-in and plug-out tasks that meet the first merging condition in the original task queue, the merge operation is not performed. Therefore, in this case, there is no corresponding merged task queue for the server. When there are at least two plug-in and plug-out tasks that meet the first merging condition in the original task queue, the at least two plug-in and plug-out tasks that meet the first merging condition are merged, and the original task queue after the merging operation is performed is determined as the merged task queue corresponding to the server.
[0045] After obtaining the original task queues of each server, for the original task queues corresponding to any two servers (such as server A and server B), first determine whether there are at least two plug-in and unplug-in tasks that meet the second merging condition in the original task queues corresponding to server A and server B. When there are no at least two plug-in and unplug-in tasks that meet the second merging condition in the original task queues corresponding to server A and server B, the merge operation is not performed. Therefore, in this case, there is no aggregated task queue corresponding to server A. When there are at least two plug-in and unplug-in tasks that meet the second merging condition in the original task queues corresponding to server A and server B, the merge operation is performed, and the merge result is updated to the original task queue corresponding to server A. The updated original task queue corresponding to server A is the aggregated task queue corresponding to server A. For example, the plug-in and unplug-in tasks in server A include plug-in and unplug-in tasks a1, plug-in and unplug-in tasks a2, plug-in and unplug-in tasks a3, and plug-in and unplug-in tasks a4. After determining that plug-in / plug-out task a1 on server A and plug-in / plug-out task b1 on server B meet the second merge condition, plug-in / plug-out task a1 and plug-in / plug-out task b1 are merged, and the merged result is updated to server A's original task queue. After the update, server A's original task queue is determined to be the aggregated task queue of server A. Therefore, the plug-in / plug-out tasks in server A's aggregated task queue include plug-in / plug-out task a1b1, plug-in / plug-out task a2, plug-in / plug-out task a3, and plug-in / plug-out task a4.
[0046] Illustratively, the first merging condition is that the plugging and unplugging test operation durations corresponding to the plugging and unplugging tasks to be merged are both less than a first preset threshold, and there is a dependency relationship between the plugging and unplugging tasks to be merged. Figure 2 The figure is a schematic diagram of the corresponding plug-in and unplug-in task merging process in the original task queue. The plug-in and unplug-in task merging process is as follows.
[0047] In the original task queue corresponding to the server, the plugging position, plugging test operation duration, identification information of the electronic device to be plugged in and out, operation type and dependency information corresponding to each plugging task are obtained from the task information corresponding to each plugging task. After obtaining the above information, the plugging test operation duration corresponding to each plugging task is first compared with the first preset threshold value, and the plugging tasks whose comparison result is that the plugging test operation duration is less than the first preset threshold value are screened out. Here, the screened out plugging tasks are called first-class plugging tasks. When the number of plugging tasks in the first class of plugging tasks is less than 2, it means that the original task queue corresponding to the current server does not meet the merging requirements, and therefore, the merging process can be directly terminated. When the number of the first class of plugging tasks is greater than or equal to 2, it is determined whether there is a dependency relationship between the plugging tasks in the first class of plugging tasks based on the plugging position, identification information, operation type and dependency information corresponding to each plugging task contained in the first class of plugging tasks. When it is determined that there is no dependency relationship between any two plugging tasks in the first class of plugging tasks, the merging process is terminated. When it is determined that there is a dependency relationship between at least two plugging and unplugging tasks in the first category, the dependent tasks are merged, and the merging process ends after the merging operation. In this embodiment, the first preset threshold is the maximum duration of the plugging and unplugging test operation corresponding to the plugging and unplugging tasks to be merged. For example, the first preset threshold can be the time occupied by five plugging and unplugging operations, and the time occupied by one plugging and unplugging operation here can be the average duration of the plugging and unplugging test operation corresponding to multiple plugging and unplugging operations under normal circumstances.
[0048] In the above process, the method for judging whether there is a dependency relationship between two plug-in and plug-out tasks based on the plug-in position, identification information, operation type and dependency information is as follows. Obtain the dependency information corresponding to the plug-in and plug-out task a1 and the plug-in and plug-out position, identification information and operation type corresponding to the plug-in and plug-out task b1, and judge whether the dependency information corresponding to the plug-in and plug-out task a1 contains the plug-in and plug-in position, identification information and operation type corresponding to the plug-in and plug-out task b1. If it is contained, it means that there is a dependency relationship between the two; if not, it means that there is no dependency relationship between the two. The dependency information of the plug-in and plug-out tasks is determined based on the plug-in position, identification information and operation type. The principles for determining the dependency information include but are not limited to the fact that two plug-in and plug-out tasks for a certain slot of the server must be executed continuously; multiple plug-in and plug-out tasks between adjacent slots of the server must be executed sequentially, etc.
[0049] Exemplarily, the second merging condition is that the difference between the pre-plugging test operation durations corresponding to the plugging and unplugging tasks to be merged is less than a second preset threshold, and the movement duration of the robot arm between the plugging and unplugging tasks to be merged is less than a third preset threshold. Figure 3 The following is a diagram of the process of merging and plugging tasks between original task queues.
[0050] In the original task queues corresponding to at least two servers, obtain the pre-plugging test operation duration and plug-in position corresponding to each subordinate plug-in task from the original task queue of each server. After obtaining the above information, the plug-in tasks in at least two servers are screened, specifically screening the plug-in tasks whose difference between the two pre-plugging test operation durations is less than the second preset threshold. The screened-out plug-in tasks are referred to as second-category plug-in tasks. When there are second-category plug-in tasks, the movement duration of the robotic arm between any two plug-in tasks in the second-category plug-in tasks is determined based on the plug-in position of each plug-in task in the second-category plug-in tasks and the preset moving speed of the robotic arm. And determine whether there are at least two plug-in tasks in the second-category plug-in tasks whose movement duration is greater than the third preset threshold. When it does not exist, it means that the original task queues corresponding to at least two servers do not meet the merging requirements. At this time, the merging process can be directly terminated. When it exists, the plug-in tasks whose movement duration is greater than the third preset threshold are directly merged, and the merging process is terminated after the merging operation. In this embodiment, the second preset threshold is the maximum difference between the pre-plug test durations of two mergeable plugging and unplugging tasks. The third preset threshold is the maximum movement duration of the robot arm between the two mergeable plugging and unplugging tasks. The specific values of the second and third preset thresholds can be set based on actual conditions and are not limited here.
[0051] S103 , selecting one from the original task queue, the merged task queue, and the aggregated task queue of each server for combination to obtain multiple combined task queues.
[0052] The combined task queue is a queue obtained by combining any task queues corresponding to each server.
[0053] Specifically, for the original task queue corresponding to a server, there may not be plug-in and unplug-out tasks that meet the first merging condition in the original task queue. Therefore, under the premise that there are no plug-in and unplug-out tasks that meet the first merging condition in the original task queue, there is no corresponding merged task queue for the server. Similarly, for the original task queues corresponding to multiple servers, there may not be plug-in and unplug-out tasks that meet the second merging condition in the multiple original task queues. Therefore, under the premise that there are no plug-in and unplug-out tasks that meet the second merging condition in the multiple original task queues, there is no corresponding aggregated task queue for the server. That is to say, through the steps of S101 to S102, at least one queue corresponding to each server can be obtained. Then, any one queue is selected from at least one queue corresponding to each server for combination. Since there are multiple selection methods, a variety of combined task queues can be obtained. It should be emphasized here that the combined task queue obtained in the embodiment of the present application is the queue obtained after removing repeated plug-in and unplug-out tasks.
[0054] For example, let's say there are three servers: Server A, Server B, and Server C. Server A has an original task queue and a merged task queue. Server B has an original task queue and an aggregated task queue (the aggregated task queue is the result of aggregating the original task queues of Server B and Server C). Server C has an original task queue, a merged task queue, and an aggregated task queue (the aggregated task queue is the result of aggregating the original task queues of Server B and Server C). In this scenario, there are 2*2*3=12 possible combinations, resulting in 12 combined task queues.
[0055] S104 , calculating the operation duration corresponding to each combination task queue according to the plugging and unplugging position, the plugging and unplugging duration, and the preset moving speed of the robot arm, and determining the combination task queue with the shortest operation duration as the target task queue.
[0056] Specifically, after obtaining a plurality of combined task queues, for each combined task queue, the operation duration corresponding to the combined task queue is calculated according to the plugging and unplugging position and plugging and unplugging duration corresponding to each plugging and unplugging task in the combined task queue. After obtaining the operation durations corresponding to all combined task queues, the minimum value is selected from all the operation durations, and the combined task queue corresponding to the minimum operation duration is determined as the target task queue. The method for calculating the operation duration according to the plugging and unplugging position and plugging and unplugging duration can be: first, the total plugging and unplugging duration corresponding to all plugging and unplugging tasks is calculated according to the plugging and unplugging duration corresponding to each plugging and unplugging task in the combined task queue. Then, the total movement duration of the robotic arm between all plugging and unplugging tasks is determined according to the plugging and unplugging position between two adjacent plugging and unplugging tasks in the combined task queue and the preset moving speed of the robotic arm. The sum of the total plugging and unplugging duration and the total movement duration is determined as the combined task queue and the operation duration.
[0057] S105: Send the target task queue to the host computer, so that the host computer controls the robotic arm to perform the plugging and unplugging operation according to the target task queue.
[0058] Specifically, the target task queue is sent to the host computer, so that the host computer generates corresponding plugging and unplugging instructions according to the plugging and unplugging tasks in the target task queue, and controls the robot arm to execute the corresponding plugging and unplugging tasks.
[0059] The plugging and unplugging method of electronic devices provided by the embodiment of the present application combines the original task queues, the merged task queues and the aggregated task queues corresponding to each server in different ways after merging the plugging and unplugging tasks within the original task queues to obtain a merged task queue and merging the plugging and unplugging tasks between the original task queues to obtain an aggregated task queue, thereby obtaining a plurality of combined task queues. This solution calculates the operation time of each combined task queue, selects the target task queue with the shortest operation time, and enables the host computer to control the manipulator to perform the plugging and unplugging operation according to the target task queue. This solves the problem of low utilization of the manipulator, ensures the optimal movement path of the manipulator, reduces the idle movement time of the manipulator, and improves the utilization of the manipulator.
[0060] In some optional implementations, a calculation operation for the dynamic priority corresponding to the plug-in and unplug-in task is added. The dynamic priority can be calculated after the original task queue is obtained. It can also be calculated after the target task queue is screened out. This embodiment does not limit the timing of calculating the dynamic priority. The setting method of the dynamic priority includes: determining the urgency coefficient based on the estimated start time and the current time; determining the fairness compensation coefficient based on the task creation time and the current time; calculating based on the initial priority coefficient, the urgency coefficient, the fairness compensation coefficient and the post-plug-in test coefficient to obtain the priority corresponding to the plug-in and unplug-in task.
[0061] Specifically, after obtaining the original task queue corresponding to each server, for each plug-in / unplug task in the original task queue, the initial priority coefficient, estimated start time, task creation time, and post-plug-in test coefficient are obtained from the task information corresponding to the plug-in / unplug task. Then, the urgency coefficient is determined based on the estimated start time and the current time. The method for determining the urgency coefficient based on the estimated start time and the current time is as follows:
[0062]
[0063] in, is the urgency coefficient, For the current moment, To estimate the start time, It is a preset parameter, such as 0.1.
[0064] By incorporating task timeouts based on the estimated start time into the calculation of the urgency coefficient, the priority of timed-out tasks is increased, avoiding situations where tasks are continuously waiting and cannot be executed.
[0065] The fairness compensation coefficient is determined based on the task creation time and the current time. The method for determining the fairness compensation coefficient based on the task creation time and the current time is as follows:
[0066]
[0067] in, is the fairness compensation coefficient, For the current moment, Create moments for tasks, is the second preset parameter, is the third preset parameter.
[0068] To avoid starvation compensation of low priority tasks through urgency coefficient, the third preset parameter can be set to an absolute value less than A negative number.
[0069] Finally, the priority corresponding to the plugging and unplugging task is obtained by weighted summing the initial priority coefficient, urgency coefficient, fairness compensation coefficient, and post-plugging test coefficient.
[0070] The priority of the plugging and unplugging tasks is determined as follows:
[0071]
[0072] in, The priority of the plug-in and plug-out tasks. is the initial priority coefficient, is the urgency coefficient, is the fairness compensation coefficient, is the test coefficient after plugging and unplugging, is the weight corresponding to the initial priority coefficient, is the weight corresponding to the urgency coefficient, is the weight corresponding to the fairness compensation coefficient, The weight corresponding to the post-plug test coefficient. The post-plug test coefficient is determined based on the interval to which the post-plug test operation duration belongs. Each interval has a corresponding post-plug test coefficient.
[0073] In the dynamic priority scenario, three priority ranges are pre-defined: high, medium, and low. For example, the high priority range is (0.8-1), the medium priority range is (0.5-0.8), and the low priority range is (0-0.5). During the execution of the target task queue, plug-in / plug-out tasks with a dynamic priority in the high priority range are preemptively scheduled. This means that whenever a new plug-in / plug-out task is added, its dynamic priority is compared with the dynamic priorities of other tasks in the target task queue and the newly added task is placed in the appropriate position in descending order. During the task execution phase, tasks are executed in descending order of dynamic priority. During the execution of the target task queue, plug-in / plug-out tasks with a dynamic priority in the medium / low priority range are time-sliced. This means that if the dynamic priority of an executing plug-in / plug-out task is in the medium / low priority range, the plug-in / plug-out task is allocated a 60-second execution window. If the execution time exceeds 60 seconds, the task is interrupted and other tasks continue. During the execution of the target task queue, if the dynamic priority of a plug-in task remains in the medium / low priority range for a preset period of time, such as 10 minutes, the dynamic priority of the plug-in task is automatically raised to the next higher priority range. For example, if the current plug-in task's priority is in the medium priority range, the priority of the plug-in task is raised to the high priority range.
[0074] This embodiment avoids the problem of high-priority tasks waiting for low-priority tasks in a sequential execution scenario by calculating the dynamic priority of the plug-in and plug-out tasks, ensures a rapid response to urgent tasks, and improves task processing efficiency.
[0075] In some optional embodiments, heartbeat monitoring of the robotic arm is also added. The method further includes: receiving heartbeat information sent by the robotic arm and recording the time the heartbeat was received; and removing the robotic arm from the pre-built scheduling pool if no heartbeat information is received within a preset time period starting from the time the heartbeat was received.
[0076] Specifically, the heartbeat information sent by the robotic arm is periodically received, and the heartbeat information includes the identification information of the robotic arm, the serial number of the heartbeat information, the status information of the robotic arm, etc. When the heartbeat information sent by the robotic arm is received, the moment when the heartbeat information is received is recorded, that is, the heartbeat reception moment. Starting from the heartbeat reception moment, if the heartbeat information sent by the robotic arm is not received within the preset time length, it can be considered that the robotic arm has failed. At this time, the robotic arm can be removed from the pre-built scheduling pool. By monitoring the heartbeat information of the robotic arm, this embodiment can timely understand the true status of the robotic arm and can respond to its abnormality or failure at the first time, so as to avoid affecting the execution of subsequent plug-in and unplugging tasks and improve the efficiency of task execution.
[0077] In some optional embodiments, starting from the heartbeat reception moment, when no heartbeat information is received within a preset time period, the robotic arm is removed from the pre-built scheduling pool, and the method further includes: when the heartbeat information sent by the robotic arm is received again, the robotic arm is added back to the scheduling pool.
[0078] Specifically, after removing a robotic arm from the pre-built scheduling pool, if a heartbeat message is received again from the robotic arm, it indicates that the robotic arm has returned to normal operation. At this time, the robotic arm can be added back to the scheduling pool to facilitate the subsequent use of the robotic arm to perform plugging and unplugging tasks. It should be noted that in some cases, to ensure the stability of the robotic arm's status, the robotic arm can be added to the scheduling pool after receiving a preset number (such as 3) consecutive heartbeat messages from the robotic arm at the same frequency.
[0079] In some optional embodiments, the method also includes: receiving task progress information returned by the server and recording the progress reception time; when the plugging and unplugging task corresponding to the task identifier is interrupted, marking the task progress information corresponding to the progress reception time closest to the task interruption time; when the plugging and unplugging task corresponding to the task identifier is resumed, sending the task progress information corresponding to the progress reception time closest to the task interruption time to the host computer to control the robotic arm to continue to perform the plugging and unplugging operation.
[0080] The task progress information is information describing the task execution progress, including the task identifier and execution progress.
[0081] Specifically, the task progress information returned by the server is received periodically or in real time, and the moment when the task progress information is received, i.e., the progress reception moment, is recorded. When the task interruption information carrying the aforementioned task identifier is received, it is determined that the plugging and unplugging task corresponding to the task identifier is interrupted. At this point, the task progress information corresponding to the progress reception moment closest to the task interruption moment can be marked from the multiple task progress information corresponding to the task identifier. When the task recovery information carrying the aforementioned task identifier is received, it is determined that the plugging and unplugging task corresponding to the task identifier is resumed. At this point, the task progress information corresponding to the progress reception moment closest to the task interruption moment can be sent to the host computer, so that the host computer generates a task execution instruction based on the received task progress information, and sends the task execution instruction to the robotic arm, controlling the robotic arm to continue to perform the plugging and unplugging operation starting from the execution progress in the task execution instruction.
[0082] In some optional implementations, the method further includes: receiving a status code fed back by the server; determining a current status of the server based on the status code; and when the current status is abnormal, pausing the pending tasks corresponding to the server and issuing an alarm.
[0083] The status code is the coded information representing the server status.
[0084] Specifically, the status code fed back by the server is received in real time or periodically. When the status code is inconsistent with the preset fault status code, or the preset fault status code does not exist in the status code, the current state of the server is determined to be normal. When the status code is consistent with the preset fault status code, or the preset fault status code exists in the status code, the current state of the server is determined to be abnormal. When it is determined that the current state of the server is abnormal, the pending tasks corresponding to the server are suspended, and an alarm message is issued. The way to suspend the pending tasks corresponding to the server can be to remove the pending tasks corresponding to the server from the target task queue, and when it is determined that the server has returned to normal, rewrite the pending tasks corresponding to the server into the target task queue.
[0085] For example, determining the current state of the server based on the status code may include storing the status code fed back by the server in a buffer. The buffer maintains a sliding window of a preset length, which includes a preset number of status codes. Whenever a status code fed back by the server is received, the status code in the sliding window is updated. The status code displayed in the updated sliding window is obtained, and the mode of the status codes is counted, with the mode of the status codes being used as the current state of the server.
[0086] For example, the status code includes the status value of the hard disk's health status (2-bit status value), such as healthy (00) or warning (01) or fault (10) or reserved (11); the status value of the hard disk's in-place status (1-bit status value), such as not inserted (0) or inserted (1); the status value of the hard disk's power supply status (1-bit status value), such as power off (0) or power on (1); and the status value of the server's current operating status (1-bit status value), such as busy (0) or idle (1). The status code can be a code obtained by sorting the values of each state in the order of the aforementioned states. The health status of the hard disk can be obtained through temperature, lifespan, error count, etc. obtained through self-monitoring analysis and reporting technology or non-volatile memory fast channel.
[0087] After receiving the status code from the server, the system parses the code to obtain the corresponding status value for each state. If the status value corresponding to the hard drive health status is 01 (warning) or 10 (failure), the server's current status is determined to be abnormal. Alternatively, if the hard drive presence status is 1 but the hard drive power status is 0, the server's current status is determined to be abnormal. If the server's current status is determined to be abnormal, all pending tasks corresponding to the server are paused, an alarm is generated, and the alarm information is displayed on the interactive interface.
[0088] This embodiment can promptly detect abnormal status of a server by monitoring the status code, and avoid subsequent task failures due to hardware problems by pausing pending tasks corresponding to the server, thereby improving the accuracy of task execution.
[0089] The present application provides a method for plugging and unplugging an electronic device, which is applied to a host computer, such as Figure 4 As shown, the method includes the following steps:
[0090] S401: Obtain a target plugging and unplugging task from a queue of tasks to be executed.
[0091] Among them, the waiting task queue is the task queue sent by the terminal device to the host computer. Figure 1 The target task queue with the shortest operation time in the corresponding embodiment. The plugging and unplugging tasks in the task queue to be executed can be arranged in descending order according to dynamic priority. The target plugging and unplugging task is any plugging and unplugging task in the task queue to be executed.
[0092] Specifically, the target plugging and unplugging tasks are read sequentially from the task queue to be executed. The target plugging and unplugging tasks include task information corresponding to the task. For a description of the task information, please refer to the content in S101 and will not be repeated here.
[0093] S402: Generate a plug-in instruction according to the target plug-in task.
[0094] The plug-in / plug-out instruction refers to an instruction for driving the robotic arm to perform a plug-in / plug-out operation. The plug-in / plug-out instruction includes at least a server identifier, identifier information of the electronic device to be plugged / plugged, a plug-in / plug-out position, and an operation type.
[0095] Specifically, information such as the server identification, identification information of the electronic component to be plugged or unplugged, the plugging or unplugging position, and the operation type is obtained from the task information corresponding to the target plugging or unplugging task, and a plugging or unplugging instruction is generated based on the aforementioned information.
[0096] S403: Send the plugging and unplugging instruction to the robotic arm to control the robotic arm to perform the target plugging and unplugging task.
[0097] Specifically, the generated plugging and unplugging instruction is sent to the robotic arm, so that the robotic arm performs the target plugging and unplugging task according to the plugging and unplugging instruction.
[0098] The plugging and unplugging method of electronic devices provided in the present application can ensure the highest plugging and unplugging efficiency when the upper computer executes the plugging and unplugging tasks in the task queue to be executed in sequence, because the task queue to be executed is the plugging and unplugging queue with the shortest operation time.
[0099] In some optional embodiments, a step of acquiring an exclusive lock for the robotic arm is added. After acquiring the target plugging and unplugging task from the pending task queue, the method further includes: acquiring an exclusive lock for the robotic arm and determining whether the acquisition is successful; and when the exclusive lock is successfully acquired, executing the generation operation of the plugging and unplugging instruction.
[0100] Specifically, after acquiring the target plug-in and unplug-in task, an attempt is made to acquire the exclusive lock of the robotic arm, and it is determined whether the exclusive lock is acquired successfully. When the acquisition of the exclusive lock of the robotic arm fails, an attempt can be made to acquire the lock a preset number of times. When the acquisition of the exclusive lock of the robotic arm fails for the preset number of consecutive times, the acquisition is stopped. When the exclusive lock of the robotic arm is acquired successfully, the operation of generating the plug-in and unplug-in instruction according to the target plug-in and unplug-in task is continued. By acquiring the exclusive lock of the robotic arm, this embodiment can ensure that the robotic arm only processes one plug-in and unplug-in task at the same time, thereby avoiding resource competition caused by high concurrency and improving plug-in and unplug-in efficiency.
[0101] In some optional embodiments, before executing the plug-in instruction generation operation, the method also includes: obtaining the target resource corresponding to the target plug-in task; determining whether there is reservation information for the target resource by other tasks other than the target plug-in task in the pre-stored resource reservation table; if so, obtaining the reservation time from the reservation information; determining whether there is an execution conflict based on the reservation time and the current time; and when there is no execution conflict, executing the plug-in instruction generation operation.
[0102] Specifically, after acquiring the exclusive lock of the robotic arm, before executing the plug-in / plug-out instruction generation operation, it is necessary to obtain resource information (i.e., target resources) from the task information corresponding to the target plug-in / plug-out task. Then, a determination is made as to whether reservation information for the target resource exists for tasks other than the target plug-in / plug-out task in the resource reservation table pre-stored in the host computer. If not, the plug-in / plug-out instruction generation operation is directly executed. If so, a determination is made as to whether there is an execution conflict between the target plug-in / plug-out task and the other tasks based on the reservation time and the current time. The specific determination method is to determine whether the reservation time and the current time are consistent. If not, this indicates that there is no execution conflict between the target plug-in / plug-out task and the other tasks, and the task can be directly executed. If they are consistent, this indicates that there is an execution conflict between the target plug-in / plug-out task and the other tasks. In this case, the execution conflict can be avoided by lowering the priority of the target plug-in / plug-out task. This embodiment avoids execution failures due to resource contention by searching the resource reservation table, thereby improving task processing efficiency.
[0103] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method.
[0104] The present application provides a plug-in and unplug system for electronic devices, such as Figure 5 As shown, the system includes a terminal device 501 , a host computer 502 , a robotic arm 503 and a server 504 .
[0105] The terminal device 501 is used to send the minimum target task queue of operation duration determined by the method of S101 to S104 to the host computer 502.
[0106] The host computer 502 is used to send the plug-in and pull-out instructions generated through S401 to S402 to the robot arm 503.
[0107] The robotic arm 503 is used to perform plugging and unplugging operations on electronic components based on the server 504 according to the plugging and unplugging instructions issued by the host computer 502.
[0108] like Figure 6 As shown in FIG, it is a signaling diagram of a preferred interaction solution provided by this application. Figure 6 As shown, after the terminal device determines the target task queue with the shortest operation time, it sends the target task queue to the host computer. The host computer retrieves the target plug-in / plug-out task from the target task queue and then acquires the exclusive lock of the robotic arm. Once the robotic arm successfully acquires the exclusive lock, it generates a plug-in / plug-out instruction corresponding to the target plug-in / plug-out task based on the task information of the target plug-in / plug-out task and sends the plug-in / plug-out instruction to the robotic arm. The robotic arm then performs the plug-in / plug-out operation on the corresponding server based on the received plug-in / plug-out instruction. Throughout the interaction process, the robotic arm sends its heartbeat information to the terminal device in real time or periodically. Simultaneously, the server sends its status code to the terminal device in real time or periodically.
[0109] The embodiment of the present application also provides a plug-in and pull-out device for electronic devices. The device is integrated into a terminal device, such as Figure 7 As shown, the device includes:
[0110] The first acquisition module 701 is used to acquire the original task queue of each server. The original task queue of any server includes at least one plugging and unplugging task for the server. The plugging and unplugging task includes a plugging and unplugging position and a plugging and unplugging duration.
[0111] The second acquisition module 702 is used to obtain the merged task queue and / or aggregated task queue of each server based on the original task queue of each server. The merged task queue of any server is the task queue obtained by merging the plug-in and unplug-in tasks that meet the first merging condition in the original task queue of the server. The aggregated task queue of any server is the task queue obtained by merging the original task queue of the server and the plug-in and unplug-in tasks that meet the second merging condition in the original task queues of other servers into the original task queue of the server.
[0112] The combining module 703 is used to select one from the original task queue, the merged task queue, and the aggregated task queue of each server for combination to obtain multiple combined task queues.
[0113] The calculation module 704 is used to calculate the operation time corresponding to each combination task queue according to the plug-in position, plug-in time and the preset movement speed of the robot arm, and determine the combination task queue with the smallest operation time as the target task queue.
[0114] The first sending module 705 is configured to send the target task queue to the host computer, so that the host computer controls the robotic arm to perform the plugging and unplugging operation according to the target task queue.
[0115] In some optional embodiments, the plugging and unplugging tasks also include the plugging and unplugging test operation duration, identification information of the electronic device to be plugged and unplugged, operation type and dependency information. The first merging condition is that the plugging and unplugging test operation durations corresponding to the plugging and unplugging tasks to be merged are all less than the first preset threshold, and there is a dependency relationship between the plugging and unplugging tasks to be merged, and the dependency relationship is determined based on the plugging and unplugging position, identification information, operation type and dependency information.
[0116] In some optional embodiments, the plugging and unplugging task also includes a pre-plugging and unplugging test operation duration, and the second merging condition is that the difference between the pre-plugging and unplugging test operation durations corresponding to the plugging and unplugging tasks to be merged is less than a second preset threshold, and the movement time of the robotic arm between the plugging and unplugging tasks to be merged is less than a third preset threshold, and the movement time is determined according to the plugging and unplugging position and the preset movement speed.
[0117] In some optional implementations, the plugging and unplugging task further includes an initial priority coefficient, an estimated start time, a task creation time, and a post-plugging test coefficient, and the apparatus further includes:
[0118] The first determination module is used to determine the urgency coefficient based on the estimated start time and the current time; the second determination module is used to determine the fairness compensation coefficient based on the task creation time and the current time; the third determination module is used to calculate based on the initial priority coefficient, urgency coefficient, fairness compensation coefficient and post-plugging test coefficient to obtain the priority corresponding to the plugging task.
[0119] In some optional embodiments, the device further comprises:
[0120] The first receiving module is used to receive the heartbeat information sent by the robotic arm and record the heartbeat reception time; the removal module is used to remove the robotic arm from the pre-built scheduling pool when the heartbeat information is not received within a preset time period starting from the heartbeat reception time.
[0121] In some optional embodiments, the device further comprises:
[0122] The adding module is used to remove the robotic arm from the pre-built scheduling pool when no heartbeat information is received within a preset time starting from the heartbeat reception moment. When the heartbeat information sent by the robotic arm is received again, the robotic arm is added back to the scheduling pool.
[0123] In some optional embodiments, the device further comprises:
[0124] The second receiving module is used to receive the task progress information returned by the server and record the progress reception time. The task progress information includes the task identifier and execution progress; the marking module is used to mark the task progress information corresponding to the progress reception time closest to the task interruption time when the plugging and unplugging task corresponding to the task identifier is interrupted; the second sending module is used to send the task progress information corresponding to the progress reception time closest to the task interruption time to the host computer when the plugging and unplugging task corresponding to the task identifier is resumed, so as to control the robotic arm to continue to perform the plugging and unplugging operation.
[0125] In some optional embodiments, the device further comprises:
[0126] The third receiving module is used to receive the status code fed back by the server; the fourth determining module is used to determine the current status of the server according to the status code; the alarm module is used to suspend the corresponding pending tasks of the server and issue an alarm when the current status is abnormal.
[0127] Figure 7 For the description of the features in the embodiment corresponding to the plugging and unplugging device of an electronic device shown, reference can be made to the relevant description of the embodiment corresponding to the methods S101 to S105 , which will not be repeated here.
[0128] The embodiment of the present application also provides a plug-in and pull-out device for electronic devices. The device is integrated into a host computer, such as Figure 8 As shown, the device includes:
[0129] The third acquisition module 801 is used to obtain the target plug-in and unplug-out task from the task queue to be executed;
[0130] A generating module 802 is configured to generate a plug-in instruction according to a target plug-in task;
[0131] The third sending module 803 is used to send the plugging and unplugging instruction to the robotic arm to control the robotic arm to perform the target plugging and unplugging task.
[0132] In some optional embodiments, the device further comprises:
[0133] The first judgment module is used to obtain the exclusive lock of the robot arm after obtaining the target plug-in task from the task queue to be executed, and to determine whether the acquisition is successful; the first execution module is used to execute the generation operation of the plug-in instruction when the exclusive lock is successfully acquired.
[0134] In some optional embodiments, the device further comprises:
[0135] The fourth acquisition module is used to obtain the target resource corresponding to the target plug-in / plug-out task before executing the generation operation of the plug-in / plug-out instruction; the second judgment module is used to determine whether there is reservation information for the target resource for other tasks other than the target plug-in / plug-out task in the pre-stored resource reservation table; the fifth acquisition module is used to obtain the reservation time from the reservation information if so; the third judgment module is used to determine whether there is an execution conflict based on the reservation time and the current time; the second execution module is used to execute the generation operation of the plug-in / plug-out instruction when no execution conflict exists.
[0136] Figure 8 For the description of the features in the embodiment corresponding to the plugging and unplugging device of an electronic device shown, reference can be made to the relevant description of the embodiment corresponding to the methods S401 to S403, which will not be repeated here.
[0137] An embodiment of the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any of the above-mentioned electronic device plugging and unplugging method embodiments.
[0138] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any of the above-mentioned electronic device plugging and unplugging method embodiments when running.
[0139] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
[0140] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the steps in any of the above-mentioned electronic device plugging and unplugging method embodiments are implemented.
[0141] An embodiment of the present application also provides another computer program product, including a non-volatile computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the steps in any of the above-mentioned electronic device plugging and unplugging method embodiments.
[0142] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the above description has generally described the components and steps of each example according to their functions. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0143] The above is a detailed introduction to the plugging and unplugging method of an electronic device provided by the present application. This article uses specific examples to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A method for plugging and unplugging an electronic device, characterized in that: The method is applied to a terminal device, and the method includes: Obtaining an original task queue of each server, wherein the original task queue of any server includes at least one plugging and unplugging task for the server, and the plugging and unplugging task includes a plugging and unplugging position and a plugging and unplugging duration; According to the original task queues of each of the servers, a merged task queue and / or an aggregated task queue of each of the servers is obtained, wherein the merged task queue of any of the servers is a task queue obtained by merging the plug-in and unplug-out tasks that meet the first merging condition in the original task queues of the server, and the aggregated task queue of any of the servers is a task queue obtained by merging the original task queue of the server and the plug-in and unplug-out tasks that meet the second merging condition in the original task queues of other servers into the original task queue of the server; Select one from the original task queue, the merged task queue, and the aggregated task queue of each server respectively and combine them to obtain multiple combined task queues; Calculating the operation duration corresponding to each of the combined task queues according to the plugging and unplugging positions, the plugging and unplugging durations, and the preset moving speed of the robotic arm, and determining the combined task queue with the smallest operation duration as the target task queue; The target task queue is sent to a host computer, so that the host computer controls the robotic arm to perform the plugging and unplugging operation according to the target task queue.
2. The method according to claim 1, characterized in that The plugging and unplugging task also includes the plugging and unplugging test operation duration, the identification information of the electronic device to be plugged and unplugged, the operation type and the dependency information. The first merging condition is that the plugging and unplugging test operation durations corresponding to the plugging and unplugging tasks to be merged are all less than the first preset threshold, and there is a dependency relationship between the plugging and unplugging tasks to be merged, and the dependency relationship is determined according to the plugging and unplugging position, the identification information, the operation type and the dependency information.
3. The method according to claim 1, characterized in that The plugging and unplugging task also includes a pre-plugging and unplugging test operation duration. The second merging condition is that the difference between the pre-plugging and unplugging test operation durations corresponding to the plugging and unplugging tasks to be merged is less than a second preset threshold, and the movement duration of the robotic arm between the plugging and unplugging tasks to be merged is less than a third preset threshold. The movement duration is determined according to the plugging and unplugging position and the preset movement speed.
4. The method according to any one of claims 1 to 3, characterized in that The plug-in / plug-out task also includes an initial priority coefficient, an estimated start time, a task creation time, and a post-plug-in / plug-out test coefficient. The method further includes: determining an urgency coefficient based on the estimated start time and the current time; determining a fairness compensation coefficient according to the task creation time and the current time; The priority corresponding to the plugging and unplugging task is obtained by performing calculation according to the initial priority coefficient, the urgency coefficient, the fairness compensation coefficient, and the post-plugging and unplugging test coefficient.
5. The method according to claim 1, wherein The method further comprises: Receive the heartbeat information sent by the robotic arm and record the heartbeat reception time; Starting from the heartbeat reception moment, when the heartbeat information is not received within a preset time period, the robotic arm is removed from the pre-built scheduling pool.
6. The method according to claim 5, characterized in that After removing the robotic arm from the pre-built scheduling pool when the heartbeat information is not received within a preset time period starting from the heartbeat reception moment, the method further includes: When the heartbeat information sent by the robotic arm is received again, the robotic arm is added back to the scheduling pool.
7. The method according to claim 1, characterized in that The method further comprises: Receive the task progress information returned by the server and record the progress receiving time, wherein the task progress information includes the task identifier and the execution progress; When the plugging and unplugging task corresponding to the task identifier is interrupted, marking the task progress information corresponding to the progress receiving time closest to the task interruption time; When the plugging and unplugging task corresponding to the task identifier is resumed, the task progress information corresponding to the progress receiving time closest to the task interruption time is sent to the host computer to control the robotic arm to continue to perform the plugging and unplugging operation.
8. The method according to claim 1, characterized in that The method further comprises: Receive a status code fed back by the server; Determining a current state of the server according to the state code; When the current state is abnormal, the tasks to be executed corresponding to the server are suspended and an alarm is issued.
9. The method according to claim 1, characterized in that The method also includes a method applied to a host computer, and the method applied to the host computer includes: Get the target plug-in and unplug-out task from the pending task queue; Generate a plug-in instruction according to the target plug-in task; The plugging and unplugging instruction is sent to the robotic arm to control the robotic arm to perform the target plugging and unplugging task.
10. The method according to claim 9, characterized in that After acquiring the target plugging and unplugging task from the to-be-executed task queue, the method further includes: Acquire the exclusive lock of the robotic arm and determine whether the acquisition is successful; When the exclusive lock is acquired successfully, the generation operation of the plug-in instruction is executed.
11. The method according to claim 10, characterized in that Before executing the generation operation of the plug-in instruction, the method further includes: Obtain the target resource corresponding to the target plug-in / plug-out task; Determine whether there is reservation information for the target resource by other tasks other than the target plugging and unplugging task in a pre-stored resource reservation table; If so, obtaining the reserved time from the reservation information; Determining whether there is an execution conflict based on the reserved time and the current time; When the execution conflict does not exist, the generation operation of the plug-in instruction is executed.
12. A plug-in and pull-out system for electronic devices, characterized in that: The system includes a terminal device, a host computer, a robotic arm and a server; The terminal device is used to perform the plugging and unplugging method of the electronic device according to any one of claims 1 to 8; The host computer is used to execute the plugging and unplugging method of the electronic device according to any one of claims 9 to 11; The robotic arm is used to perform plugging and unplugging operations on electronic devices based on the server according to the plugging and unplugging instructions issued by the host computer.
13. An electronic device, characterized in that: include: memory for storing computer programs; A processor, configured to implement the steps of the method for plugging and unplugging an electronic device as claimed in any one of claims 1 to 8, or the steps of the method for plugging and unplugging an electronic device as claimed in any one of claims 9 to 11, when executing the computer program.
14. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of the method for plugging and unplugging an electronic device according to any one of claims 1 to 8, or the steps of the method for plugging and unplugging an electronic device according to any one of claims 9 to 11 are implemented.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method for plugging and unplugging an electronic device according to any one of claims 1 to 8 or the steps of the method for plugging and unplugging an electronic device according to any one of claims 9 to 11 are implemented.
Citation Information
Patent Citations
Data processing method and device, equipment and readable storage medium
CN113656178A
Task order merging method and device, equipment and storage medium
CN115564178A