A method and system for task allocation management of full performance test of an electric energy meter
By constructing a resource status and dependency matrix, monitoring the status of electricity meter test resources in real time, and optimizing the allocation of tasks and resources, the problems of resource waste and task failure in the task allocation management of electricity meter tests are solved, and balanced resource use and fair task allocation are achieved.
Patent Information
- Application Number
- CN202510018684.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-01-07
AI Technical Summary
In the existing technology, the task allocation management of the full performance test of electricity meters lacks systematic and real-time monitoring, resource utilization lacks scientific rationality, task priority assessment is unreasonable, and resource allocation is inappropriate, resulting in task failure or waste.
By constructing a resource status matrix and a resource dependency matrix, the experimental resource status and dependency relationships are monitored in real time. The resource utilization calculation algorithm and priority evaluation algorithm are used, combined with the two-way matching priority calculation and task allocation balance optimization algorithm, to optimize the task and resource allocation matrix to prevent resource overload or idleness.
It achieves comprehensive perception and initialization of experimental resources, ensures scientific and rational resource utilization, dynamically considers resource availability, prevents resource waste and task failure, and improves the fairness and efficiency of task allocation.
Smart Images

Figure CN119415270B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of task allocation management, and in particular to a power meter full performance test task allocation management method and system. BACKGROUND
[0002] With the development of smart grids, the types and functions of power meters are becoming increasingly diverse. The complexity and multifunctionality of power meters make the content and process of full performance tests extremely complex. Traditional manual management methods cannot meet the accurate and automated needs of modern power systems for power meter testing and management. In order to achieve full performance testing of power meters through automated task allocation management, a power meter full performance test task allocation management system has emerged.
[0003] The power meter full performance test task allocation management system has important theoretical and practical significance for improving the quality and efficiency of power meter testing, reducing the cost and risk of power meter testing, and improving the traceability and transparency of power meter testing. With the continuous development of the power industry and the widespread promotion of smart grids, the power meter full performance test task allocation management system will play an increasingly important role in driving the power meter industry towards a smart and efficient future.
[0004] However, the above-mentioned technology has at least the following technical problems: The perception and initialization process of resource state relies on manual monitoring and manual recording, lacking systematic and real-time monitoring mechanisms; the lack of scientific and reasonable task allocation basis leads to blindness and randomness in resource utilization; the priority of tasks is set according to fixed rules or experience, lacking consideration of multi-dimensional factors, which may lead to unreasonable evaluation of task priority; the matching of tasks and resources lacks dynamic consideration of resource adaptability and actual availability, leading to inappropriate resource allocation to inappropriate tasks, resulting in task failure or resource waste; the lack of optimization mechanism for task allocation may lead to unreasonable task allocation. SUMMARY
[0005] The technical problem to be solved by the present application is to overcome the defects of the existing technology, and to provide a power meter full performance test task allocation management method and system. By constructing a resource state matrix and a resource dependency matrix, the present application realizes comprehensive perception and initialization of test resources. Through accurate resource state description, the present application ensures accurate grasp of the current state and mutual dependency of each test resource, avoiding resource waste and test task failure due to incomplete or incorrect information during task allocation. Through a task allocation balance optimization algorithm, the present application calculates and optimizes the allocation matrix between tasks and resources, aiming to achieve balanced use of resources, prevent resource overload or idling, and ensure fair allocation of tasks.
[0006] To this end, the present application adopts the following technical solutions.
[0007] In a first aspect, the present invention provides a method for allocating and managing tasks for a full performance test of an electric energy meter, comprising the steps of:
[0008] S1, by real-time monitoring and obtaining the state characteristics of the test resources and the dependency relationships between the test resources, construct a resource state matrix and a resource dependency matrix. Based on the resource state matrix and the resource dependency matrix, the initial utilization rate of the test resources is calculated using a resource utilization calculation algorithm;
[0009] S2, based on the initial utilization of experimental resources, the priority of the task is calculated using the priority evaluation algorithm;
[0010] S3, based on the initial utilization rate of experimental resources and the priority of tasks, a two-way matching priority calculation algorithm is used to calculate the matching priority between tasks and experimental resources. A preliminary decision on task allocation is made based on the matching priority between tasks and experimental resources, and a task allocation matrix is constructed.
[0011] S4, based on the matching priority of tasks and resources and the task allocation matrix, uses the task allocation balance optimization algorithm to calculate the objective function. Based on the objective function, the task allocation is further optimized through the gradient descent method to calculate the updated task allocation matrix elements.
[0012] Furthermore, the S1 specifically includes: it is necessary to fully perceive and initialize the resource status in the test environment, and obtain the status characteristics of the test resources and the dependencies between the test resources through real-time monitoring; in order to systematically describe the status of the test resources, a resource status matrix is constructed, wherein the rows of the resource status matrix represent the test resources, the columns represent the status characteristics of the test resources, and each element Indicates the The first resource The value of each state feature ranges from 0 to 1;
[0013] At the same time, considering the mutual influence between experimental resources, in order to improve the rationality of experimental task allocation, a resource dependency matrix is constructed to describe the dependency relationship between experimental resources; each element in the resource dependency matrix Indicates the Experimental resources and The degree of dependency between experimental resources, ranging from 0 to 1.
[0014] Furthermore, in S1, the resource utilization calculation algorithm is based on the resource status matrix and the resource dependency matrix. According to the state characteristics in the resource status matrix, an initial weight value is set for each experimental resource to measure the current usage status of the experimental resource. The dependency between the experimental resources is identified in combination with the resource dependency matrix. Through the exponential function transformation, the impact of the dependency between the experimental resources on the initial utilization is attenuated. An adjustment factor is introduced to control the intensity of the impact of the dependency of the experimental resources on the initial utilization. The initial utilization is normalized so that it can be compared under different resources and different state quantities, ensuring that the value of the initial utilization is within a reasonable range.
[0015] Furthermore, in S2, the priority evaluation algorithm uses a logarithmic function to calculate the impact of the urgency of the task, avoiding excessive interference from extremely urgent tasks, while ensuring a certain priority for handling urgent tasks and enhancing the robustness of the electricity meter full performance test task allocation management system; the reciprocal form of the square root is used to calculate the impact of the time required for the task, and the reciprocal square root is used to enhance the priority of short-term tasks; by evaluating the matching degree between the resources required for the task and the currently available resources, it is ensured that the resource requirements can be met, and a resource requirement impact weight factor is introduced to balance the impact of the task resource requirements on the priority.
[0016] Furthermore, in S2, the calculation formula of the task priority is:
[0017]
[0018] in, Indicates the The priority of a task, that is, its priority among all pending tasks; Represents the weight coefficient, which is used to balance the impact of task urgency on priority; Indicates the The urgency of the task; Indicates that the logarithmic function is used to process the The urgency of each task to smooth out the impact of extreme values; Represents the time impact weight factor, which is used to balance the impact of task time on priority; Indicates the Time required for each task; Indicates the The reciprocal square root of the time required for each task is used to prioritize tasks with shorter processing times. Represents the resource demand impact weight factor, which is used to balance the impact of task resource demand on priority; Indicates the The resource requirements of the task, i.e. The amount of specific resources required for each task; represents the adaptability influence factor, represents the remaining availability of all resources suitable for the task; represents the adaptability of the task to the experimental resource, determines the rationality of the adaptive task of each resource, and is set according to the specific implementation scene.
[0019] Further, in the S3, based on the initial utilization rate of the experimental resource, the adaptability of the task to the experimental resource and the priority of the task, a bidirectional matching priority calculation algorithm is used to calculate the matching priority between the task and the experimental resource.
[0020] The bidirectional matching priority calculation algorithm evaluates the urgency and importance of the task by introducing the priority of the task, and the adaptability of the task to the experimental resource is used to judge whether the experimental resource is suitable for executing the task, so as to ensure that when the task is assigned, the task failure or resource waste caused by the assignment of unsuitable resources is avoided, the initial utilization rate of the experimental resource is used to calculate the resource remaining availability, and the actual availability of the resource is dynamically considered to improve the utilization efficiency; the introduction of the adjustment factor for balancing the priority of the task and the adaptability helps to flexibly adjust the task allocation strategy, further considers the sensitivity of the task to the average utilization of all adaptive resources, and adjusts the response degree of the matching priority to the dynamic demand of the resource through the adjustment parameter for enhancing the sensitivity of the task to the dynamic demand of the resource.
[0021] Further, in the S4, the task allocation balance optimization algorithm aims to optimize the task allocation process in the full performance test of the electric energy meter, maximize the efficiency and rationality of the task allocation by combining the matching priority of the task and the resource and the balance of resource utilization, and ensure that the test task can be executed under reasonable resource conditions; the balance of resource utilization considers the balanced use of each experimental resource, aims to prevent the experimental resource from being overused or idle, and measures by comparing the actual use of each resource with the ideal balanced use, ensures the fair allocation of tasks, and at the same time avoids the waste and overload of experimental resources.
[0022] Further, in the S4, the calculation formula of the objective function is:
[0023]
[0024] wherein, represents the objective function, aims to maximize the matching priority of the task and the resource and the balance of resource utilization at the same time; represents the number of tasks; represents the task and the Matching priority between test resources; denotes resource allocation matrix element, reflecting the preliminary decision of task allocation; denotes the first Test resource utilization balance factor, measure the balanced use of the first Test resource, prevent excessive use or idle test resources, ensure fair allocation of tasks, the formula is:
[0025]
[0026] Among them, denotes the number of tasks allocated to the first Test resource; Denotes the average number of tasks per resource in the ideal case.
[0027] Further, in the S4, the gradient descent method uses dynamic learning rate and momentum term to improve the convergence speed and the optimization ability of global optimal solution, the momentum term is based on the update direction of the previous iteration, part of the momentum is retained in the gradient descent process, which prevents falling into local optimal solution, and the adjustment of the dynamic learning rate is based on the number of iterations, and the learning rate gradually decreases with the increase of the number of iterations, which facilitates to quickly find an optimal solution.
[0028] In a second aspect, the present application provides a full performance test task allocation management system for electric energy meter, which comprises a resource state monitoring and initialization module, an initial utilization rate calculation module, a task priority evaluation module, a bidirectional matching priority calculation module, a task allocation matrix construction module and a task allocation optimization module.
[0029] The resource state monitoring and initialization module: by real-time monitoring and obtaining the state characteristics of test resources and the dependency relationship between test resources, constructing resource state matrix and resource dependency matrix, outputting the resource state matrix and resource dependency matrix to the initial utilization rate calculation module;
[0030] The initial utilization rate calculation module: based on the resource state matrix and resource dependency matrix of the resource state monitoring and initialization module, using resource utilization rate calculation algorithm to calculate the initial utilization rate of test resources, outputting the initial utilization rate of test resources to the task priority evaluation module and the bidirectional matching priority calculation module;
[0031] The task priority evaluation module: based on the initial utilization rate of test resources of the initial utilization rate calculation module, using priority evaluation algorithm to calculate the priority of tasks, outputting the priority of tasks to the bidirectional matching priority calculation module;
[0032] The bidirectional matching priority calculation module calculates the matching priority between the task and the test resource based on the initial utilization of the test resource calculated by the initial utilization calculation module and the priority of the task calculated by the task priority evaluation module.
[0033] The task allocation matrix construction module makes a preliminary decision on task allocation based on the matching priority between the task and the test resource calculated by the bidirectional matching priority calculation module, constructs a task allocation matrix, and outputs the task allocation matrix to the task allocation optimization module.
[0034] The task allocation optimization module calculates a target function by using a task allocation balance optimization algorithm based on the matching priority between the task and the resource calculated by the bidirectional matching priority calculation module and the task allocation matrix constructed by the task allocation matrix construction module, further optimizes the task allocation by using a gradient descent method based on the target function, calculates updated task allocation matrix elements, and outputs the updated task allocation matrix elements to the task allocation matrix construction module.
[0035] The present application has the beneficial effects that:
[0036] 1. By monitoring and obtaining the state characteristics of the test resources and the dependency relationship between the resources in real time, the resource state matrix and the resource dependency matrix are constructed, the comprehensive perception and initialization of the test resources are realized, the current state and the mutual dependency relationship of each test resource are accurately mastered through the accurate resource state description, and therefore the waste of resources and the failure of test tasks caused by incomplete or incorrect information during task allocation are avoided.
[0037] 2. Based on the resource state matrix and the resource dependency matrix, the initial utilization of the test resources is calculated by using a resource utilization calculation algorithm, the influence of the dependency relationship between the resources on the utilization is scientifically quantified, and normalization processing is performed, so that the utilization under different resource states and different quantities is comparable, and the scientificity and rationality of resource allocation are significantly improved.
[0038] 3. Based on the initial utilization of the test resources, the adaptability of the task to the test resources, and the priority of the task, the matching priority between the task and the resource is evaluated by using a bidirectional matching priority calculation algorithm, and the actual availability of the resource is dynamically considered.
[0039] 4. The allocation matrix between the task and the resource is calculated and optimized by using a task allocation balance optimization algorithm, so as to realize the balanced use of the resource, prevent the resource from being overloaded or idle, ensure the fair allocation of the task, further improve the convergence speed of the task allocation decision and the optimization ability of the global optimal solution by using a gradient descent method, and therefore the resource utilization efficiency and the task allocation completion degree are maximized. BRIEF DESCRIPTION OF DRAWINGS
[0040] Figure 1 A structure diagram of a power meter full performance test task allocation management system according to the present application;
[0041] Figure 2 A flow chart of a power meter full performance test task allocation management method according to the present application. DETAILED DESCRIPTION
[0042] In order to further clarify the technical means and effects taken by the present application to achieve the predetermined object of the application, the technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs.
[0044] The specific scheme of a power meter full performance test task allocation management system provided by the present application will be specifically described below in conjunction with the drawings.
[0045] Referring to the drawings Figure 1 It shows a structure diagram of a power meter full performance test task allocation management system provided by an embodiment of the present application, which includes the following parts: a resource state monitoring and initialization module, an initial utilization rate calculation module, a task priority evaluation module, a bidirectional matching priority calculation module, a task allocation matrix construction module and a task allocation optimization module.
[0046] The resource state monitoring and initialization module: by monitoring and acquiring the state characteristics of the test resources and the dependency relationship between the test resources in real time, a resource state matrix and a resource dependency matrix are constructed, and the resource state matrix and the resource dependency matrix are output to the initial utilization rate calculation module.
[0047] The initial utilization rate calculation module: based on the resource state matrix and the resource dependency matrix of the resource state monitoring and initialization module, the initial utilization rate of the test resources is calculated using a resource utilization rate calculation algorithm, and the initial utilization rate of the test resources is output to the task priority evaluation module and the bidirectional matching priority calculation module.
[0048] The task priority evaluation module calculates the initial utilization of the test resources based on the initial utilization calculation module, calculates the priority of the task using a priority evaluation algorithm, and outputs the priority of the task to the bidirectional matching priority calculation module.
[0049] The bidirectional matching priority calculation module calculates the matching priority between the task and the test resources using a bidirectional matching priority calculation algorithm based on the initial utilization of the test resources of the initial utilization calculation module and the priority of the task of the task priority evaluation module.
[0050] The task allocation matrix construction module makes a preliminary decision on task allocation based on the matching priority between the task and the test resources of the bidirectional matching priority calculation module, constructs a task allocation matrix, and outputs the task allocation matrix to the task allocation optimization module.
[0051] The task allocation optimization module calculates a target function using a task allocation balance optimization algorithm based on the matching priority between the task and the resources of the bidirectional matching priority calculation module and the task allocation matrix of the task allocation matrix construction module, further optimizes the task allocation by an improved gradient descent method based on the target function, calculates updated task allocation matrix elements, and outputs the updated task allocation matrix elements to the task allocation matrix construction module.
[0052] Referring to the drawings Figure 2 , which shows a flow chart of a full performance test task allocation management method for an electric energy meter according to an embodiment of the present application, the method comprises the following steps:
[0053] S1, by real-time monitoring and acquiring the state characteristics of the test resources and the dependency relationship between the test resources, constructing a resource state matrix and a resource dependency matrix, calculating the initial utilization of the test resources using a resource utilization calculation algorithm based on the resource state matrix and the resource dependency matrix.
[0054] In the full performance test task allocation management system for electric energy meters, the resource state in the test environment needs to be comprehensively perceived and initialized, and the state characteristics of the test resources and the dependency relationship between the test resources are acquired by real-time monitoring.
[0055] In order to systematically describe the state of the test resources, a resource state matrix is constructed , wherein the rows of the resource state matrix represent the test resources, the columns represent the state characteristics of the test resources, and each element represents the state of the th resource The value of each state feature ranges from 0 to 1;
[0056] At the same time, considering the mutual influence between experimental resources, in order to improve the rationality of experimental task allocation, a resource dependency matrix is constructed. , to describe the dependency relationship between experimental resources; each element in the resource dependency matrix Indicates the Experimental resources and The degree of dependency between experimental resources, ranging from 0 to 1.
[0057] In order to understand the usage status and load of experimental resources in real time and ensure that the decision-making basis for task allocation is scientific and reasonable, before allocating experimental tasks, the initial utilization rate of experimental resources is calculated using the resource utilization calculation algorithm based on the resource status matrix and resource dependency matrix. This can effectively avoid blindness and arbitrariness in task allocation and improve resource utilization efficiency.
[0058] The resource utilization calculation algorithm is based on the resource state matrix and the resource dependency matrix. According to the state characteristics in the resource state matrix, an initial weight value is set for each test resource to measure the current usage status of the test resource. The resource dependency matrix is combined to identify the dependencies between the test resources. Through exponential function transformation, the impact of the dependencies between the test resources on the initial utilization is attenuated. An adjustment factor is introduced to control the intensity of the impact of the test resource dependencies on the initial utilization. The initial utilization is normalized so that it can be compared under different resources and different state quantities, ensuring that the value of the initial utilization is within a reasonable range.
[0059] The calculation formula for the initial utilization rate of experimental resources is:
[0060]
[0061] in, Indicates the Initial utilization of experimental resources; Indicates the The first resource The value of each state feature ranges from 0 to 1; Indicates the Experimental resources and The degree of dependency between experimental resources ranges from 0 to 1; represents an exponential function used to convert the cumulative impact of experimental resource dependence into a decay factor, thereby affecting the initial utilization of experimental resources; represents the adjustment factor, which is used to control the impact of experimental resource dependencies on the initial utilization; Indicates the total number of experimental resources; total number of resource state features.
[0062] S2, based on the initial utilization rate of the test resource, using a priority evaluation algorithm to calculate the priority of the task.
[0063] In the allocation management of the full performance test task of the electric energy meter, the execution efficiency of the task directly affects the cycle and cost of the whole test, and reasonable task priority ranking is the key to ensure the timely completion of the test task. In order to improve the execution efficiency of the task, based on the initial utilization rate of the test resource, a priority evaluation algorithm is used to calculate the priority of the task.
[0064] The priority evaluation algorithm uses a logarithmic function to calculate the influence of the task urgency, avoids excessive interference of extremely urgent tasks, while ensuring a certain priority of processing urgent tasks, and enhances the robustness of the full performance test task allocation management system of the electric energy meter; The reciprocal of the square root is used to calculate the influence of the required time of the task, and the reciprocal of the square root is used to enhance the priority of the short-time task, which can quickly release resources and avoid resource waste caused by long-time task occupying resources, and improve the resource turnover efficiency of the full performance test task allocation management system of the electric energy meter; The matching degree of the required resources of the task and the current available resources is evaluated to ensure that the resource demand can be met, and a resource demand influence weight factor is introduced to balance the influence of task resource demand on priority, improve the rationality and effectiveness of task allocation.
[0065] The calculation formula of the priority of the task is:
[0066]
[0067] wherein, priority of the i-th task, i.e. the priority order in all tasks to be processed; weight coefficient, used to balance the influence of task urgency on priority; urgency of the i-th task; the urgency of the i-th task is processed by a logarithmic function to smooth the influence of extreme values; time influence weight factor, used to balance the influence of task required time on priority; required time of the i-th task; reciprocal square root of the required time of the i-th task, used to process tasks with short time in priority; resource demand influence weight factor, used to balance the influence of task resource demand on priority; resource demand of the i-th task; resource demand of the i-th task is processed by a logarithmic function to smooth the influence of extreme values; resource demand of the i-th task is processed by a logarithmic function to smooth the influence of extreme values; resource demand of the i-th task is processed by a logarithmic function to smooth the influence of extreme values; resource demand of the i-th task is processed by a logarithmic function to smooth the influence of extreme values; resource demand of the i-th task is processed by a logarithmic function to smooth the influence of extreme values; The resource requirements of the task, i.e. The amount of specific resources required for each task; Indicates the fitness impact factor, indicating all the factors that are suitable for the The remaining availability of resources for each task; Indicates the Task and The adaptability of each experimental resource is determined to determine the rationality of the adaptation task of each resource. , can be set according to the specific implementation scenario and is not limited here.
[0068] By using the priority evaluation algorithm to calculate the priority of the task, the relationship between the urgency of the task, the required time and resource requirements can be effectively balanced, thereby optimizing the task allocation management of the full performance test of the electricity meter.
[0069] S3. Based on the initial utilization rate of experimental resources, the compatibility between tasks and experimental resources, and the priority of tasks, a two-way matching priority calculation algorithm is used to calculate the matching priority between tasks and experimental resources. A preliminary decision on task allocation is made based on the matching priority between tasks and experimental resources, and a task allocation matrix is constructed.
[0070] The described two-way matching priority calculation algorithm evaluates the urgency and importance of tasks by introducing the priority of tasks. The compatibility between tasks and experimental resources is used to judge whether the experimental resources are suitable for executing tasks, ensuring that task failure or resource waste caused by incompatible resource allocation is avoided when allocating tasks. The initial utilization rate of experimental resources is used to calculate the remaining availability of resources, and the actual availability of resources is dynamically considered to improve utilization efficiency. The introduction of an adjustment factor that controls the balance between task priority and adaptability helps to flexibly adjust the task allocation strategy, further consider the sensitivity of tasks to the average utilization rate of all adapted resources, and adjust the responsiveness of matching priorities to dynamic resource demands by enhancing the adjustment parameters of the task's sensitivity to dynamic resource demands.
[0071] The calculation formula for the matching priority between tasks and experimental resources is:
[0072]
[0073] in, Indicates the Task and Matching priority between experimental resources; Indicates the The priority of a task, that is, its priority among all pending tasks; Indicates the Task and The suitability of the experimental resources; represents the initial utilization rate of the first experimental resource; represents the adjustment factor that controls the balance between task priority and adaptability, ; represents the adjustment parameter that enhances the sensitivity of task to resource dynamic demand, used to adjust the response degree of matching priority to resource dynamic demand, ; represents the sum of the utilization rates of all experimental resources adapted to the first task, used for dynamic adjustment of matching priority.
[0074] The preliminary decision of task allocation according to the matching priority between tasks and experimental resources ensures the rationality of task allocation, and constructs the task allocation matrix :
[0075] .
[0076] S4, based on the matching priority of tasks and resources and the task allocation matrix, the target function is calculated using the task allocation balance optimization algorithm, and based on the target function, the task allocation is further optimized by the improved gradient descent method, and the updated task allocation matrix elements are calculated.
[0077] The task allocation balance optimization algorithm aims to optimize the task allocation process in the full performance test of electric energy meter, maximize the efficiency and rationality of task allocation by combining the matching priority of tasks and resources and the balance of resource utilization, and ensure that the test tasks can be executed under reasonable resource conditions;
[0078] The balance of resource utilization considers the balanced use of each experimental resource, aims to prevent the overuse or idling of experimental resources, and measures by comparing the actual use of each resource with the ideal balanced use, ensures the fair allocation of tasks, and avoids the waste and overload of experimental resources.
[0079] The calculation formula of the target function is:
[0080]
[0081] Where, represents the target function, aiming to maximize the matching priority of tasks and resources and the balance of resource utilization at the same time; represents the number of tasks; represents the matching priority between the first task and the first experimental resource; represents the resource allocation matrix element, reflecting the preliminary decision of task allocation; represents the first test resource utilization balance factor, measures the balanced use degree of the first test resource, prevents excessive use or idling of test resources, and ensures fair allocation of tasks, and the calculation formula is:
[0082]
[0083] wherein, represents the number of tasks allocated to the first test resource; represents the average number of tasks per resource in the ideal case.
[0084] The improved gradient descent method uses a dynamic learning rate and a momentum term to improve the convergence speed and the optimization ability of the global optimal solution. The momentum term is based on the update direction of the previous iteration, and part of the momentum is retained during the gradient descent process to prevent falling into a local optimal solution. The adjustment of the dynamic learning rate is based on the number of iterations, and the learning rate gradually decreases with the increase of the number of iterations, which facilitates the rapid finding of an optimal solution.
[0085] The calculation formula of the updated task allocation matrix element is:
[0086]
[0087] wherein, and respectively represent the first iteration and the first iteration, the first task is allocated to the first test resource, i.e. the updated task allocation matrix element; represents the momentum at the first iteration, which helps to accelerate convergence, and the specific calculation method is a technical means familiar to those skilled in the art, which will not be repeated here; represents the partial derivative of the objective function with respect to the resource allocation matrix element, reflecting the influence of the first task allocated to the first test resource on the objective function, guiding the update direction and amplitude of the task allocation matrix; represents the learning rate at the first iteration, which is used to control the step size of gradient update, and the calculation formula is:
[0088]
[0089] wherein, represents the initial learning rate, which can be set according to the specific implementation scenario, and is not limited here; represents an adjustment factor that adjusts the decay rate of the learning rate.
[0090] The termination condition of the optimization task allocation is that the variation of the objective function is less than a set threshold :
[0091]
[0092] wherein, and represent the objective function at the i-th iteration and at the j-th iteration, respectively; represents a set threshold, which can be set according to specific implementation scenarios, and is not limited herein.
[0093] The above-mentioned power meter full performance test task allocation management method is applied as follows.
[0094] The application has the following test resources:
[0095] Test bench positions: 2 (test bench 1, test bench 2)
[0096] Operators: 2 (operator 1, operator 2)
[0097] In order to systematically describe the state of the test resources, a resource state matrix is constructed as follows:
[0098]
[0099] wherein, represents the occupancy state of the test bench 1 as ; represents the expected release time as ; represents the occupancy state of the test bench 2 as ; represents the expected release time as ; represents the occupancy state of the operator 1 as ; represents the expected release time as ; represents the occupancy state of the operator 2 as ; represents the occupancy state of the operator 2 as ;
[0100] At the same time, considering the mutual influence between the test resources, in order to improve the rationality of the test task allocation, a resource dependency matrix is constructed as follows:
[0101]
[0102] Wherein, the row and column of the resource dependency matrix represent different test resources (test bench 1, test bench 2, operator 1, operator 2) respectively, the value on the diagonal line is 1, indicating that each resource is completely dependent on itself, and the value of the non-diagonal element reflects the mutual dependency between resources, the greater the value, the stronger the dependency;
[0103] The calculation formula of the initial utilization rate of the test resource is:
[0104]
[0105] Let the adjustment factor be The initial utilization rate of test bench 1 is:
[0106]
[0107]
[0108] Similarly,
[0109]
[0110]
[0111] Based on the initial utilization rate of the test resource, the priority of the task is calculated using the priority evaluation algorithm;
[0112] The calculation formula of the priority of the task is:
[0113]
[0114] Suppose there are tasks as follows:
[0115] Task 1: Urgency , required time hours, required resources: test bench 1, operator 1;
[0116] Task 2: Urgency , required time hours, required resources: test bench 2, operator 2;
[0117] Task 3: Urgency , required time hours, required resources: test bench 1, operator 2;
[0118] Let the resource adaptation degree matrix be as follows:
[0119]
[0120] Task priority weight coefficient:
[0121] First, calculate the impact of task 1 task urgency and time:
[0122]
[0123]
[0124] Task priority urgency and time part:
[0125]
[0126] Next, calculate the impact of resource adaptation and available resources:
[0127]
[0128] The number of resources required for task 1 (Test bench 1 and operator 1).
[0129] Final calculation of task priority of task 1:
[0130]
[0131]
[0132] Similarly,
[0133]
[0134]
[0135] Based on the initial utilization of test resources, the adaptation of tasks and test resources, and the priority of tasks, the matching priority between tasks and test resources is calculated using a two-way matching priority calculation algorithm,
[0136] The calculation formula of the matching priority between tasks and test resources is:
[0137]
[0138] Let the adjustment factor that balances the control task priority and adaptation be , the adjustment parameter that enhances the sensitivity of task to dynamic demand for resources ;
[0139] For each task, calculate the weighted sum of the initial utilization of the adapted resources , where the adapted resources of task 1 are test bench 1 ( ), operator 1 ( ), and the sum of the initial utilization of the adapted resources:
[0140]
[0141] The matching priority between task 1 and test bench is:
[0142]
[0143]
[0144]
[0145] Similarly, the matching priority between different tasks and test resources is obtained;
[0146] The matching priority is represented by a matrix as follows:
[0147]
[0148] Based on the matching priority between tasks and test resources, a preliminary decision of task allocation is made to construct a task allocation matrix;
[0149] The task allocation matrix is as follows:
[0150]
[0151] Based on the matching priority between tasks and resources and the task allocation matrix, a task allocation balance optimization algorithm is used to calculate the objective function;
[0152] Before calculating the objective function, in order to measure the balanced use of test resources, prevent excessive use or idling of test resources, and ensure fair allocation of tasks, a test resource utilization balance factor is calculated, and the calculation formula is:
[0153]
[0154] The number of allocated tasks for test bench 1 is:
[0155]
[0156] Ideally, the number of allocated tasks for each resource is ;
[0157]
[0158] Similarly, ; ; ;
[0159] The calculation formula of the objective function is:
[0160]
[0161] Based on the objective function, the task allocation is further optimized by improved gradient descent method, and the updated task allocation matrix elements are calculated;
[0162] Set the initial learning rate , decay factor ;
[0163] In the first iteration, the momentum term is initialized to 0: ;
[0164] Update the learning rate to control the step size of gradient update:
[0165]
[0166] The calculation formula of the updated task allocation matrix element is:
[0167]
[0168]
[0169]
[0170]
[0171] Similarly, other task allocation matrix elements will also be updated;
[0172] The termination condition of optimizing task allocation is that the change of objective function is less than the set threshold :
[0173] .
[0174] The present application has the beneficial effects of:
[0175] 1. By real-time monitoring and obtaining the state characteristics and the dependency relationship between the test resources, the resource state matrix and the resource dependency matrix are constructed, the comprehensive perception and initialization of the test resources are realized, through the accurate resource state description, it is ensured that the current state and the mutual dependency relationship of each test resource can be accurately mastered, so that the waste of resources and the failure of test tasks caused by incomplete or wrong information during task allocation are avoided;
[0176] 2. Based on the resource state matrix and the resource dependency matrix, the initial utilization rate of the test resources is calculated by using the resource utilization rate calculation algorithm, through the exponential function transformation and the introduction of the adjustment factor, the influence of the dependency relationship between the resources on the utilization rate is scientifically quantified, and the normalization processing is carried out, so that the utilization rates under different resources and different state quantities are comparable, the scientificity and rationality of resource allocation are significantly improved;
[0177] 3. In task allocation management, reasonable task priority evaluation is the key to ensure efficient test execution, through the priority evaluation algorithm, the urgency, required time and resource demand of the task can be balanced to obtain the priority of each task, especially through the application of logarithmic function and square root inverse form, the excessive interference of extreme tasks is avoided, and the priority processing efficiency of short time tasks is improved, and the robustness and resource turnover efficiency in processing multi-task scene are significantly improved;
[0178] 4. Based on the initial utilization rate of test resources, the adaptability of tasks and test resources and the priority of tasks, the matching priority between tasks and resources is evaluated through the two-way matching priority calculation algorithm, the actual availability of resources is dynamically considered, and the adjustment factor is introduced to flexibly adjust the task allocation strategy, which effectively prevents the misuse or waste of resources, thereby ensuring the rationality of task allocation;
[0179] 5. Through the task allocation balance optimization algorithm, the allocation matrix between tasks and resources is calculated and optimized, aiming to realize the balanced use of resources, prevent resource overload or idling, ensure the fair allocation of tasks, and further improve the convergence speed of task allocation decision and the optimization ability of global optimal solution through the improved gradient descent method, thereby maximizing the resource utilization efficiency and task allocation completion degree.
[0180] The order of the embodiments of the present application is only for description, and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or can be advantageous.
[0181] Each embodiment in the specification is described in a progressive manner, and the same or similar parts between each embodiment can be referred to each other, and each embodiment mainly explains the difference from other embodiments.
[0182] The above embodiments are only used to illustrate the technical solutions of the present application, but not limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that the technical solutions recorded in the foregoing embodiments can be modified, or some technical features can be replaced by equivalents; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application, and should be included in the protection scope of the present application.
Claims
1. A method for allocating and managing tasks for full performance testing of electric energy meters, characterized in that: Including steps: S1, by real-time monitoring and obtaining the state characteristics of the test resources and the dependency relationships between the test resources, construct a resource state matrix and a resource dependency matrix. Based on the resource state matrix and the resource dependency matrix, the initial utilization rate of the test resources is calculated using a resource utilization calculation algorithm; S2, based on the initial utilization of experimental resources, the priority of the task is calculated using the priority evaluation algorithm; S3, based on the initial utilization rate of experimental resources and the priority of tasks, a two-way matching priority calculation algorithm is used to calculate the matching priority between tasks and experimental resources. A preliminary decision on task allocation is made based on the matching priority between tasks and experimental resources, and a task allocation matrix is constructed. S4, based on the matching priorities of tasks and resources and the task allocation matrix, uses the task allocation balance optimization algorithm to calculate the objective function. Based on the objective function, the task allocation is further optimized by the gradient descent method to calculate the updated task allocation matrix elements; In S1, the resource utilization calculation algorithm is based on the resource state matrix and the resource dependency matrix. According to the state characteristics in the resource state matrix, an initial weight value is set for each test resource. The dependency between the test resources is identified in combination with the resource dependency matrix. The effect of the dependency relationship between the test resources on the initial utilization is attenuated through exponential function transformation. An adjustment factor is introduced to normalize the initial utilization to ensure that the value of the initial utilization is within a reasonable range. The calculation formula for the initial utilization rate of experimental resources is: in, Indicates the Initial utilization of experimental resources; Indicates the The first resource The value of each state feature ranges from 0 to 1; Indicates the Experimental resources and The degree of dependency between experimental resources ranges from 0 to 1; represents the exponential function used to convert the cumulative effect of experimental resource dependence into a decay factor; represents the regulating factor; Indicates the total number of experimental resources; Indicates the total number of resource status characteristics; In S3, based on the initial utilization rate of the test resources, the compatibility between the task and the test resources, and the priority of the task, a bidirectional matching priority calculation algorithm is used to calculate the matching priority between the task and the test resources; The calculation formula for the matching priority between tasks and experimental resources is: in, Indicates the Task and Matching priority between experimental resources; Indicates the The priority of each task; Indicates the Task and The suitability of the experimental resources; Indicates the Initial utilization of experimental resources; represents the adjustment factor that controls the balance between task priority and fitness, ; represents the tuning parameter that enhances the task's sensitivity to dynamic resource demands, ; Indicates the The sum of the utilization rates of all experimental resources adapted to each task; In S4, the task allocation balance optimization algorithm is intended to optimize the task allocation process in the full performance test of the electric energy meter, by combining the matching priority of tasks and resources and the balance of resource utilization, to maximize the efficiency and rationality of task allocation, and ensure that the test tasks can be executed under reasonable resource conditions; The calculation formula of the objective function is: in, represents the objective function; Indicates the number of tasks; Indicates the Task and Matching priority between experimental resources; represents the resource allocation matrix element; Indicates the A trial resource utilization balance factor.
2. The method for allocating and managing tasks for full performance testing of electric energy meters according to claim 1, characterized in that: Said S1 specifically includes: In the full performance test task allocation and management system of electric energy meters, it is necessary to fully perceive and initialize the resource status in the test environment, and obtain the status characteristics of the test resources and the dependencies between the test resources through real-time monitoring; in order to systematically describe the status of the test resources, a resource status matrix is constructed, in which the rows of the resource status matrix represent the test resources, the columns represent the status characteristics of the test resources, and each element Indicates the The first resource The value of each state feature ranges from 0 to 1; At the same time, considering the mutual influence between experimental resources, in order to improve the rationality of experimental task allocation, a resource dependency matrix is constructed to describe the dependency relationship between experimental resources; each element in the resource dependency matrix Indicates the Experimental resources and The degree of dependency between experimental resources, ranging from 0 to 1.
3. The method for allocating and managing tasks for full performance testing of electric energy meters according to claim 1, characterized in that: In S2, the priority evaluation algorithm uses a logarithmic function to calculate the impact of the urgency of the task, avoiding excessive interference from extremely urgent tasks, while ensuring a certain priority for handling urgent tasks and enhancing the robustness of the electricity meter full performance test task allocation management system; uses the reciprocal form of the square root to calculate the impact of the time required for the task, and the reciprocal square root is used to enhance the priority of short-term tasks; by evaluating the matching degree between the resources required for the task and the currently available resources, it is ensured that the resource demand can be met, and a resource demand impact weight factor is introduced to balance the impact of the task resource demand on the priority.
4. The method for allocating and managing tasks for full performance testing of electric energy meters according to claim 3, characterized in that: In S2, the calculation formula of the task priority is: in, Indicates the The priority of a task, that is, its priority among all pending tasks; Represents the weight coefficient, which is used to balance the impact of task urgency on priority; Indicates the The urgency of the task; Indicates that the logarithmic function is used to process the The urgency of each task to smooth out the impact of extreme values; Represents the time impact weight factor, which is used to balance the impact of task time on priority; Indicates the Time required for each task; Indicates the The reciprocal square root of the time required for each task is used to prioritize tasks with shorter processing times. Represents the resource demand impact weight factor, which is used to balance the impact of task resource demand on priority; Indicates the The resource requirements of the task, i.e. The amount of specific resources required for each task; Indicates the fitness impact factor, indicating all the factors that are suitable for the The remaining availability of resources for each task; Indicates the Task and The adaptability of each experimental resource is determined to determine the rationality of the adaptation task of each resource. , set according to the specific implementation scenario.
5. The method for allocating and managing tasks for full performance testing of electric energy meters according to claim 1, characterized in that: In the S4, the The calculation formula is: in, Indicates the The number of tasks assigned to each experimental resource; Indicates the average number of tasks per resource under ideal conditions.
6. The method for allocating and managing tasks for full performance testing of electric energy meters according to claim 1, characterized in that: In S4, the gradient descent method uses a dynamic learning rate and a momentum term to improve the convergence speed and the ability to find the global optimal solution. The momentum term is based on the update direction of the previous iteration. Part of the momentum is retained during the gradient descent process to prevent falling into the local optimal solution. The dynamic learning rate is adjusted based on the number of iterations. As the number of iterations increases, the learning rate gradually decreases, making it easier to quickly find an optimal solution.
7. An electric energy meter full performance test task allocation and management system, used to implement the electric energy meter full performance test task allocation and management method according to any one of claims 1 to 6, characterized in that: It includes resource status monitoring and initialization module, initial utilization calculation module, task priority evaluation module, two-way matching priority calculation module, task allocation matrix construction module and task allocation optimization module; The resource status monitoring and initialization module: constructs a resource status matrix and a resource dependency matrix by real-time monitoring and obtaining the status characteristics of the test resources and the dependency relationships between the test resources, and outputs the resource status matrix and the resource dependency matrix to the initial utilization calculation module; The initial utilization calculation module: based on the resource status matrix and resource dependency matrix of the resource status monitoring and initialization module, uses the resource utilization calculation algorithm to calculate the initial utilization of the test resources, and outputs the initial utilization of the test resources to the task priority evaluation module and the two-way matching priority calculation module; The task priority evaluation module: based on the initial utilization rate of the test resources of the initial utilization rate calculation module, uses the priority evaluation algorithm to calculate the priority of the task, and outputs the priority of the task to the two-way matching priority calculation module; The bidirectional matching priority calculation module: based on the initial utilization rate of the test resources of the initial utilization rate calculation module and the priority of the task of the task priority evaluation module, uses a bidirectional matching priority calculation algorithm to calculate the matching priority between the task and the test resource; The task allocation matrix construction module: makes a preliminary decision on task allocation based on the matching priority between the tasks and the experimental resources of the two-way matching priority calculation module, constructs a task allocation matrix, outputs the task allocation matrix to the task allocation optimization module, and receives the updated task allocation matrix elements from the task allocation optimization module to update the task allocation; The task allocation optimization module: based on the matching priority of tasks and resources of the two-way matching priority calculation module and the task allocation matrix of the task allocation matrix construction module, uses the task allocation balance optimization algorithm to calculate the objective function, based on the objective function, further optimizes the task allocation through the gradient descent method, calculates the updated task allocation matrix elements, and outputs the updated task allocation matrix elements to the task allocation matrix construction module.
Citation Information
Patent Citations
Adaptive performance test intelligent scheduling optimization method, equipment and medium
CN118627703A
Electric energy meter automatic test scheduling method and system
CN118822231A
Cloud computing task scheduling priority determination method based on genetic algorithm
CN118963953A