Scheduling method and device for verification tasks of electric power metering equipment and medium
By classifying and scheduling the verification tasks of power metering equipment, and utilizing preset scheduling strategies and reinforcement learning algorithms, the problem of low efficiency in the traditional power metering equipment verification mode has been solved, achieving efficient and flexible verification task management, and improving verification efficiency and resource utilization.
Patent Information
- Application Number
- CN202511564859.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-02-10
AI Technical Summary
Traditional power metering equipment verification methods are inefficient. Manual scheduling is inefficient, and existing intelligent algorithms have high response delays and weak anti-disturbance capabilities, making them unable to effectively cope with the exponential growth in verification demand, resulting in a shortage of verification resources and insufficient efficiency.
By defining and issuing the first verification task, classifying it based on task information, and using a preset scheduling strategy and reinforcement learning algorithm to schedule the verification tasks, including the third verification task with specified conditions and the fourth verification task without specified conditions, the efficiency of task scheduling and dispatching is improved.
It significantly improves the efficiency of power metering equipment verification, reduces labor costs, ensures the accuracy and flexibility of the verification process, enables rapid response to changes in demand, and reduces verification cycle and default rate.
Smart Images

Figure CN121503984A_ABST
Abstract
Description
Technical Field
[0001] This application generally relates to the field of automation control technology. More specifically, this application relates to a scheduling method, apparatus, and medium for the calibration of power metering equipment. Background Technology
[0002] Electricity metering equipment is a core component of the power system, spanning the entire chain of electricity production and consumption (generation, transmission, distribution, and user end). Its core responsibility is to monitor and record electricity consumption, ensuring the accuracy of electricity metering, which is the cornerstone of stable power system operation, fair trading, and user trust.
[0003] However, the verification process, a crucial step in ensuring metrological performance, faces a sharp contradiction between resource capacity and the exponentially growing demand for verification. The inefficiency of traditional verification methods has become a bottleneck restricting power system safety, service quality, technological upgrades, and regulatory compliance.
[0004] In view of this, there is an urgent need to provide a scheduling scheme for the verification tasks of power metering equipment in order to improve verification efficiency. Summary of the Invention
[0005] In order to at least solve one or more of the technical problems mentioned above, this application proposes a scheduling method, device and medium for power metering equipment calibration tasks in several aspects.
[0006] In a first aspect, this application provides a scheduling method for power metering equipment verification tasks, comprising: defining and issuing a first verification task; wherein the first verification task has corresponding task information; classifying the first verification task based on the task information to obtain a second verification task, wherein the second verification task includes a third verification task with specified conditions and a fourth verification task without specified conditions; in response to the third verification task, scheduling the third verification task according to the task information of the third verification task and a preset scheduling strategy; and in response to the fourth verification task, scheduling the fourth verification task according to the task information of the fourth verification task and a reinforcement learning algorithm.
[0007] In a second aspect, this application provides a scheduling device for a power metering equipment verification task, comprising: a processor configured to execute program instructions; and a memory configured to store the program instructions, which, when loaded and executed by the processor, cause the device to perform the method according to the first aspect.
[0008] In a third aspect, this application provides a computer storage medium, wherein a computer program is stored on the computer storage medium, and the program, when executed by a processor, implements the method according to the first aspect.
[0009] Using the scheduling method for power metering equipment verification tasks provided above, this application classifies the first verification task based on the task information to obtain a second verification task, wherein the second verification task includes a third verification task with specified conditions and a fourth verification task without specified conditions; in response to the third verification task, the third verification task is scheduled according to the task information of the third verification task and a preset scheduling strategy; in response to the fourth verification task, the fourth verification task is scheduled according to the task information of the fourth verification task and a reinforcement learning algorithm, which can improve the efficiency of task scheduling and dispatching, thereby improving the verification efficiency. Attached Figure Description
[0010] The above and other objects, features, and advantages of exemplary embodiments of this application will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of this application are illustrated by way of example and not limitation, and the same or corresponding reference numerals denote the same or corresponding parts, wherein: Figure 1 An exemplary flowchart of a scheduling method for power metering equipment verification tasks according to some embodiments of this application is shown; Figure 2 An exemplary flowchart of a method for scheduling a third verification task according to some embodiments of this application is shown; Figure 3 An exemplary flowchart of a method for scheduling a third verification task according to other embodiments of this application is shown; Figure 4 An exemplary flowchart of a method for scheduling a third verification task according to another embodiment of this application is shown; Figure 5 An exemplary flowchart of a method for scheduling and processing a fourth verification task according to an embodiment of this application is shown; Figure 6 An exemplary structural block diagram of a scheduling device for power metering equipment verification tasks according to an embodiment of this application is shown. Detailed Implementation
[0011] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0012] It should be understood that the terms "comprising" and "including" used in the specification and claims of this application indicate the presence of the described features, integrals, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.
[0013] It should also be understood that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the application. As used in this specification and claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this specification and claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes such combinations.
[0014] As used in this specification and claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrases "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]." It should also be noted that the terms "first," "second," ..., "ninth" appearing in this application are used only to distinguish different concepts and do not indicate a specific order or meaning.
[0015] Electricity metering equipment is a core component of the power system, undertaking the crucial function of monitoring and recording electricity consumption. They are present throughout the entire electricity production chain—including generation, transmission, distribution, and end-users—ensuring not only the accuracy of electricity metering but also supporting the stable operation of the power grid. With the continuous optimization of the electricity market, the ongoing advancement of energy conservation and emission reduction, the rapid iteration of smart grid technology, and the large-scale integration of new energy sources such as wind and solar power, the demand for electricity metering equipment has experienced explosive growth across provinces and cities.
[0016] Against this backdrop, the accurate verification of power metering equipment is particularly crucial. It is fundamental to ensuring the safe and stable operation of the power system (e.g., preventing grid accidents caused by metering errors), and also helps improve the quality of power supply services (e.g., reducing user complaint rates), promote technological upgrades (supporting smart meter upgrades), and ensure compliance with regulations and standards (such as the "Verification Regulations for Power Metering Instruments" GB / T 17215). However, facing the rapidly increasing demand for verification, the existing verification production line resources of provincial and regional metering centers are severely insufficient, making it difficult to achieve efficient and timely verification responses.
[0017] Therefore, developing an innovative method to effectively improve the verification efficiency of power metering equipment is urgently needed. This method should alleviate the current shortage of verification resources (such as shortening scheduling delays), ensure the accuracy and reliability of metering equipment, and thus support the sustainable development of the power industry.
[0018] To improve the efficiency of electricity metering equipment verification, the power grid has successfully developed and put into operation the world's first automated electricity meter verification line through independent innovation, achieving a triple leap in verification mode: First, from decentralized to centralized: integrating verification resources from multiple locations, reducing management costs by more than 30%; Second, from manual to automated: widely applying robotic arms and sensor technology, reducing manual intervention by 90%; Third, from offline to online: relying on the Internet of Things (IoT) to achieve remote monitoring, comprehensively improving the standardization level of the verification process.
[0019] This automated production line significantly improved basic verification efficiency, reduced labor costs, and ensured the accuracy of the verification process. However, the system still has fundamental bottlenecks, mainly reflected in the reliance on manual scheduling and the limitations of existing intelligent algorithms: Manual scheduling is inefficient: the current scheduling order relies heavily on human experience, which is highly uncertain and has an error rate of about 15%. Non-optimal scheduling can extend the verification cycle by 25%, which not only wastes manpower but also makes it difficult to respond flexibly to fluctuations in demand.
[0020] Existing intelligent algorithms have obvious shortcomings: High response latency: For example, genetic algorithms require multiple rounds of iterative optimization, with an average response time exceeding 8 minutes, making rapid scheduling impossible; weak robustness to disturbances: The algorithm has poor adaptability to sudden situations such as line failures and emergency order insertions, with a default rate exceeding 20%; insufficient scalability: The computational complexity of the algorithm increases exponentially with the amount of work. When the number of devices to be inspected exceeds 10,000, the scheduling failure rate reaches as high as 40%.
[0021] While various flexible scheduling methods exist (such as heuristic rules and queuing models), they generally suffer from long processing times and low flexibility. In the field of power metering equipment verification, no mature solution has yet emerged that can systematically improve efficiency. This invention, by introducing an innovative framework, aims to effectively address these challenges and promote further technological upgrades in the power metering industry.
[0022] Exemplary solution In view of this, embodiments of this application provide a scheduling scheme for the verification tasks of power metering equipment. This scheme involves defining and issuing a first verification task, wherein the first verification task has corresponding task information; based on the task information, the first verification task is classified to obtain a second verification task, wherein the second verification task includes a third verification task with specified conditions and a fourth verification task without specified conditions; in response to the third verification task, the third verification task is scheduled according to its task information and a preset scheduling strategy; in response to the fourth verification task, the fourth verification task is scheduled according to its task information and a reinforcement learning algorithm. This improves the efficiency of task scheduling and thus enhances verification efficiency.
[0023] The specific embodiments of this application will now be described in detail with reference to the accompanying drawings.
[0024] Figure 1 An exemplary flowchart of a scheduling method for power metering equipment verification tasks according to some embodiments of this application is shown.
[0025] As shown in the figure, in step S110, a first verification task is defined and issued; wherein the first verification task has corresponding task information; in step S120, based on the task information, the first verification task is classified to obtain a second verification task, wherein the second verification task includes a third verification task with specified conditions and a fourth verification task without specified conditions; in step S130, in response to the second verification task being a third verification task, the third verification task is scheduled according to the task information of the third verification task and a preset scheduling strategy; in step S140, in response to the second verification task being a fourth verification task, the fourth verification task is scheduled according to the task information of the fourth verification task and a reinforcement learning algorithm.
[0026] In some embodiments, the “first verification task” mentioned above refers to one or more tasks for verifying the power metering equipment. Performing one or more tasks for verifying the power metering equipment is to ensure that the power metering equipment meets relevant standards, thereby improving the power supply service quality of the power system.
[0027] In step S110, defining the first verification task includes, but is not limited to: defining or determining the task information of the verification task, wherein the task information includes at least one of the following: the task execution production line or area, the task priority, and the expected completion time of the task.
[0028] The aforementioned "task execution line or area" refers to the specific area or line on which the verification task is performed. Here, "verification line" refers to a physical verification unit or system, typically an automated production line, including but not limited to robotic arms, conveyor belts, and various testing stations, used for testing or verifying power metering equipment. "Task priority" refers to the priority of the verification task execution. A higher priority indicates a more urgent task that needs to be executed first. "Expected task completion time" includes the user's expectation of the verification task being completed within a specific timeframe or time period.
[0029] Furthermore, after defining the first verification task, it is also necessary to issue the first verification task. It should be noted that there may be one or more first verification tasks that do not have any task information, that is, the first verification task does not specify the "task execution line or area", "task priority" and "expected task completion time" mentioned above.
[0030] In some embodiments, in step S120, the first verification task is classified based on the task information to obtain the second verification task. Specifically, this includes: sorting the first verification task according to the priority of the corresponding task. The resulting sequence or sorting result of the first verification task can be referred to as the "second verification task".
[0031] In other embodiments, step S120, which involves classifying the first verification task based on task information to obtain the second verification task, may further include: Based on whether there are specified conditions for the first verification task, the first verification task is divided into a third verification task with specified conditions and a fourth verification task without specified conditions.
[0032] Here, "a third verification task with specified conditions" refers to one or more first verification tasks that specify or define the task execution line or area and / or the expected completion time of the task. Specifying or defining the task execution line or area means specifying or limiting which verification line or area must perform the verification task. Specifying or defining the expected completion time of the task means specifying the expected completion time of the verification task, specifically including verification tasks that specify a specific time before completion or verification tasks that specify a time period before completion.
[0033] The aforementioned “unspecified fourth verification task” refers to one or more first verification tasks for which the task execution line or area and the expected completion time are not specified or defined.
[0034] It should be noted that the aforementioned second verification task refers to the processing result after dividing, organizing, or classifying the first verification task. There is no substantial difference in the content of the first and second verification tasks.
[0035] In some embodiments of this application, in step S130, if the current verification task is a third verification task, it is necessary to schedule the third verification task according to its task information and a preset scheduling strategy. Specifically, the scheduling of verification tasks refers to assigning the verification task to the corresponding verification line for execution, and / or allocating the corresponding task execution time. It should also be noted that the scheduling of verification tasks can also be referred to as task "scheduling." In the embodiments of this application, the preset scheduling strategy refers to a preset strategy for scheduling the third verification task. The preset scheduling strategy includes, but is not limited to, splitting the third verification task and assigning it to various verification lines, or having the verification line stop executing the current verification task and execute the third verification task. The preset scheduling strategy can also be set by the user.
[0036] Step S130 enables the scheduling of a third verification task that specifies a particular verification line and / or the expected completion time of the task, thereby accelerating the execution efficiency of the verification task and achieving effective scheduling and allocation of the verification task while meeting its specific specified conditions.
[0037] In some embodiments, the third verification task includes a fifth verification task that specifies both the task completion time and the verification line, a sixth verification task that specifies only the task completion time, and a seventh verification task that specifies only the verification line.
[0038] Here, "fifth verification task" refers to one or more verification tasks that specify a completion time and a verification line; "sixth verification task" refers to a verification task that only specifies a completion time but does not specify a verification line; and "seventh verification task" refers to a verification task that only specifies a verification line but does not specify a completion time.
[0039] In some embodiments, in response to the third verification task being the fifth verification task, the verification line specified for the fifth verification task is the fifth specified verification line, and the task completion time specified for the fifth verification task is the fifth specified time.
[0040] Figure 2 An exemplary flowchart illustrating a method for scheduling a third verification task according to some embodiments of this application is shown. It is understood that the method for scheduling the third verification task is a specific implementation of step S130 described above; therefore, the preceding text, in conjunction with... Figure 1 The described features can be applied similarly here.
[0041] As shown in the figure, the scheduling process for the third verification task specifically includes: in step S131, in response to the number of the fifth designated verification line being one, determining whether the fifth verification task can be executed on the fifth designated verification line and can be completed within the fifth designated time; if yes, in step S132, the fifth verification task is assigned to the fifth designated verification line for execution; if no, in step S133, the fifth verification task is inserted into the waiting queue corresponding to the fifth designated verification line so that the fifth verification task can be completed within the fifth designated time.
[0042] In some embodiments, the fifth verification task is assigned to one or more verification lines, meaning the fifth verification task needs to be performed on a designated verification line. For ease of discussion, the verification line to which the fifth verification task is assigned will be referred to as the "fifth designated verification line," and the task completion time assigned to the fifth verification task will be referred to as the "fifth designated time." In step S131, if the number of fifth designated verification lines is one, meaning the fifth verification task is assigned to one verification line, it is necessary to determine whether the fifth verification task can be performed on the fifth designated verification line and can be completed within the fifth designated time. If so, step S132 is executed, that is, the fifth verification task is assigned to the queue to be inspected corresponding to the fifth designated verification line. The aforementioned "queue to be inspected" refers to the queue composed of verification tasks that need to be performed on the verification line, which are usually arranged according to the order of execution. If not, proceed to step S133, which involves delaying some of the verification tasks being performed in the queue to be inspected corresponding to the fifth designated verification line, and inserting the fifth verification task into the queue to be inspected corresponding to the fifth designated verification line, so that the fifth verification task is completed within the fifth designated time.
[0043] Step S130 further includes: In step S134, in response to the number of fifth designated verification lines being greater than one, the fifth verification task is split according to the load and capacity of the fifth designated verification line. Here, the "capacity of the fifth designated verification line" refers to the number of power metering devices that the fifth designated verification line can verify within a unit of time. The split fifth verification task is referred to as a "fifth verification sub-task". After obtaining multiple fifth verification sub-tasks, the multiple fifth verification sub-tasks are inserted into the inspection queue corresponding to the fifth designated verification line according to the capacity of the fifth designated verification line. Specifically, the multiple fifth verification sub-tasks can be allocated to the corresponding fifth designated verification line according to the ratio of the capacity of the multiple fifth designated verification lines.
[0044] For example, suppose the fifth verification task is to verify X electrical metering devices, X=19, and there are three fifth designated verification lines, namely verification line A, verification line B and verification line C; the production capacity of each verification line A, verification line B and verification line C is a, b and c (unit: devices / hour), a=3, b=2, c=1, and the completion time of the final verification task of each of the three fifth designated verification lines is t1, t2 and t3 (unit: hours), where t1<t2<t3, t2-t1=1, t3-t2=2.
[0045] Under the above conditions, calculate the number of tasks corresponding to the fifth verification task that verification line A and verification line B can complete before t3: The number of tasks that verification line A can complete before t3 is: a × (t3 - t2 + t2 - t1) = 3 × (1 + 2) = 9; the number of tasks that verification line B can complete before t3 is: b × (t2 - t1) = 2 × 2 = 4. Next, calculate the remaining unallocated verification task quantity: 19 - 9 - 4 = 6. Then, allocate the remaining unallocated verification task quantity according to the ratio of the production capacity of each of verification lines A, B, and C. Specifically, since a:b:c = 3:2:1, the remaining unallocated verification task quantity is allocated according to the above ratio, that is, verification line A is allocated 3 verification tasks, verification line B is allocated 2 verification tasks, and verification line C is allocated 1 verification task.
[0046] Figure 3 An exemplary flowchart illustrating a method for scheduling a third verification task according to other embodiments of this application is shown. It can be understood that scheduling the third verification task is another specific implementation of step S130 described above; therefore, the preceding text, in conjunction with... Figure 1 The described features can be applied similarly here.
[0047] As shown in the figure, in some embodiments of this application, in response to the third verification task being the sixth verification task, the scheduling process of the third verification task according to the task information of the third verification task and the preset scheduling strategy (step S130) specifically includes: In step S135, the sixth verification task is divided into multiple sixth verification sub-tasks; in step S136, the multiple sixth verification sub-tasks are assigned to multiple verification lines according to the capacity and current load of the multiple verification lines, so that the sixth verification task is completed within the specified time corresponding to the sixth verification task.
[0048] In the above embodiments, the test line here refers to all available test lines. Since the sixth test task only specifies the task completion time and does not specify the test line, the sixth test task can be assigned to any test line.
[0049] It should also be noted that, in the embodiments of this application, "splitting" a verification task refers to dividing the multiple electronic measuring devices corresponding to the verification task into smaller ones, so that the number of electronic measuring devices corresponding to the resulting verification sub-tasks is smaller. However, if the number of electronic measuring devices corresponding to a certain verification task is one, then the verification task is not split.
[0050] In some embodiments of this application, the seventh verification task includes an eighth verification task that specifies only one verification line and a ninth verification task that instructs multiple verification lines. The aforementioned "eighth verification task" refers to a verification task that specifies only one verification line; in other words, this eighth verification task can only be executed on the specified verification line and cannot be executed on other verification lines. The aforementioned "ninth verification task" refers to a verification task that specifies multiple verification lines; in other words, this ninth verification task can only be executed on the specified multiple verification lines.
[0051] For ease of subsequent description, the test line specified for the eighth test task will be referred to as the eighth test line, and the test line specified for the ninth test task will be referred to as the ninth test line.
[0052] Figure 4 An exemplary flowchart illustrating a method for scheduling a third verification task according to another embodiment of this application is shown. It is understood that this method for scheduling a third verification task according to another embodiment is a specific implementation of step S130 described above; therefore, the preceding text, in conjunction with... Figure 1 The described features can be applied similarly here.
[0053] As shown in the figure, in response to the third verification task, which is the seventh verification task, the scheduling process for the third verification task based on the task information and the preset scheduling strategy (step S130) includes: In step S137, in response to the eighth verification task, the eighth verification task is added to the end of the queue to be inspected corresponding to the eighth verification line; in step S138, in response to the ninth verification task, the ninth verification task is split into multiple ninth verification sub-tasks, and the multiple ninth verification sub-tasks are allocated to multiple ninth verification lines according to the capacity and current load of the multiple ninth verification lines.
[0054] Since the eighth verification task only specifies the verification line and does not specify a specific completion time, in step S137, the eighth verification task can be directly added to the end of the queue to be inspected corresponding to the eighth verification line, without having to insert the eighth verification task into the middle part of the queue to be inspected.
[0055] In the embodiments of this application, the ninth verification task is assigned to multiple verification lines, meaning the number of ninth verification lines is greater than one. In this case, the ninth verification task can be divided into multiple ninth verification sub-tasks, and each of the multiple ninth verification lines can execute multiple ninth verification sub-tasks based on the capacity and current load of the ninth verification lines. Here, the current load refers to the number of tasks currently being processed and / or planned to be processed by the ninth verification line.
[0056] Figure 5 An exemplary flowchart of a method for scheduling the fourth verification task according to an embodiment of this application is shown. It can be understood that the method for scheduling the fourth verification task is a specific implementation of step S140 described above; therefore, the preceding text, in conjunction with... Figure 1 The described features can be applied similarly here.
[0057] As shown in the figure, the reinforcement learning algorithm includes the Markov decision process algorithm. The scheduling process for the fourth verification task based on the task information and the reinforcement learning algorithm (step S140) includes: In step S141, the first scheduling strategy is initialized based on the historical scheduling process; in step S142, the state space is defined based on the current load of multiple verification lines, the remaining time window, the task quantity and task priority corresponding to the fourth verification task; in step S143, the action space is defined based on a limited number of scheduling processing methods, including the splitting, delaying and allocating of the fourth verification task; in step S144, a dynamic reward function is defined based on the resource utilization efficiency of multiple verification lines and the severity of the breach of the fourth verification task failing to complete according to the specified conditions; in step S145, a Markov decision process model is established based on the state space, action space and reward function; in step S146, the Markov decision process model is trained according to the preset state-action value function; in step S147, the scheduling processing method corresponding to the maximum value of the state-action value function is taken as the optimal scheduling strategy.
[0058] In the embodiments of this application, "historical scheduling process" refers to the set of historical strategies for allocating historical verification lines to various verification lines. In other words, the historical scheduling process is the set of all historical scheduling strategies. Here, "first scheduling strategy" refers to an initial scheduling or arrangement strategy for the fourth verification task, which needs to be continuously optimized based on the first scheduling strategy. Specifically, in step S141, initializing the first scheduling strategy based on the historical scheduling process can refer to randomly selecting any historical scheduling strategy from the historical scheduling process, or it can be based on various historical scheduling strategies to define a new scheduling strategy to obtain the "first scheduling strategy".
[0059] The "remaining time window" mentioned above refers to the length of time remaining from the current time until the deadline for the testing line to complete the most recent testing task. Here, "most recent testing task" refers to the testing task closest to the current time that the testing line has not yet completed. It should be noted that the "remaining time window" is greater than or equal to zero. If the testing line has already completed all testing tasks before the current time, then the remaining time window for that testing line is zero.
[0060] In step S142, a state space s={L1, L2, ..., Ln, T, P} is defined based on the current load, remaining time window, task quantity, and task priority of the fourth verification task for multiple verification lines. The above "L1, L2, ..., Ln" refers to the current load of the first to the nth verification line, T is the sequence of remaining time windows for each verification line, T={T1, T2, ..., Tn}, where T1, T2, ..., Tn can all be represented as percentages from 0 to 1, and P is the task priority corresponding to each fourth verification task or a subtask after the fourth verification task is broken down.
[0061] In step S143, the scheduling processing method refers to the specific process or method of scheduling the fourth verification task, including splitting, delaying, and allocating. The action space a = {assign(Lx), split(Lx,Ly), delay}. Here, assign() refers to the allocation action; assign(Lx) means assigning the verification task to the x-th verification line Lx; split(Lx,Ly) means splitting the fourth verification task and allocating it to the x-th verification line Lx and the y-th verification line Ly; delay means delaying the processing of the fourth verification task, rather than processing it immediately.
[0062] The aforementioned "resource utilization efficiency of the calibration line" specifically refers to the capacity utilization rate of the calibration line. The resource utilization efficiency of the calibration line is calculated as: Utilization = (Number of actually completed calibration equipment / Theoretical maximum calibration quantity) × 100%. The aforementioned "severity of breach of contract for failing to complete the fourth calibration task according to specified conditions" refers to the severity and impact of the consequences of "failure to complete the task according to pre-established standards, requirements, or terms." Specifically, the severity of the breach of contract for failing to complete the fourth calibration task according to specified conditions can be expressed based on the economic losses, safety impacts, and risks caused by "failure to complete the task according to pre-established standards, requirements, or terms." These specified conditions include completing the calibration task on time and / or performing the calibration task on the designated calibration line.
[0063] In some embodiments, the severity of the breach of a failure to meet specified conditions. Among them, priority i This indicates the task priority corresponding to the i-th fourth verification task or fourth verification subtask; max() represents the maximum value function, which outputs the maximum value among the parameters in parentheses; rt i et represents the actual completion time corresponding to the i-th fourth verification task or fourth verification subtask. i This represents the estimated or required completion time for the i-th fourth verification task or fourth verification subtask.
[0064] In step S144, a dynamic reward function R=α / is defined based on the resource utilization efficiency of the multiple inspection lines and the severity of the breach in the fourth inspection task failing to be completed according to the specified conditions. +β·Utilization-γ·BreachCount, where α, β, and γ are custom dynamic weights, all of which are greater than zero. Specifically, α represents the time weight associated with task completion time, β represents the utilization efficiency weight associated with the resource utilization efficiency of the inspection line, and γ represents the weight associated with the severity of the breach.
[0065] It is understandable that if α is larger, it means that the scheduling strategy for the fourth verification task pays more attention to the task completion time; that is, the shorter the task completion time, the larger the output value of the reward function. If β is larger, it means that the scheduling strategy for the fourth verification task pays more attention to the resource utilization efficiency of the verification line; that is, the higher the resource utilization efficiency of the assigned verification line, the larger the output value of the reward function. If γ is larger, it means that the scheduling strategy for the fourth verification task pays more attention to the severity of the breach. Since γ is greater than zero in the reward function and the coefficient before γ is "-1", the lower the severity of the breach, the larger the output value of the reward function.
[0066] It should be noted that a Markov decision process model refers to a mathematical framework or model used to model how an agent makes decisions in an environment. This model typically includes states, actions, state transition probabilities, and a reward function. The "state" mentioned above represents the state of the environment at a given moment. For example, in chess, the state is the position of all pieces on the board; in autonomous driving, the state is the environment around the vehicle, its speed, and its location. The set of all possible states is denoted as S. The "action" mentioned above represents the behavior that the agent can take in each state. For example, moving a piece in chess, or pressing the accelerator or brake in autonomous driving. The "state transition probability" mentioned above refers to the probability that the environment will transition to a new state s' after taking an action a in a state s. The "reward function" mentioned above refers to the immediate feedback, i.e., a reward (or penalty), that the environment provides after the agent performs an action. This reward indicates whether taking action a in state s and entering state s' is a good or bad outcome. The ultimate goal of the agent is to maximize the total reward accumulated over the long term. In the embodiments of this application, "action" refers to a specific scheduling method.
[0067] In step S145, a Markov decision process model is established based on the state space, action space, and reward function described above. The establishment process of the Markov decision process model employs a Markov chain reinforcement learning approach, which will not be elaborated upon here.
[0068] In the embodiments of this application, the state-action value function Q(s,a) refers to the expected cumulative reward that can be obtained by taking a certain action a in state s. The initial value is usually set to 0 or a random number; the state-action value function is dynamically updated during iteration. Specifically, Q(s,a) += η[R+ ].
[0069] η is the learning rate, used to control the step size of each update of the state-action value function. The value of η is usually a decimal between 0 and 1, generally between 0.1 and 0.5, to avoid oscillations caused by excessively large values and slow convergence caused by excessively small values. When η=0, it means that the state-action value function is not updated; when η=1, it means that the old state-action value function value is directly replaced with the new state-action value function value. R refers to the reward function mentioned earlier, specifically representing the reward value obtained after the state space s performs an action or scheduling method a. Here, scheduling method a refers to the specific scheduling, allocation, or strategy for scheduling the fourth check task. A positive reward value means that the behavior or scheduling method is encouraged; a negative reward value means that the behavior or scheduling method is discouraged. This refers to the discount factor, which is used to measure the importance of future rewards. In addition, the discount factor also has the following functions: First, for mathematical convenience, in Markov processes with cyclic structures, it is possible to avoid falling into infinite loops and achieve convergence. Second, as time goes on, the uncertainty of long-term benefits increases, which aligns with human pursuit of immediate gains.
[0070] a' refers to the set of possible future actions or scheduling strategies, and s' refers to the next state space that the environment transitions to after executing scheduling mode a, such as the state of the inspection line after the load is updated; or the state of the queue to be inspected after changes. It is the maximum future value function, used to represent the maximum Q value for all possible actions a' in the new state space s', which represents the optimal future reward starting from s'.
[0071] In step S146, the process of training or inferring the Markov decision process model includes: assigning the fourth testing task to each testing line according to the current scheduling policy, updating the state space, and obtaining the value of the reward function corresponding to the selected scheduling policy, wherein the initial current scheduling policy is the first scheduling policy; updating the current cumulative reward or gain, i.e., updating the state-action value function, based on the value of the reward function, the learning rate, the discount factor, and the maximum future value function; and repeating the above process until all finite scheduling policies are used to schedule the fourth testing task. It should be noted that since the testing lines are finite, the smallest unit of a split testing line is a positive number greater than one. In other words, the number of testing lines is always an integer; there will be no decimals or further splitting of the number corresponding to a single testing line. Therefore, the number of scheduling policies is finite, and there will not be an infinite number of scheduling policies.
[0072] After the iterative training described above, in step S147, the scheduling method corresponding to the state-action value function reaching its maximum value is taken as the optimal scheduling strategy. When the state-action value function reaches its maximum value, it means that the overall execution efficiency reward or benefit is maximized when using this scheduling method. This scheduling method can improve the efficiency of the verification task execution, and therefore it is taken as the optimal scheduling strategy.
[0073] It should also be noted that the state-action value function has a corresponding confidence level, which can be obtained through commonly used models or methods in this field, or it can be judged based on human experience. If the confidence level is less than the confidence threshold, such as 0.85, it means that the state-action value function cannot accurately represent the reward or benefit of the scheduling strategy for the efficiency of the evaluation task. In this case, manual intervention can be used to set scheduling rules to ensure the reliability of the scheduling.
[0074] Furthermore, since the weights in the reward function of this application are dynamically adjustable, with α, β, and γ being custom dynamic weights, their specific values can be adjusted during training or inference to better focus on task execution efficiency, resource utilization efficiency of the verification line, and severity of breaches. This allows for more flexible scheduling of verification tasks to meet different needs, thereby improving execution efficiency and resource utilization. It also further conforms to verification conventions. Specifically, embodiments of this application can receive execution or scheduling data of verification tasks through line sensors and further adjust the dynamic weights in the reward function based on the received execution or scheduling data.
[0075] The embodiments of this application provide different scheduling methods or strategies for different types of verification tasks, further improving system utilization. Furthermore, the updater for the aforementioned iterative updates is deployed at the edge nodes of the metrology center, thereby reducing the scheduling decision latency to the millisecond level.
[0076] Based on the task information, the first verification task is classified to obtain a second verification task, wherein the second verification task includes a third verification task with specified conditions and a fourth verification task without specified conditions; in response to the third verification task, the third verification task is scheduled according to the task information of the third verification task and a preset scheduling strategy; in response to the fourth verification task, the fourth verification task is scheduled according to the task information of the fourth verification task and a reinforcement learning algorithm, which can improve the efficiency of task scheduling and scheduling, thereby improving the verification efficiency.
[0077] Figure 6 An exemplary structural block diagram of a scheduling device for power metering equipment verification tasks according to an embodiment of this application is shown.
[0078] As shown in the figure, the scheduling device 600 for the verification task of power metering equipment includes: a processor 610 configured to execute program instructions; and a memory 620 configured to store the program instructions, which, when loaded and executed by the processor, cause the device to perform the method described above.
[0079] This application also provides a computer storage medium storing a computer program. When the program is executed by a processor, it implements the method described above, which will not be described in detail here.
[0080] While numerous embodiments of this application have been shown and described herein, it will be apparent to those skilled in the art that such embodiments are provided by way of example only. Many modifications, alterations, and alternatives will arise for those skilled in the art without departing from the spirit and intent of this application. It should be understood that various alternatives to the embodiments of this application described herein may be employed in the practice of this application. The appended claims are intended to define the scope of protection of this application and therefore cover equivalents or alternatives within the scope of these claims.
Claims
1. A scheduling method for power metering equipment calibration tasks, characterized in that, include: Define and issue the first verification task; wherein the first verification task has corresponding task information; Based on the task information, the first verification task is classified to obtain the second verification task, wherein the second verification task includes a third verification task with specified conditions and a fourth verification task without specified conditions. In response to the second verification task being the third verification task, the third verification task is scheduled and processed according to the task information of the third verification task and the preset scheduling strategy. In response to the second verification task being the fourth verification task, the fourth verification task is scheduled and processed according to the task information of the fourth verification task and the reinforcement learning algorithm.
2. The scheduling method for power metering equipment calibration tasks according to claim 1, characterized in that, The task information includes at least one of the following: the task execution production line or region, the task priority, and the expected task completion time.
3. The scheduling method for power metering equipment calibration tasks according to claim 2, characterized in that, The method further includes: The second verification task is scheduled according to the task priority.
4. The scheduling method for the verification task of power metering equipment according to claim 1 or 2, characterized in that, The third verification task includes a fifth verification task that specifies both the task completion time and the verification line, a sixth verification task that specifies only the task completion time, and a seventh verification task that specifies only the verification line.
5. The scheduling method for power metering equipment calibration tasks according to claim 4, characterized in that, The third verification task is referred to as the fifth verification task, wherein the verification line designated for the fifth verification task is the fifth designated verification line, and the task completion time designated for the fifth verification task is the fifth designated time. The scheduling process for the third verification task based on the task information of the third verification task and a preset scheduling strategy includes: In response to the fact that the number of the fifth designated inspection line is one, it is determined whether the fifth inspection task can be performed on the fifth designated inspection line and can be completed within the fifth designated time. If so, the fifth verification task shall be assigned to the fifth designated verification line for execution; If not, the fifth verification task is inserted into the queue to be inspected corresponding to the fifth designated verification line, so that the fifth verification task is completed within the fifth designated time. In response to the fact that the number of the fifth designated inspection line is greater than one, the fifth inspection task is split into multiple fifth inspection sub-tasks according to the load and capacity of the fifth designated inspection line; according to the capacity of the fifth designated inspection line, the multiple fifth inspection sub-tasks are inserted into the inspection queue corresponding to the fifth designated inspection line.
6. The scheduling method for power metering equipment calibration tasks according to claim 4, characterized in that, In response to the third verification task being the sixth verification task, wherein scheduling the third verification task according to the task information of the third verification task and a preset scheduling strategy includes: The sixth verification task is divided into multiple sixth verification sub-tasks; Based on the capacity and load of the multiple testing lines, multiple sixth testing sub-tasks are assigned to the multiple testing lines so that the sixth testing task is completed within the specified time corresponding to the sixth testing task.
7. The scheduling method for power metering equipment calibration tasks according to claim 4, characterized in that, The seventh verification task includes an eighth verification task that specifies only one verification line and a ninth verification task that instructs multiple verification lines, wherein the verification line specified by the eighth verification task is the eighth verification line, and the verification line specified by the ninth verification task is the ninth verification line. In response to the third verification task being the seventh verification task, wherein scheduling the third verification task according to the task information of the third verification task and a preset scheduling strategy includes: In response to the eighth verification task, the eighth verification task is added to the end of the queue to be inspected corresponding to the eighth verification line. In response to the ninth verification task, the ninth verification task is divided into multiple ninth verification sub-tasks, and the multiple ninth verification sub-tasks are allocated to multiple ninth verification lines according to the capacity and current load of the multiple ninth verification lines.
8. The scheduling method for power metering equipment calibration tasks according to claim 1, characterized in that, The reinforcement learning algorithm mentioned above includes the Markov decision process algorithm, and the scheduling process of the fourth verification task based on the task information of the fourth verification task and the reinforcement learning algorithm includes: Initialize the first scheduling strategy based on the historical scheduling process; A state space is defined based on the current load of multiple verification lines, the remaining time window, the task quantity and task priority corresponding to the fourth verification task; The action space is defined based on a limited scheduling processing method, wherein the scheduling processing method includes the splitting, delaying and allocation of the fourth verification task; A dynamic reward function is defined based on the resource utilization efficiency of multiple inspection lines and the severity of the breach in the fourth inspection task failing to be completed under specified conditions. A Markov decision process model is established based on the state space, the action space, and the reward function. A Markov decision process model is trained based on a pre-defined state-action value function. The scheduling method corresponding to the state action value function reaching its maximum value is taken as the optimal scheduling strategy.
9. A scheduling device for the calibration task of power metering equipment, characterized in that, include: A processor, configured to execute program instructions; as well as A memory configured to store the program instructions, which, when loaded and executed by the processor, cause the apparatus to perform the method according to any one of claims 1-8.
10. A computer storage medium, wherein, The computer storage medium stores a computer program, which, when executed by a processor, implements the method according to any one of claims 1-8.