A multi-port test device resource allocation and management system and method
By constructing task feature vectors and port adaptability scores, combining K-means clustering and greedy algorithms to optimize resource allocation, the problem of unclear resource allocation in multi-port test equipment is solved, and efficient and stable task execution is achieved.
Patent Information
- Application Number
- CN202510273401.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-07-04
- Estimated Expiration
- 2045-03-10
AI Technical Summary
The existing multi-port test equipment resource allocation management system cannot effectively respond to the diversity of task requirements and dynamic changes in port resources, resulting in waste of resources, excessive load and task delay, lack of adaptive optimization capabilities, and cannot improve system performance in a dynamic environment.
By extracting the bandwidth, frequency, voltage requirements and signal types of the task, the task feature vector is constructed and normalized, the task is classified using the K-means clustering algorithm, combined with greedy algorithms and optimization scheduling algorithms, dynamically calculate port adaptability scores, monitor loads in real time, and intelligently select ports for resource allocation.
It realizes flexible matching between tasks and ports, improves resource allocation efficiency and accuracy, avoids resource conflicts and waste, reduces task execution delays, and improves system processing capabilities and resource utilization.
Smart Images

Figure CN119781989B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of device resource allocation, and more specifically, to a multi-port test device resource allocation management system and method. Background Art
[0002] Multi-port test devices are used to detect multiple ports of network devices, helping to identify faults, evaluate performance, and ensure stability. Multi-port test devices can be used for performance evaluation of communication systems (such as 5G, 4G, Wi-Fi, etc.), including tests in multiple aspects such as bandwidth, frequency response, and signal interference, and can simultaneously test multiple frequency bands or multiple network paths, improving test efficiency;
[0003] With the rapid development of information technology and the field of automated testing, multi-port test devices have been widely used in various high-efficiency and high-performance test scenarios. These devices usually need to process multiple test tasks simultaneously, and each task has different requirements for resources such as bandwidth, frequency, and voltage. Therefore, how to reasonably allocate task and port resources has become the key to improving test efficiency and optimizing resource utilization.
[0004] Deficiencies of the prior art: Current multi-port test device resource allocation management systems usually rely on static configuration or simple priority scheduling methods to allocate tasks and ports. However, this method cannot effectively cope with the diversity of task requirements and the dynamic changes of port resources, easily leading to resource waste or excessive port load, affecting the efficiency of task execution and system stability. In addition, existing systems usually lack a real-time feedback mechanism and cannot dynamically adjust resource allocation strategies according to the actual requirements and port status during task execution. Therefore, the prior art faces the problem that task allocation cannot be flexibly adjusted according to real-time requirements and port status, resulting in insufficient or unbalanced resource utilization, unable to effectively solve problems such as excessive load or task delay, and lacking adaptive optimization capabilities, unable to continuously improve system performance in a dynamic environment. Summary of the Invention
[0005] In order to overcome the above-mentioned defects of the prior art, the present invention provides a multi-port test device resource allocation management system and method to solve the problem of unclear port and resource allocation in multi-port test devices in the above-mentioned background art.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] A multi-port test device resource allocation management method includes the following steps:
[0008] Extract the bandwidth, frequency, voltage requirements, and signal types of each port task, construct a task feature vector and perform normalization processing, and use the K-means clustering algorithm to classify tasks according to resource requirements;
[0009] Based on the task characteristics and the resource capabilities of the ports, dynamically calculate the adaptability score for each port, and at the same time monitor the real-time load of the ports, update the port adaptability score in real time, and allocate tasks to the corresponding ports;
[0010] According to the task characteristics and the port adaptability score, use a combination of the greedy algorithm and the optimized scheduling algorithm to optimize the port resource allocation, and intelligently select ports to allocate different tasks.
[0011] In a preferred embodiment, extract the bandwidth, frequency, voltage requirements, and signal type of the tasks for each port, construct a task feature vector and perform normalization processing, and use the K-means clustering algorithm to classify the tasks according to resource requirements. The specific process is as follows:
[0012] The bandwidth requirement represents the data transmission volume of the task, the frequency requirement represents the requirement of the task for the signal response speed, the voltage requirement represents the working voltage range required by the task, and the signal type requirement represents the signal type used by the task. The signal type includes analog signals and digital signals;
[0013] After normalizing the requirements of each task using the maximum-minimum normalization method, construct a task feature vector;
[0014] Use the K-means clustering algorithm to classify the tasks according to the characteristics of the tasks and assign a class label to each task.
[0015] In a preferred embodiment, based on the task characteristics and the resource capabilities of the ports, dynamically calculate the adaptability score for each port. The specific process is as follows:
[0016] Define the port adaptability. The adaptability of each port is defined as the resource types that the port can support. The port adaptability includes bandwidth support, frequency response, voltage support, signal type, and port load;
[0017] The bandwidth support is the maximum bandwidth value that the port can carry. Compare it with the bandwidth requirement of the task. If the port bandwidth is higher than the task requirement, the adaptability is stronger;
[0018] The frequency response is the frequency range supported by the port, the voltage support is the voltage range supported by the port, the signal type is the signal type supported by the port, and the port load is the current load situation of the port;
[0019] Obtain the task feature vector and the port feature vector to calculate the port adaptability score.
[0020] In a preferred embodiment, and at the same time monitor the real-time load of the ports, update the port adaptability score in real time, and allocate tasks to the corresponding ports. The specific steps are as follows:
[0021] The task feature vector obtained is and the port feature vector is , then the port adaptation ability score The calculation formula is: , where are the bandwidth, frequency, and voltage requirements of the task respectively; are the bandwidth, frequency, and voltage supported by the port respectively; , and represent the signal types of the task and the port respectively; is the current load of the port, is the maximum load of the port; is the weight coefficient of each dimension;
[0022] Use the calculated port adaptation ability score as the basis for task and port allocation. Each task selects the port with the highest port adaptation ability score for allocation.
[0023] In a preferred embodiment, according to the task characteristics and the port adaptation ability score, the greedy algorithm and the optimized scheduling algorithm are combined to optimize the port resource allocation, and ports are intelligently selected for different task allocations. The specific process is as follows:
[0024] In the process of mapping tasks and ports, use the greedy algorithm to select local optimal solutions to obtain the global optimal solution, and select the task-port pair with the highest adaptability for allocation;
[0025] Use the task feature vector, the port feature vector, and the port adaptation ability score as input data, and use the greedy algorithm to map tasks and ports;
[0026] Initialize. Sort all tasks according to their priorities. The tasks with higher priorities are allocated first. The priorities of the tasks are determined according to the importance and urgency of the tasks. Initialize the status of all ports and record the current load of each port;
[0027] Calculate the adaptability. For each task, use the Euclidean distance to calculate the adaptability between the task and each port : , where and are the normalized values of the i-th feature dimension of the task and port feature vectors respectively, n is the number of feature dimensions, is the task feature vector, is the port feature vector, is the Euclidean distance calculation function;
[0028] Convert the Euclidean distance to adaptability: ;
[0029] Select the optimal port, select an unassigned port from the ports with the highest adaptability for task allocation. If the load of the selected port exceeds its maximum load, exclude the port and select the port with the second highest adaptability;
[0030] After the task is assigned to the port, update the load information of the port;
[0031] Repeat the steps of calculating adaptability, selecting the optimal port, and assigning tasks to the port until all tasks are assigned to ports or all port resources are exhausted;
[0032] When all tasks are successfully assigned to ports, the mapping between tasks and ports is completed;
[0033] In the case of task concurrency, use the genetic algorithm to further optimize the mapping between tasks and ports.
[0034] In a preferred embodiment, in the case of task concurrency, use the genetic algorithm to further optimize the mapping between tasks and ports. The specific process is as follows:
[0035] Perform individual coding and initialization. An individual in the genetic algorithm is a mapping scheme between tasks and ports. Each individual consists of the mapping relationship between tasks and ports, and each task is mapped to a port;
[0036] Calculate the fitness of each individual according to the adaptability between tasks and ports. The fitness of each individual is the sum of the adaptabilities between all tasks and ports under the mapping scheme;
[0037] Select individuals according to fitness for crossover operations to generate a new generation of individuals;
[0038] Perform swap mutation and insertion mutation on individuals, map tasks to a new port, and disrupt the current mapping relationship;
[0039] Through iterative evolution, provide the optimal task and port allocation scheme and converge to the global optimal solution;
[0040] Select ports for task allocation according to the global optimal solution.
[0041] A multi-port test device resource allocation and management system for implementing the above-mentioned multi-port test device resource allocation and management method, including:
[0042] A task classification module, used to extract the bandwidth, frequency, voltage requirements, and signal types of tasks for each port, construct a task feature vector and perform normalization processing, and use the K-means clustering algorithm to classify tasks according to resource requirements;
[0043] A port adaptation analysis module, which is used to dynamically calculate the adaptation ability score of each port based on the task characteristics and the resource capabilities of the ports, and simultaneously monitor the real-time load situation of the ports, update the port adaptation ability score in real time, and allocate tasks to the corresponding ports;
[0044] A task-port mapping module, which is used to optimize the port resource allocation by combining the greedy algorithm and the optimized scheduling algorithm according to the task characteristics and the port adaptation ability score, and intelligently select ports to allocate different tasks.
[0045] The technical effects and advantages of the present invention:
[0046] By extracting the bandwidth, frequency, voltage requirements and signal types of tasks, constructing task feature vectors and performing normalization processing, and combining the K-means clustering algorithm to classify tasks according to resource requirements, the present invention realizes the accurate identification of task resource requirements. Based on task characteristics and port resource capabilities, it dynamically calculates the adaptation ability score of each port, and monitors the port load in real time to ensure the optimal utilization of port resources during the task allocation process. By continuously updating the port adaptation ability score, it can achieve flexible matching of tasks and ports, improve the efficiency and accuracy of resource allocation. On this basis, the present invention adopts a combination of the greedy algorithm and the optimized scheduling algorithm to further optimize the port resource allocation, provides support for tasks by intelligently selecting the most suitable ports, avoids resource conflicts and waste, reduces task execution delays, improves the overall processing capacity and resource utilization rate of the system, effectively solves the problems of dynamic adaptation and task priority conflicts in multi-port resource allocation, and significantly improves the efficiency of task allocation and the stability of the system. Description of the Drawings
[0047] Figure 1 It is a flowchart of a method for resource allocation management of a multi-port test device according to the present invention.
[0048] Figure 2 It is a schematic structural diagram of a multi-port test device resource allocation management system according to the present invention. Detailed Embodiments
[0049] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0050] Embodiment 1: As Figure 1 shown, a method for resource allocation management of a multi-port test device includes the following steps:
[0051] Extract the bandwidth, frequency, voltage requirements, and signal types of tasks for each port, construct task feature vectors and perform normalization processing, and use the K-means clustering algorithm to classify tasks according to resource requirements;
[0052] Based on the task characteristics and the resource capabilities of the ports, dynamically calculate the adaptability score for each port, and at the same time monitor the real-time load situation of the ports, update the port adaptability score in real time, and assign tasks to the corresponding ports;
[0053] According to the task characteristics and the port adaptability scores, use a combination of the greedy algorithm and the optimized scheduling algorithm to optimize the port resource allocation, and intelligently select ports to allocate different tasks.
[0054] In the resource allocation management of multi-port test equipment, the resource requirements of different test tasks vary significantly. These differences are mainly reflected in aspects such as bandwidth requirements, frequency requirements, and voltage ranges. To achieve efficient resource allocation, it is first necessary to understand the characteristics of each task and its specific resource requirements. The purpose of task feature analysis and classification is to extract key features from each task through an automated method and classify the tasks, so that the most suitable port can be assigned to each task in the future, thereby improving resource utilization efficiency, reducing resource conflicts, and enhancing the accuracy and speed of task execution.
[0055] Step 1: Conduct automated task feature analysis and classification for each port, extract representative features from each test task to describe the resource requirements of the task, and then classify the tasks to assign the most suitable test port for the tasks. The specific steps are as follows:
[0056] Perform task feature extraction, extract representative features from each test task to describe the resource requirements of the task. The process of feature extraction forms a set of structured feature vectors by collecting relevant data of the task;
[0057] Perform feature definition. The features of a task are multi-dimensional data describing the resources required by the task, including the following aspects:
[0058] Bandwidth requirement ( ) : The bandwidth requirement of each task reflects the data transmission volume of the task, usually expressed by the data transmission rate (such as bits per second bps). The level of bandwidth requirement directly affects the bandwidth resource allocation of the port. If a task requires a high bandwidth, a port with a larger bandwidth needs to be selected;
[0059] Frequency requirement ( ) : The frequency requirement of a test task reflects the requirement of the task for the signal response speed. Different tasks may have different frequency requirements. Some tasks may require high-frequency response, while some tasks only require low frequency. The frequency range of a task is usually determined by the minimum frequency And the maximum frequency Indicates, for example: ;
[0060] Voltage requirement ( ): The voltage requirement of a test task refers to the working voltage range required by the task. The test port usually has a specific voltage-bearing capacity during design. Therefore, the voltage requirement of the task determines the type of port to which the task can be assigned;
[0061] Signal type ( ): The signal type used by the task is divided into analog signals (Analog) and digital signals (Digital). Different types of ports may be suitable for different signal forms. Therefore, it is necessary to identify the signal type of the task in order to map it to the corresponding port. This feature is discrete and can be represented by 0 (analog) or 1 (digital);
[0062] Extract features, and the requirements of each task are combined and represented as a feature vector , which contains all relevant feature information of the task. This feature vector facilitates subsequent classification and matching of tasks. Each feature corresponds to a dimension: ;
[0063] To eliminate the influence of different feature units and dimensions, all feature values will be normalized, converting each feature value to a unified dimension range, using the maximum-minimum normalization method;
[0064] The normalized feature values are all within the range of [0, 1]. For the signal type , since it is binary itself, it naturally meets the normalization requirements. The normalized task feature vector is: .
[0065] Classify the test tasks into different categories according to their features. Use the K-means clustering algorithm to divide the tasks into multiple categories according to the features of the tasks. The tasks will be automatically assigned to the cluster with the smallest distance to the center. The specific process is as follows:
[0066] Select K initial cluster centers (usually by randomly selecting task feature vectors). According to the distance between the task features and the cluster centers, assign the tasks to the nearest cluster. Calculate the new cluster centers based on the feature vectors of the tasks within the clusters, update the positions of the cluster centers, and repeat the task assignment and cluster update steps until the cluster centers no longer change or reach the maximum number of iterations;
[0067] During the clustering process, the distance metric uses the Euclidean distance: , where is the center of cluster k, is the normalized value of the i-th feature dimension in the task feature vector, where n is the number of feature dimensions;
[0068] After task classification, each task will be assigned a class label indicating which class the task belongs to. For example, , where represents the class of task K, and each class represents a set of tasks with similar resource requirements, facilitating subsequent port mapping and resource allocation. The results after task classification include the class label of the task and the corresponding feature vector.
[0069] In summary, by extracting features such as bandwidth, frequency, and voltage of tasks, performing feature normalization, and combining with clustering algorithms for task classification, the resource requirements of different tasks can be accurately identified.
[0070] Step 2: Conduct dynamic port adaptability evaluation and scoring. After completing task feature analysis and classification, perform dynamic adaptability evaluation and scoring for each port. The purpose of this step is to dynamically evaluate the adaptability of each port based on the task features and the current state of the port, and assign a capacity score to each port. Through these scores, select the most suitable port for each task for allocation to ensure the optimal utilization of port resources. The specific steps are as follows:
[0071] Define the port adaptability. The adaptability of each port is defined as the resource types that the port can support, including but not limited to bandwidth, voltage, frequency, etc. The port adaptability is the basis for evaluating the matching degree between the task and the port. The capacity evaluation of the port is determined according to the following dimensions:
[0072] Bandwidth support : The maximum bandwidth value that the port can carry. Compared with the bandwidth requirement of the task, if the port bandwidth is higher than the task requirement, the adaptability is stronger;
[0073] Frequency response : The frequency range supported by the port. The frequency response ability of the port determines whether it can handle the frequency range required by the task. The matching degree between the frequency requirement of the task and the frequency range supported by the port directly affects the adaptability;
[0074] Voltage support : The voltage range supported by the port. The voltage requirement of the task must fall within the supported range of the port to ensure the normal execution of the task;
[0075] Signal type : The signal type supported by the port, such as analog signal or digital signal. The signal type of the task should match the supported type of the port;
[0076] Port load : The current load situation of the port. Even if a port has high theoretical capabilities, when its current load is too high, it may not be suitable to undertake new tasks. The port load needs to be monitored in real-time and dynamically evaluated when allocating tasks;
[0077] Comprehensively evaluate the capabilities and current loads of the above dimensions, calculate the adaptability score for each port. The adaptability score should reflect the port's ability to meet task requirements. The higher the score, the more suitable the port is to undertake tasks;
[0078] Obtain the task feature vector as and the port feature vector as , then the port adaptability ability score The calculation formula is: , where are the bandwidth, frequency, and voltage requirements of the task respectively, are the bandwidth, frequency, and voltage supported by the port respectively; , and represent the signal types of the task and the port respectively (0 for analog, 1 for digital), is the current load of the port, is the maximum load of the port; are the weight coefficients of each dimension, used to represent the influence degree of different features on adaptability, usually determined according to specific requirements or through training; The bandwidth adaptability between the task and the port is measured by the bandwidth difference. If the bandwidth supported by the port is close to the bandwidth requirement of the task, the adaptability is higher; otherwise, the adaptability is lower. Calculate the adaptability through the ratio of the bandwidth difference to the maximum bandwidth;
[0079] The frequency adaptability between the task and the port is represented by the difference in frequency requirements. If the frequency range supported by the port covers the frequency range of the task, the adaptability is higher, and the smaller the frequency difference, the higher the adaptability;
[0080] The voltage adaptability is evaluated according to the difference between the voltage range required by the task and the voltage range supported by the port. The calculation of voltage adaptability is similar to that of bandwidth and frequency, and the adaptability is inversely proportional to the voltage difference;
[0081] The signal type adaptability is directly determined by whether the task and the port signal types match. If the two signal types are the same, the adaptability is 1; otherwise, the adaptability is 0;
[0082] The port load adaptability is calculated by the ratio of the port current load to the maximum load. If the port current load is close to the maximum load, the adaptability is lower;
[0083] The port adaptation ability score is not static and will be dynamically updated according to the execution status of tasks and changes in port loads. Therefore, each time a task is assigned, the score needs to be updated based on the real-time load of the port. For example, during the execution of a task, continuously monitor the load conditions of the port (such as bandwidth utilization, response time, etc.). When the load of the port changes, the adaptation score of the port needs to be immediately updated, and recalculate its suitability for the new task;
[0084] After completing the port adaptation ability assessment, use the calculated port adaptation ability score as the basis for task and port allocation. Each task selects the port with the highest suitability for allocation. The specific steps are as follows:
[0085] For each task, the system will select the port with the highest adaptation score for allocation according to the matching degree between its characteristics and the port score. The selection of tasks can be optimized based on score sorting or by using the greedy algorithm;
[0086] Each task selects the port with the highest port adaptation ability score according to its characteristics (bandwidth, frequency, voltage, etc.). If the current load of the port is too high, the system will select the next port with a relatively higher adaptation score to ensure that tasks are not delayed due to insufficient resources;
[0087] In the case of concurrent execution of multiple tasks, further optimize port allocation through an optimized scheduling algorithm (such as the optimal scheduling algorithm or genetic algorithm). The algorithm takes into account the priorities of tasks, port loads, and adaptation scores to ensure that the system completes tasks in the shortest time and maximizes the utilization efficiency of port resources.
[0088] In summary, the dynamic port adaptation ability evaluation and scoring system evaluates the port capabilities from multiple dimensions, combines real-time load monitoring with task requirements, and dynamically calculates the port adaptation score. This scoring system ensures that tasks select the most suitable ports according to their characteristics, and adjusts the adaptation score in real time to avoid tasks being assigned to unsuitable ports. Through this evaluation mechanism, the system can adaptively optimize the allocation of port resources during task execution, achieve the optimal utilization of resources, and improve the test efficiency and stability of task execution.
[0089] Step 3: Perform intelligent task and port mapping selection. According to the characteristics of the task and the port adaptation ability score, intelligently map the task to the most suitable port to maximize resource utilization and reduce task execution latency. This step will select ports through an optimized algorithm, enabling tasks to meet resource requirements while avoiding resource conflicts and waste. The specific steps are as follows:
[0090] During the task assignment process, the resource requirements of each task and the resource capabilities of the ports need to be considered. Due to the parallel execution of multiple tasks, the mapping between tasks and ports is a dynamic process that requires comprehensive consideration based on information such as task characteristics, port adaptability scores, and the current load of the ports.
[0091] In the process of mapping tasks to ports, the greedy algorithm obtains the global optimal solution by selecting the local optimal solution each time. Specifically, the greedy algorithm assigns the task-port pair with the highest adaptability each time until all tasks are assigned.
[0092] Use the result of step 2 as the input, including the task feature vector , the port feature vector and the port adaptability ability score ;
[0093] In the case of dynamic load, the real-time load situation of the ports and the priorities of the tasks will also affect the port selection. The priorities of the tasks can be determined by the urgency or completion deadline of the tasks.
[0094] The process of using the greedy algorithm for task and port mapping is as follows:
[0095] Step 3.1, perform initialization. Sort all tasks according to their priorities, and the tasks with higher priorities are assigned first. The priorities of the tasks can be determined according to the importance, urgency, or other business rules of the tasks; initialize all ports to the available state and record the current load of each port.
[0096] Step 3.2, calculate the adaptability. For each task, calculate the adaptability between the task and each port , and use the Euclidean distance to calculate the adaptability: , where and are the normalized values of the i-th feature dimension of the task and port feature vectors respectively; convert the Euclidean distance to the adaptability: Since the smaller the Euclidean distance, the higher the adaptability, the adaptability uses the reciprocal of the distance, which can ensure that the smaller the distance, the greater the adaptability.
[0097] Step 3.2, select the optimal port. Select an unassigned port from the ports with the highest adaptability for task assignment. If the load of the selected port exceeds its maximum load, exclude this port and select the port with the second highest adaptability.
[0098] After the task is assigned to the port, update the load information of the port, indicating that the port has carried a task. If the load of the port reaches the maximum load, mark it as unavailable to avoid further task assignment.
[0099] Step 3.5, repeat Step 3.2 to Step 3.4 until all tasks are assigned to ports or all port resources are exhausted;
[0100] Step 3.6, when all tasks are successfully assigned to ports, the mapping of tasks to ports is completed.
[0101] In the case of task concurrency, the greedy algorithm cannot obtain the global optimal solution, and an optimization scheduling algorithm (such as the genetic algorithm) can be used to further optimize the mapping of tasks to ports;
[0102] The genetic algorithm (GA) is a search optimization algorithm that simulates natural selection and genetic principles. By simulating the process of biological evolution, it gradually evolves the optimal solution from the existing solution space. In the mapping of tasks to ports, the genetic algorithm can effectively handle the resource allocation problem in the case of multi-task concurrency. Especially when the greedy algorithm may fall into a local optimum, the genetic algorithm can find the global optimal or approximate optimal solution through global search and optimization. The specific steps of using the genetic algorithm are as follows:
[0103] Perform individual coding and initialization. An individual in the genetic algorithm represents a mapping scheme of tasks to ports, and each individual consists of the mapping relationship between tasks and ports;
[0104] Each task is mapped to a port, and the mapping relationship can be represented by an integer sequence. For example, assume there are 3 tasks and 3 ports , the coding of an individual can be: , where task is mapped to port , task is mapped to port , task is mapped to port ;
[0105] Calculate the fitness of each individual according to the fitness of the task-port adaptation (the fitness of each individual is the sum of the fitness of all tasks and ports under its mapping scheme. The higher the total fitness, the more reasonable the resource allocation of the scheme). An individual with a higher fitness means a better matching degree between tasks and ports;
[0106] Select a part of the better individuals according to the fitness for crossover operations to generate a new generation of individuals. The selection operation is based on the fitness of the individuals. Individuals with higher fitness are more likely to be selected, but a certain degree of randomness is also allowed to avoid premature convergence to a local optimum;
[0107] Perform crossover operations to generate new individuals from the selected individuals in order to explore better resource allocation schemes. Single-point crossover can be performed by selecting a crossover point of the parent individuals and swapping the genes after that point to generate two offspring, or multi-point crossover can be carried out;
[0108] Mutate the individuals to increase the diversity of the solution space and prevent getting stuck in local optimal solutions. For example, perform swap mutation by randomly selecting task pairs and swapping the port mapping relationships; or perform insertion mutation by randomly selecting a task and mapping it to a new port to disrupt the current mapping relationship;
[0109] The genetic algorithm gradually finds the optimal solution through multiple generations of evolution. In each generation, the parent individuals will undergo operations such as selection, crossover, and mutation to produce new offspring. The fitness of each generation will gradually increase and finally converge to the global optimal or approximate optimal solution;
[0110] Through iterative evolution, the genetic algorithm can provide the optimal or approximate optimal task and port allocation scheme for multi-task parallel execution scenarios;
[0111] Select ports for task allocation according to the determined global optimal solution or approximate optimal solution.
[0112] It should be noted that the mapping process also needs to meet certain constraints, including that the port load cannot exceed its maximum support capacity, each task must be allocated to a port, and the fitness between the task and the port must meet the minimum requirements (such as bandwidth, frequency, voltage, etc.).
[0113] During the task execution process, monitor the resource consumption of the tasks in real time, such as bandwidth usage, voltage requirements, etc. If the port load assigned to a certain task is too high or no longer meets the task requirements, the fitness of the task will be dynamically re-evaluated and resource reallocation will be carried out. During the task execution process, the system will regularly recalculate the fitness between the tasks and the ports. If it is found that the port load is too high or the task resource requirements change, the system will select a new port for allocation according to the new fitness.
[0114] After completing the above steps, the final task and port mapping is determined by the following strategies:
[0115] Tasks with the highest priority are allocated ports first to ensure that tasks are executed as required;
[0116] The ports with the highest fitness are selected to execute tasks, but the port load and availability also need to be considered;
[0117] The dynamic adjustment of task execution ensures the continuous optimization of the mapping through the feedback mechanism and real-time load monitoring.
[0118] The intelligent task and port mapping algorithm can effectively map tasks to the most suitable ports by combining the greedy algorithm and the genetic algorithm. The core goal of this process is to maximize resource utilization, reduce task execution latency, and balance port loads. Through this optimized mapping strategy, it is possible to ensure the efficient allocation of resources and the smooth execution of tasks in a complex multi-task concurrent execution environment.
[0119] It should be noted that the thresholds involved in the embodiments can be determined according to specific scenarios and requirements.
[0120] The present invention extracts the bandwidth, frequency, voltage requirements, and signal types of tasks, constructs task feature vectors and performs normalization processing, combines the K-means clustering algorithm to classify tasks according to resource requirements, thereby achieving accurate identification of task resource requirements. Based on task characteristics and port resource capabilities, it dynamically calculates the adaptability score of each port, and monitors the port load in real time to ensure the optimal utilization of port resources during the task allocation process. By continuously updating the port adaptability score, it can achieve flexible matching of tasks and ports, improve the efficiency and accuracy of resource allocation. On this basis, the present invention combines the greedy algorithm and the optimized scheduling algorithm to further optimize the allocation of port resources, intelligently selects the most suitable port to support tasks, avoids resource conflicts and waste, reduces task execution latency, improves the overall processing capacity and resource utilization rate of the system, effectively solves the problems of dynamic adaptation and task priority conflicts in multi-port resource allocation, and significantly improves the efficiency of task allocation and the stability of the system.
[0121] Embodiment 2: A multi-port test equipment resource allocation and management system, as Figure 2 shown, specifically includes:
[0122] A task classification module, which is used to extract the bandwidth, frequency, voltage requirements, and signal types of tasks on each port, construct task feature vectors and perform normalization processing, and use the K-means clustering algorithm to classify tasks according to resource requirements;
[0123] A port adaptability analysis module, which is used to dynamically calculate the adaptability score of each port based on task characteristics and port resource capabilities, and at the same time monitor the real-time load of the port, update the port adaptability score in real time, and allocate tasks to the corresponding ports;
[0124] A task-port mapping module, which is used to optimize the allocation of port resources by combining the greedy algorithm and the optimized scheduling algorithm according to task characteristics and port adaptability scores, and intelligently select ports to allocate different tasks.
[0125] The above formulas are all dimensionless and only take their numerical values for calculation. Specific dimensionless methods can adopt various means such as standardization, which will not be elaborated here. The formulas are obtained by collecting a large amount of data for software simulation to get a formula closest to the actual situation. The preset parameters in the formulas are set by those skilled in the art according to the actual situation.
[0126] The above embodiments can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center in a wired or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or a data center that contains a collection of one or more available media. The available medium can be a magnetic medium (such as a floppy disk, an ATA hard disk, a magnetic tape), an optical medium (such as a DVD), or a semiconductor medium. The semiconductor medium can be a solid-state ATA hard disk.
[0127] It should be understood that in various embodiments of the present application, the magnitudes of the serial numbers of the above processes do not mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0128] Those of ordinary skill in the art can realize that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professionals can use different methods for each specific application to implement the described functions, but such implementation should not be considered to exceed the scope of the present application.
[0129] In several embodiments provided by this application, it should be understood that the disclosed systems, devices, and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces. The indirect coupling or communication connection of the devices or units can be in electrical, mechanical, or other forms.
[0130] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units. They can be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0131] In addition, in each embodiment of this application, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit.
[0132] As mentioned above, the above is only the specific implementation manner of this application, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed by this application can easily think of changes or substitutions, which should be covered within the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
Claims
1. A resource allocation management method for a multi-port test device, characterized in that, It includes the following steps: Extract the bandwidth, frequency, voltage requirements, and signal types of each port task, construct a task feature vector and perform normalization processing, and use the K-means clustering algorithm to classify tasks according to resource requirements; Based on the task characteristics and the resource capabilities of the ports, dynamically calculate the adaptation ability score of each port, and at the same time monitor the real-time load situation of the ports, update the port adaptation ability score in real time, and allocate tasks to the corresponding ports; According to the task characteristics and the port adaptation ability score, use a combination of the greedy algorithm and the optimization scheduling algorithm to optimize the port resource allocation, and intelligently select ports for the allocation of different tasks; According to the task characteristics and the port adaptation ability score, use a combination of the greedy algorithm and the optimization scheduling algorithm to optimize the port resource allocation, and intelligently select ports for the allocation of different tasks. The specific process is as follows: In the process of mapping tasks to ports, use the greedy algorithm to select a local optimal solution to obtain the global optimal solution, and select the task-port pair with the highest adaptability for allocation; Use the task feature vector, the port feature vector, and the port adaptation ability score as input data, and use the greedy algorithm to map tasks to ports; Perform initialization. Sort all tasks according to their priorities. Tasks with higher priorities are allocated first. The priorities of tasks are determined according to the importance and urgency of the tasks. Initialize the status of all ports and record the current load of each port; Calculate the adaptation degree. For each task, use the Euclidean distance to calculate the adaptation degree between the task and each port : , where and are the normalized values of the i-th feature dimension of the task and port feature vectors respectively, n is the number of feature dimensions, is the task feature vector, is the port feature vector, is the Euclidean distance calculation function; Convert the Euclidean distance to the fitness degree: ; Select the optimal port. Select an unallocated port from the ports with the highest adaptability for task allocation. If the load of the selected port exceeds its maximum load, exclude the port and select the port with the second highest adaptability; After the task is allocated to the port, update the load information of the port; Repeat the steps of calculating the adaptability, selecting the optimal port, and allocating the task to the port until all tasks are allocated to ports or all port resources are exhausted; When all tasks are successfully allocated to ports, the mapping of tasks to ports is completed; In the case of task concurrency, use the genetic algorithm to further optimize the mapping of tasks to ports; In the case of task concurrency, use the genetic algorithm to further optimize the mapping of tasks to ports. The specific process is as follows: Perform individual coding and initialization. An individual in the genetic algorithm is a mapping scheme of tasks to ports. Each individual consists of the mapping relationship between tasks and ports, and each task is mapped to a port; Calculate the fitness of each individual according to the adaptability of tasks to ports. The fitness of each individual is the sum of the adaptabilities of all tasks to ports under the mapping scheme; Select individuals according to the fitness for crossover operations to generate a new generation of individuals; Perform swap mutation and insertion mutation on individuals, map tasks to a new port, and shuffle the current mapping relationship; Through iterative evolution, provide the optimal task-port allocation scheme and converge to the global optimal solution; Select ports for task allocation according to the global optimal solution.
2. The resource allocation management method of a multi-port test device according to claim 1, characterized in that: Extract the bandwidth, frequency, voltage requirements, and signal types of each port task, construct a task feature vector and perform normalization processing, and use the K-means clustering algorithm to classify tasks according to resource requirements. The specific process is as follows: The bandwidth requirement represents the data transmission volume of a task, the frequency requirement represents the requirement of the task for the signal response speed, the voltage requirement represents the working voltage range required by the task, and the signal type requirement represents the signal type used by the task. The signal type includes analog signals and digital signals; After normalizing the requirements of each task using the maximum-minimum normalization method, a task feature vector is constructed; Using the K-means clustering algorithm, the tasks are classified according to the characteristics of the tasks, and a class label is assigned to each task.
3. A resource allocation and management method for a multi-port test device according to claim 2, characterized in that: Based on the task characteristics and the resource capabilities of the ports, the adaptation ability score of each port is dynamically calculated. The specific process is as follows: Define the port adaptation ability. The adaptation ability of each port is defined as the resource types that the port can support. The port adaptation ability includes bandwidth support, frequency response, voltage support, signal type, and port load; The bandwidth support is the maximum bandwidth value that the port can carry. Compared with the bandwidth requirement of the task, if the port bandwidth is higher than the task requirement, the adaptability is stronger; The frequency response is the frequency range supported by the port, the voltage support is the voltage range supported by the port, the signal type is the signal type supported by the port, and the port load is the current load situation of the port; Obtain the task feature vector and the port feature vector to calculate the port adaptation ability score.
4. A method for resource allocation and management of a multi-port test device according to claim 3, characterized in that: And at the same time monitor the real-time load situation of the port, update the port adaptation ability score in real time, and assign the task to the corresponding port. The specific steps are as follows: Obtain the task feature vector as and the port feature vector as , then the port adaptation ability score The calculation formula is: , where are the bandwidth, frequency, and voltage requirements of the task respectively; are the bandwidth, frequency, and voltage supported by the port respectively; , and represent the signal types of the task and the port respectively; is the current load of the port, is the maximum load of the port; are the weight coefficients of each dimension; Use the calculated port adaptation ability score as the basis for task-port allocation. Each task selects the port with the highest port adaptation ability score for allocation.
5. A multi-port test device resource allocation and management system for implementing a multi-port test device resource allocation and management method according to any one of claims 1-4, characterized in that, Including: A task classification module, which is used to extract the bandwidth, frequency, voltage requirements and signal types of the tasks of each port, construct a task feature vector and perform normalization processing, and use the K-means clustering algorithm to classify the tasks according to resource requirements; A port adaptation analysis module, which is used to dynamically calculate the adaptation ability score of each port based on the task characteristics and the resource capabilities of the ports, and at the same time monitor the real-time load situation of the port, update the port adaptation ability score in real time, and assign the task to the corresponding port; A task-port mapping module, which is used to optimize the port resource allocation by combining the greedy algorithm and the optimized scheduling algorithm according to the task characteristics and the port adaptation ability score, and intelligently select ports for the allocation of different tasks.
Citation Information
Patent Citations
Nuclear resource allocation method and device, electronic equipment and storage medium
CN116112406A
Optimization method and system for acceleration operation of main control chip
CN117742971A
Cloud resource automatic allocation system
CN118363765A