An edge-computing-based vehicle-machine resource hierarchical scheduling method, device and medium
By establishing a local resource layer and an edge collaborative resource pool, matching and hierarchically dividing task attributes and resource status, the problem of unreasonable resource allocation in vehicle-mounted task scheduling is solved, dynamic adjustment and stable optimization of resources are realized, and the scheduling coordination and flexibility of the vehicle-mounted system are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- SOUTH CHINA UNIV OF TECH
- Filing Date
- 2026-04-13
- Publication Date
- 2026-06-09
Smart Images

Figure CN122019192B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of vehicle networking, edge computing technology, and resource management technology, and in particular to a method, device, and medium for hierarchical scheduling of vehicle-machine resources based on edge computing. Background Technology
[0002] With the development of intelligent connected vehicles and in-vehicle intelligent terminals, the services carried by in-vehicle systems are constantly increasing. In addition to basic functions such as navigation and audio / video playback, they are gradually integrating various tasks such as voice interaction, visual recognition, remote diagnostics, and online service processing. To improve the ability of in-vehicle terminals to handle complex tasks, task scheduling technology, resource management technology, and edge collaborative processing technology for in-vehicle systems have been developed. On the one hand, relying on the local computing resources of the in-vehicle system to execute latency-sensitive tasks; on the other hand, combining edge computing nodes to share some computationally intensive or collaboratively processed tasks can improve the task carrying capacity and overall operating efficiency of the in-vehicle system.
[0003] Existing vehicle-mounted task scheduling methods, vehicle-mounted local resource allocation methods, and edge collaborative processing methods, in scenarios with multiple types of concurrent tasks, typically focus more on priority ranking, static resource allocation, or single-time unloading. There is still room for improvement in the coordinated utilization of task attribute information, vehicle-mounted local resource status, and edge collaborative resource status. Especially when vehicle-mounted resource pressure continuously changes and task load fluctuates dynamically, existing processing methods often struggle to simultaneously address task hierarchy division, differentiated access, and inter-layer migration control, thus lacking sufficient granularity in the collaborative scheduling between local and edge resources. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a vehicle-machine resource hierarchical scheduling method based on edge computing to solve the problems of difficulty in achieving effective hierarchical scheduling of vehicle-machine tasks between local resource layers and edge collaborative resources, and difficulty in coordinating and controlling task admission and inter-layer migration under changing resource pressure conditions.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a vehicle-to-everything (V2X) resource hierarchical scheduling method based on edge computing, comprising: collecting basic attribute data and initial resource data, obtaining task attribute information, and establishing a local resource layer and an edge collaborative resource pool; registering and associating the task attribute information, the local resource layer status, and the edge collaborative resource status to generate an initial scheduling information set; based on the initial scheduling information set, refreshing the local resource layer status and the edge collaborative resource status, obtaining the resource status, and matching the task attribute information with the resource status to generate an initial scheduling judgment set; hierarchically dividing the tasks to be scheduled according to the initial scheduling judgment set, obtaining task level identifiers, performing dual admission judgment on the task level identifiers, and generating a scheduling arrangement; executing the tasks to be scheduled based on the scheduling arrangement, and performing resource compression and inter-layer migration when the resource pressure continuously exceeds a preset resource pressure migration threshold to generate a scheduling execution status; and releasing local resource quotas and edge resource quotas according to the scheduling execution status to generate hierarchical scheduling update information.
[0008] As a preferred embodiment of the vehicle-to-everything (V2X) resource hierarchical scheduling method based on edge computing described in this invention, the specific steps for collecting basic attribute data and initial resource data, obtaining task attribute information, and establishing a local resource layer and an edge collaborative resource pool are as follows:
[0009] Collect basic attribute data of the tasks to be scheduled, as well as initial resource data from the vehicle's local system and the edge side, and extract task attribute information from the basic attribute data;
[0010] A local resource layer is established based on the initial resource data of the vehicle's local system, and an edge collaborative resource pool is established based on the initial resource data of the edge side.
[0011] As a preferred embodiment of the vehicle-to-everything (V2X) resource hierarchical scheduling method based on edge computing described in this invention, the specific steps for registering and associating task attribute information, local resource layer status, and edge collaborative resource status to generate an initial scheduling information set are as follows:
[0012] Register the task attribute information, obtain the task record set, and register the local resource layer status and edge collaborative resource status, obtain the local resource layer record set and edge collaborative resource record set;
[0013] Associate the task record set, the local resource layer record set, and the edge collaborative resource record set to obtain the task resource correspondence;
[0014] Based on the correspondence between tasks and resources, task attribute information, local resource layer status, and edge collaborative resource status are merged and organized to generate an initial scheduling information set.
[0015] As a preferred embodiment of the vehicle-to-everything (V2X) resource hierarchical scheduling method based on edge computing described in this invention, the specific steps for refreshing the local resource layer status and the edge collaborative resource status based on the initial scheduling information set to obtain the resource status are as follows:
[0016] Extract local resource layer identifiers and edge node identifiers from the initial scheduling information set to form a refresh object set. Based on the refresh object set, synchronously refresh the local resource layer status and the edge collaborative resource status to obtain a refresh resource record set.
[0017] Based on the refresh resource record set, perform corresponding processing on the local resource layer and edge nodes in the same refresh object set to obtain the resource status correspondence;
[0018] The local resource layer refresh records and edge collaborative resource refresh records in the refresh resource record set are merged and organized according to the resource status correspondence to generate resource status.
[0019] As a preferred embodiment of the vehicle-to-everything (V2X) resource hierarchical scheduling method based on edge computing described in this invention, the specific steps for matching task attribute information with resource status to generate an initial scheduling decision set are as follows:
[0020] Based on task attribute information and resource status, construct candidate matching entries between the task to be scheduled and the local resource layer and edge nodes, and obtain a set of candidate matching entries;
[0021] Constraint filtering is performed on the candidate matching item set to remove candidate matching items that do not meet the time limit requirements, resource requirements and migration restrictions, and obtain the effective matching item set;
[0022] Based on the set of valid matching entries, the task to be scheduled is matched with the corresponding resource status, and the matching entries are sorted.
[0023] Based on the matching entries, the local resource layer and edge nodes corresponding to the tasks to be scheduled are retained and merged to generate an initial scheduling decision set.
[0024] As a preferred embodiment of the vehicle-to-everything (V2X) resource hierarchical scheduling method based on edge computing described in this invention, the steps of hierarchically dividing the tasks to be scheduled according to the initial scheduling decision set, obtaining task hierarchical identifiers, performing dual admission determination on the task hierarchical identifiers, and generating scheduling arrangements are as follows:
[0025] Based on the tasks to be executed in the initial scheduling decision set, extract the local candidate entries and edge candidate entries corresponding to each task to be scheduled to form a decision input entry set;
[0026] Based on the set of input entries, the tasks to be scheduled are hierarchically divided to obtain task hierarchical identifiers. According to the task hierarchical identifiers, local layer admission determination and edge layer admission determination are performed on the tasks to be scheduled to obtain local admission markers and edge admission markers.
[0027] Based on the task level identifier, local access marker, and edge access marker, the execution location, resource allocation, and execution order of the tasks to be scheduled are determined, and a scheduling arrangement is generated.
[0028] As a preferred embodiment of the vehicle-to-everything (V2X) resource hierarchical scheduling method based on edge computing described in this invention, the steps of executing the scheduled tasks based on scheduling arrangements and performing resource compression and inter-layer migration when resource pressure continuously exceeds a preset resource pressure migration threshold to generate a scheduling execution state are as follows:
[0029] The scheduled tasks are started according to the scheduling arrangement, and an observation object table is established. Based on the observation object table, resource pressure data of local resource layer and edge nodes are continuously collected to obtain pressure observation entries.
[0030] The resource pressure migration of the scheduled tasks is determined by the pressure observation entries, and the resource pressure migration value is obtained. When the resource pressure migration value continues to exceed the preset resource pressure migration threshold, resource compression is performed on the local resource layer, and inter-layer migration is performed on the scheduled tasks that meet the migration conditions, generating task execution status.
[0031] Record the current execution location, resource quota, and status change information of the task based on the task execution status, and generate the scheduling execution status.
[0032] As a preferred embodiment of the vehicle-to-everything (V2X) resource hierarchical scheduling method based on edge computing described in this invention, the specific steps for releasing local resource quotas and edge resource quotas and generating hierarchical scheduling update information based on the scheduling execution status are as follows:
[0033] Based on the scheduling execution status, extract the task execution status information corresponding to the task to be scheduled, form a release object list, release the corresponding local resource quota and edge resource quota according to the release object list, and collect the local resource layer status and edge collaborative resource status after release to obtain the observation items after release.
[0034] Based on the observation entries after release, the resource release status, pressure reduction status, and execution cost of the task to be scheduled are updated and determined to obtain the hierarchical scheduling update amount;
[0035] Task attribute information is merged by scheduling execution status and post-release observation entries to generate task profile data. Resource thresholds, admission thresholds and migration restrictions are corrected by scheduling execution status, post-release observation entries and hierarchical scheduling update amount to generate scheduling parameter data.
[0036] The task level identifier, edge node identifier, resource threshold, and migration restriction in the task profile data and scheduling parameter data are summarized to generate hierarchical scheduling update information.
[0037] In a second aspect, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the computer program, when executed by the processor, implements any step of the vehicle-machine resource hierarchical scheduling method based on edge computing as described in the first aspect of the present invention.
[0038] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the vehicle-machine resource hierarchical scheduling method based on edge computing as described in the first aspect of the present invention.
[0039] The beneficial effects of this invention are as follows: By establishing a local resource layer and an edge collaborative resource pool, and registering, associating, and matching task attributes and resource status, a unified scheduling foundation for vehicle-mounted tasks and edge resources is realized; in particular, through task hierarchy division and dual admission judgment, differentiated scheduling control of different tasks between local and edge is realized, which helps to improve the rationality of resource allocation; by performing resource compression, inter-layer migration, and parameter updates after release when resource pressure changes, dynamic adjustment and continuous optimization of the scheduling process are realized, thereby achieving the beneficial effects of improving the coordination, flexibility, and operational stability of vehicle-mounted resource hierarchical scheduling. Attached Figure Description
[0040] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0041] Figure 1 This is a flowchart of a hierarchical scheduling method for vehicle-machine resources based on edge computing.
[0042] Figure 2 A flowchart for generating resource status.
[0043] Figure 3 A flowchart for generating scheduling arrangements.
[0044] Figure 4 A flowchart for generating hierarchical scheduling update information. Detailed Implementation
[0045] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0046] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0047] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0048] Reference Figures 1-4 This is one embodiment of the present invention, which provides a hierarchical scheduling method for vehicle-to-everything (V2X) resources based on edge computing, comprising the following steps:
[0049] S1. Collect basic attribute data and initial resource data, obtain task attribute information, and establish a local resource layer and an edge collaborative resource pool.
[0050] S1.1 Collect the basic attribute data of the task to be scheduled, as well as the initial resource data of the vehicle system and the edge side, and extract the task attribute information from the basic attribute data.
[0051] Furthermore, when synchronously collecting the basic attribute data of the task to be scheduled, as well as the initial resource data (including task identifier, task type, task size, data volume, computational load, latency requirements, priority, dependencies, and task source) from the vehicle's local system and the edge side, the corresponding records of the task to be scheduled, the corresponding records of the vehicle's local system, and the corresponding records of the edge side are read in a unified collection order. The reading results are checked item by item to confirm that the record content is complete, the record position is correct, and the record time is within the same collection period. The basic attribute data of the task to be scheduled is searched field by field. Fields that can characterize the execution requirements, execution constraints, and execution characteristics of the task to be scheduled are identified one by one from the basic attribute data of the task to be scheduled. Irrelevant fields are removed, and the retained fields are formatted, checked for omissions, cleaned up duplicate content, and merged with the same name. The merged fields are then organized according to the correspondence of the same task to be scheduled for use in the subsequent scheduling registration results. Task attribute information is extracted from the basic attribute data.
[0052] It should be noted that the initial resource data is used to characterize the available resource status of the vehicle-mounted system and the edge side at the start of scheduling. Specifically, it may include computing resources, storage resources, communication bandwidth, queue occupancy, energy consumption status, and the current load information of each resource node.
[0053] Execution requirements include at least CPU requirements, memory requirements, bandwidth requirements, and data volume. Execution constraints include at least the deadline or latency limit, whether migration is allowed, and the number of migrations. Execution characteristics include at least the task type, data location, and task priority.
[0054] S1.2 Establish a local resource layer based on the initial resource data of the vehicle system, and establish an edge collaborative resource pool based on the initial resource data of the edge side.
[0055] Furthermore, the initial resource data on the vehicle's local system is read, verified, and merged item by item. Resource records that can participate in the execution of tasks to be scheduled are classified and organized according to resource type and allocability. The availability and occupancy of the corresponding resource records are uniformly registered to form a local resource layer. The resource types, availability, occupancy, and allocability of the local resource layer form the initial local resource layer status. At the same time, the initial resource data on the edge side is read, verified, and merged item by item. Resource records that can provide collaborative execution capabilities for tasks to be scheduled are collected according to edge nodes. The resource records corresponding to the edge nodes are uniformly registered and centrally organized to form an edge collaborative resource pool. An edge node identifier is generated for each edge node. The edge node identifier is written into the identifier field of the corresponding edge node record, and the edge node identifiers corresponding to different edge nodes are unique.
[0056] It should be noted that a local resource layer identifier is generated for the local resource layer, and the local resource layer identifier is written into the identifier field of the corresponding record of the local resource layer. Moreover, the same local resource layer corresponds to only one unique local resource layer identifier.
[0057] S2. Register and associate task attribute information, local resource layer status, and edge collaborative resource status to generate an initial scheduling information set.
[0058] S2.1 Register the task attribute information, obtain the task record set, and register the local resource layer status and edge collaborative resource status, and obtain the local resource layer record set and edge collaborative resource record set.
[0059] Furthermore, resource records, availability, and collaboration relationships corresponding to edge nodes are extracted from the edge collaborative resource pool to form an edge collaborative resource status. Task attribute information is registered one-to-one according to the tasks to be scheduled. After entering the content of each field in the task attribute information into a unified record location, the fields corresponding to the same task to be scheduled are centrally merged. Missing fields are checked item by item, duplicate fields are removed, and fields that can reflect the execution requirements, execution constraints, and execution characteristics of the task to be scheduled are retained to form a task record set. The resource categories, availability, occupancy, and allocability relationships in the local resource layer status are registered accordingly, and the relevant resource records are categorized and organized according to the local resource layer to form a local resource layer record set. Then, the resource records, availability, and collaboration relationships corresponding to edge nodes in the edge collaborative resource status are registered accordingly, and the relevant resource records are merged according to the edge nodes to form an edge collaborative resource record set.
[0060] S2.2. Associate the task record set, the local resource layer record set, and the edge collaborative resource record set to obtain the task resource correspondence.
[0061] Furthermore, the system reads the records in the task record set according to the order of the tasks to be scheduled. It then compares the CPU, memory, and bandwidth requirements in the task record set with the resource categories, availability, occupancy, and allocability relationships in the local resource layer record set, as well as the resource records and availability of the corresponding edge nodes in the edge collaboration resource record set, to determine if the remaining available resources meet the resource requirements of the tasks to be scheduled. The system also compares the deadlines or latency limits in the task record set with the local execution latency and the edge reachability latency, to determine if the corresponding resources meet the latency requirements of the tasks to be scheduled. Finally, it compares the migration permissions, migration limit, and data location in the task record set with the collaboration relationships in the edge collaboration resource record set, to determine if the tasks to be scheduled meet the edge execution conditions. The system merges the local resource layer records and edge collaboration resource records that meet the resource requirements, latency requirements, and execution conditions under the corresponding task name, and removes records that do not match, thus obtaining the task resource correspondence.
[0062] It should be noted that the local execution latency can be estimated based on the current queue length of the local resource layer, the average processing time per unit task, and the current resource load. The edge reachability latency can be estimated based on the link transmission latency between the vehicle and the edge node, the edge queuing latency, and the edge execution latency.
[0063] S2.3 Based on the correspondence between task resources, the task attribute information, local resource layer status and edge collaborative resource status are merged and organized to generate an initial scheduling information set.
[0064] Furthermore, the task attribute information, local resource layer status, and edge collaborative resource status corresponding to each task to be scheduled are extracted sequentially. The execution requirements, execution constraints, and execution characteristics in the task attribute information are merged with the resource categories, availability status, occupancy, and allocability relationships in the local resource layer status, as well as the resource records, availability, and collaborative relationships corresponding to the edge nodes in the edge collaborative resource status, into the same corresponding location. After checking and cleaning up duplicate and inconsistent content, the information is organized according to the corresponding order between the tasks to be scheduled, the local resource layer, and the edge nodes to generate the initial scheduling information set.
[0065] S3. Based on the initial scheduling information set, refresh the local resource layer status and edge collaborative resource status, obtain the resource status, and match the task attribute information with the resource status to generate the initial scheduling decision set.
[0066] S3.1 Extract the local resource layer identifier and edge node identifier from the initial scheduling information set to form a refresh object set. Based on the refresh object set, synchronously refresh the local resource layer status and the edge collaborative resource status to obtain the refresh resource record set.
[0067] Furthermore, the records in the initial scheduling information set are read item by item according to the order of the tasks to be scheduled. The local resource layer identifier and edge node identifier are extracted from each record. Identical local resource layer identifiers and edge node identifiers are merged and organized. Duplicate identifiers and identifiers without corresponding relationships are checked and cleaned up to form a refresh object set. Based on the local resource layer identifier and edge node identifier in the refresh object set, the corresponding local resource layer status and edge collaborative resource status are read and updated within the same refresh cycle. The refresh cycle adopts a timed trigger or event trigger method. The updated fields include at least available quantity, occupied quantity, queue length, execution delay and link status. The refreshed content is backfilled into the corresponding local resource layer status, edge collaborative resource status and refresh resource record set. Records with the same identifier are overwritten and updated, and invalid records are cleaned up to obtain the refresh resource record set.
[0068] It should be noted that, in order to characterize the dynamic changes of local resource layer and edge collaborative resources, dynamic resource monitoring fields can also be set. The dynamic resource monitoring fields include at least queue length, execution latency and link status, and are updated through the status acquisition interface according to timed triggering or event triggering.
[0069] S3.2. Based on the refresh resource record set, perform corresponding processing on the local resource layer and edge nodes in the same refresh object set to obtain the resource status correspondence.
[0070] Furthermore, based on the local resource layer identifier and edge node identifier in the refresh object set, the records in the refresh resource record set are grouped and read. Local resource layer refresh records and edge node refresh records belonging to the same refresh object set are placed in the same corresponding range for item-by-item comparison. During the item-by-item comparison, the identifier content, record position, and association order between local resource layer refresh records and edge node refresh records are checked in turn to confirm whether local resource layer refresh records and edge node refresh records belong to the same refresh object set. Then, the local resource layer refresh records and edge node refresh records that can correspond to each other are organized into a one-to-one correspondence. Records that cannot correspond are removed, and records with duplicate correspondences are checked and the correct correspondence results are retained to obtain the resource status correspondence.
[0071] S3.3 Merge and organize the local resource layer refresh records and edge collaborative resource refresh records in the refresh resource record set according to the resource status correspondence to generate resource status.
[0072] Furthermore, the refresh records of the local resource layer and the edge collaborative resource refresh records are read separately from the refresh resource record set. Then, according to the already determined correspondence in the resource status correspondence, the local resource layer refresh records and the edge collaborative resource refresh records that can correspond to each other are grouped into the same sorting location. The resource category, availability status, occupancy status, and allocability relationship in the local resource layer refresh records are checked item by item with the corresponding resource records, availability status, and collaborative relationship of the edge nodes in the edge collaborative resource refresh records. Records with consistent content and clear correspondence are retained, duplicate records are cleaned up, and records with inconsistent correspondence with resource status are removed. The data is then summarized and sorted according to the correspondence order between the local resource layer and the edge nodes to generate the resource status.
[0073] S3.4 Based on the task attribute information and resource status, construct candidate matching entries between the task to be scheduled and the local resource layer and edge nodes, and obtain a set of candidate matching entries.
[0074] Furthermore, following the order of the tasks to be scheduled, the CPU requirements, memory requirements, bandwidth requirements, remaining available resources requirements, current occupancy limits, maximum allowable queuing latency, migration permission, data locality requirements, and cross-node collaboration requirements are read item by item from the task attribute information. Simultaneously, the resource categories, availability status, occupancy, and allocability relationships corresponding to the local resource layer, as well as the resource records, availability, and collaboration relationships corresponding to the edge nodes, are read item by item from the resource status. Taking a single task to be scheduled as a unit, the CPU requirements, memory requirements, and bandwidth requirements are mapped to resource categories and available resources; the remaining available resources requirements, current occupancy limits, and maximum allowable queuing latency are mapped to available status and occupancy; and migration permission, data locality requirements, and cross-node collaboration requirements are mapped to allocability and collaboration relationships. Combinations that satisfy the mapping relationships are organized into candidate matching entries. All candidate matching entries corresponding to the same task to be scheduled are then grouped separately according to the local resource layer and edge nodes. Combinations that cannot form a mapping relationship are eliminated, resulting in a candidate matching entry set.
[0075] S3.5. Perform constraint filtering on the candidate matching item set, and remove candidate matching items that do not meet the time limit requirements, resource requirements and migration restrictions to obtain the effective matching item set.
[0076] Furthermore, the deadline or latency limit, CPU requirement, memory requirement, bandwidth requirement, migration permission, maximum number of migrations, and target layer limit are read sequentially from each candidate matching entry and converted into time limit requirements, resource requirements, and migration restrictions, respectively. The deadline or latency limit is mapped to time limit requirements, CPU requirement, memory requirement, and bandwidth requirement to resource requirements, and migration permission, maximum number of migrations, and target layer limit to migration restrictions. The content is then checked against the local resource layer or edge node resource conditions corresponding to the candidate matching entry. For time limit requirements, it is checked whether the corresponding resources can be completed within the time required by the scheduled task. For resource requirements, it is checked whether the resource type, availability status, occupancy, and allocability can meet the needs of the scheduled task. For migration restrictions, it is checked whether the execution location and migration conditions are consistent with the restrictions corresponding to the scheduled task. Candidate matching entries that do not meet the time limit requirements, resource requirements, and migration restrictions are eliminated, and candidate matching entries that meet the corresponding conditions are retained and organized according to the correspondence of the scheduled task to obtain a set of valid matching entries.
[0077] S3.6. Based on the set of valid matching entries, perform a matching judgment between the task to be scheduled and the corresponding resource status, and obtain the sorting of the matching entries.
[0078] Furthermore, each valid matching entry is read sequentially according to the order of the tasks to be scheduled. The resource status of the local resource layer or edge node corresponding to the valid matching entry is compared item by item with the execution requirements, execution constraints, and execution characteristics in the task attribute information to verify whether the time limit requirements, resource requirements, and migration restrictions are consistent. Valid matching entries that meet the matching conditions are retained and sorted in hierarchical lexicographical order. The expression for calculating the resource matching degree is:
[0079] ;
[0080] in, This indicates the resource matching degree; the larger the value, the higher the degree of adaptability of the candidate resource to the scheduled task. This indicates the available CPU quantity of candidate resources, used to characterize the amount of CPU resources that can be allocated to the scheduled task at the current local resource layer or edge node; This represents the amount of CPU required by the task to be scheduled, and is used to characterize the amount of CPU resources required during the execution of the task to be scheduled. This indicates the amount of available memory for candidate resources, representing the amount of memory resources that can be allocated to the scheduled task at the current local resource layer or edge node. This represents the amount of memory required by the task to be scheduled, and is used to characterize the amount of memory resources required during the execution of the task to be scheduled. This indicates the available bandwidth of the candidate resources, representing the amount of bandwidth resources that can be allocated to the scheduled tasks at the current local resource layer or edge node. This indicates the amount of bandwidth required by the task to be scheduled, and is used to characterize the amount of bandwidth resources required during the execution of the task.
[0081] First, sort by time limit requirements in descending order of margin, then by resource matching degree in descending order, and finally by migration cost in ascending order. If the sorting results are the same, sort by current node load in ascending order to obtain the matching entries.
[0082] It should be noted that hierarchical lexicographical order refers to sorting the data by comparing four keywords in sequence: time limit requirement, resource matching degree, migration cost, and current node load.
[0083] All ratios in the resource matching score are dimensionless. CPU, memory, and bandwidth are calculated with equal weight by default. Constraints such as occupancy limits and queuing latency requirements have been determined in the previous screening process. The resource matching score is only used to sort the candidate items that have passed the screening.
[0084] S3.7. Based on the matching entries, sort the local resource layers and edge nodes corresponding to the tasks to be scheduled, retain and merge them, and generate an initial scheduling decision set.
[0085] Furthermore, matching entries are read and sorted according to the order of the tasks to be scheduled. A preset number of top-ranked candidate entries for each task to be scheduled are retained, including a preset number of local candidate entries and a preset number of edge candidate entries. The top-ranked candidate entries are then determined as the preferred entries. The corresponding local resource layers and edge nodes are extracted from the retained candidate entries and merged into the same record according to the correspondence of the tasks to be scheduled, forming a candidate list and preferred entries. Duplicate candidate entries that are ranked low are cleaned up to generate an initial scheduling decision set.
[0086] It should be noted that the preset number can be set according to the priority of the task to be scheduled, the type of resource requirement, and the distribution of candidate resources. It is used to retain the top N local candidate entries and the top M edge candidate entries corresponding to each task to be scheduled.
[0087] S4. Based on the initial scheduling decision set, the tasks to be scheduled are divided into levels, the task level identifiers are obtained, the task level identifiers are subject to dual admission judgment, and a scheduling arrangement is generated.
[0088] S4.1. Based on the tasks to be executed in the initial scheduling decision set, extract the local candidate entries and edge candidate entries corresponding to each task to be scheduled to form a decision input entry set.
[0089] Furthermore, the records corresponding to the tasks to be scheduled are filtered out item by item from the initial scheduling decision set, and then the local resource layer records and edge node records are searched according to the correspondence of the tasks to be scheduled. Among them, the records corresponding to the tasks to be scheduled and used for local execution decision are organized into local candidate entries, and the records corresponding to the tasks to be scheduled and used for edge execution decision are organized into edge candidate entries. The local candidate entries and edge candidate entries corresponding to each task to be scheduled are gathered into the same record content to form a decision input entry set.
[0090] S4.2. Based on the set of input entries, the tasks to be scheduled are hierarchically divided to obtain task hierarchical identifiers. According to the task hierarchical identifiers, local layer admission determination and edge layer admission determination are performed on the tasks to be scheduled to obtain local admission flags and edge admission flags.
[0091] Furthermore, the local candidate entries and edge candidate entries corresponding to each scheduled task are read item by item according to the order of the scheduled tasks, and the execution position, resource content, and executable conditions corresponding to the local candidate entries and edge candidate entries are compared and organized. When dividing the hierarchy, the task level identifier is determined according to latency constraints, data locality, resource requirements, and migration acceptability. When the upper limit of the latency of the scheduled task is less than the first preset latency threshold and the data locality requirement is local, the task level identifier is determined to be L0; when the upper limit of the latency of the scheduled task is between the first preset latency threshold and the second preset latency threshold and migration is allowed, the task level identifier is determined to be L1; when the upper limit of the latency of the scheduled task is greater than the second preset latency threshold and the transmission overhead is acceptable, the task level identifier is determined to be L2. The hierarchical identifier is L2. Local and edge layer admission checks are performed on the task to be scheduled based on the task hierarchical identifier. The local layer admission check verifies whether the content of the corresponding local candidate entry meets the conditions for the task to be scheduled to enter the local execution layer; if it does, it is marked as a local admission flag. The edge layer admission check verifies whether the content of the corresponding edge candidate entry meets the conditions for the task to be scheduled to enter the corresponding edge execution layer; if it does, it is marked as an edge admission flag. First, a priority layer is determined based on the task hierarchical identifier. If the priority layer admission is successful, the priority layer is used as the execution layer. If the priority layer admission fails but another layer admission is successful, the other layer is used as a backup layer and execution is transferred to the backup layer. If both the local and edge layer admission checks fail, the corresponding task to be scheduled is transferred to the waiting queue.
[0092] S4.3. Based on the task level identifier, local access marker, and edge access marker, determine the execution location, resource allocation, and execution order of the tasks to be scheduled, and generate a scheduling arrangement.
[0093] Furthermore, the task level identifier corresponding to each task to be scheduled is checked against the local admission mark and the edge admission mark item by item. For tasks to be scheduled whose task level identifier points to the local execution range and whose local admission mark meets the admission conditions, the local resource layer is determined as the execution location, and the resource allocation content is sorted out from the corresponding local candidate entries. For tasks to be scheduled whose task level identifier points to the edge execution range and whose edge admission mark meets the admission conditions, the edge node is determined as the execution location, and the resource allocation content is sorted out from the corresponding edge candidate entries. Then, each task to be scheduled is arranged in a deterministic sorting order (the resource consumption and migration cost are sorting parameters obtained by sorting or calculating the previous candidate entries), sorted by deadline, then by task priority, then by resource consumption from low to high, and then by migration cost from low to high, to generate a scheduling arrangement.
[0094] S5. Execute the scheduled tasks based on the scheduling arrangement, and perform resource compression and inter-layer migration when the resource pressure continues to exceed the preset resource pressure migration threshold, and generate the scheduling execution status.
[0095] S5.1. Start the execution of the scheduled tasks according to the scheduling arrangement, and establish an observation object table. Based on the observation object table, continuously collect resource pressure data of the local resource layer and edge nodes to obtain pressure observation entries.
[0096] Furthermore, the scheduled tasks are initiated according to the execution location, resource allocation, and execution order determined in the scheduling arrangement. The scheduled tasks, local resource layers, and edge nodes already in the execution process are then registered in the observation object table according to their corresponding relationships. The execution location and resource usage of the scheduled tasks are written into the observation object table to establish the observation object table. Based on the registration content in the observation object table, resource pressure data of the local resource layer and edge nodes during the execution of the scheduled tasks are continuously collected. The resource pressure data includes at least CPU utilization, memory utilization, bandwidth utilization, and task queuing latency. The collection method is timed sampling, and the sampling period is a preset time interval (set comprehensively based on the rate of change of resource pressure, task latency sensitivity, and system monitoring overhead). The collected resource pressure data are normalized. During collection, the resource usage changes corresponding to the local resource layer and the edge nodes are read item by item. The resource pressure data collected each time are organized into the same record according to the correspondence between the scheduled tasks, local resource layers, and edge nodes to obtain pressure observation entries.
[0097] S5.2. Use pressure observation entries to determine resource pressure migration for the tasks to be scheduled, obtain resource pressure migration values, and when the resource pressure migration value continuously exceeds the preset resource pressure migration threshold, perform resource compression on the local resource layer, perform inter-layer migration on the tasks to be scheduled that meet the migration conditions, and generate task execution status.
[0098] Furthermore, a resource pressure migration threshold is pre-set based on historical resource pressure data from the local resource layer and edge nodes. The resource pressure migration value is obtained by combining the moving average of CPU utilization, memory utilization, bandwidth utilization, and task queuing latency. The resource pressure changes in the local resource layer and edge nodes are continuously read from the pressure observation entries according to the order of the tasks to be scheduled. Then, combined with the current execution location and resource usage of the tasks to be scheduled, a resource pressure migration judgment is performed on each task. When the resource pressure migration value exceeds the preset resource pressure migration threshold for N consecutive observation periods, the resource pressure migration of the tasks in the local resource layer that are related to the task to be scheduled is assessed. The resource usage of each task is compressed. Specifically, the local CPU and memory quotas used by low-priority tasks are reclaimed according to a preset ratio (based on the current resource utilization rate of the local resource layer, the amount of resources to be reclaimed, and the priority level of the low-priority tasks), and the remaining resources are reorganized. For tasks that meet the migration conditions, inter-layer migration is performed. During migration, the task context, input data location, and execution progress markers are synchronized to the target edge node. The direction of inter-layer migration is from the local resource layer to the edge node. Finally, the resource compression results and inter-layer migration results are summarized according to the correspondence between the tasks to be scheduled to generate the task execution status.
[0099] It should be noted that the migration conditions are set based on the portability of the task to be scheduled, the availability of resources in the target resource layer, the comparison between migration overhead and migration benefits, and the satisfaction of task latency / priority constraints.
[0100] The resource pressure migration threshold is set based on the statistical results of resource pressure migration values of local resource layers and edge nodes within the historical observation period, and is used as the trigger for resource compression and inter-layer migration.
[0101] S5.3 Record the current execution location, resource quota, and status change information of the task based on the task execution status, and generate the scheduling execution status.
[0102] Furthermore, the system reads the records corresponding to each task to be scheduled item by item, determines the current execution layer and corresponding node position of the task from the task execution status, and records it as the current execution position of the task; then, it organizes the local resource quota and edge resource quota actually occupied or adjusted after resource compression during the task execution into resource quotas; at the same time, it compares the execution results before and after task execution and before and after inter-layer migration, summarizes the startup changes, running changes, compression changes and migration changes, and forms state change information; and finally, it summarizes the task current execution position, resource quota and state change information according to the correspondence of the tasks to be scheduled to generate the scheduling execution status.
[0103] S6. Based on the scheduling execution status, release local resource quotas and edge resource quotas, and generate hierarchical scheduling update information.
[0104] S6.1. Based on the scheduling execution status, extract the task execution status information corresponding to the task to be scheduled, form a release object list, release the corresponding local resource quota and edge resource quota according to the release object list, and collect the local resource layer status and edge collaborative resource status after release to obtain the observation items after release.
[0105] Furthermore, the records in the scheduling execution status are read item by item according to the order of the tasks to be scheduled. The execution position, resource quota occupation, and status change results of each task to be scheduled are extracted from the scheduling execution status and organized into task execution status information. Then, based on the task execution status information, tasks to be scheduled are screened out that have been completed, have been migrated and have source resources that can be released, or have task checkpoints that have been persisted and have corresponding resource quotas that can be released. The execution position and resource quota occupation of the tasks to be scheduled are summarized and organized to form a release object list. Based on the release object list, the local resource quotas and / or edge resource quotas that are currently occupied or still occupied in the migration history of the tasks to be scheduled are released item by item. When releasing, the corresponding resource quotas are adjusted from occupied to allocable and the corresponding record content is updated synchronously. The status of the relevant local resource layer and edge nodes is collected again. The status of the local resource layer and edge collaborative resources after release are read item by item. The release results and the status content after release are organized into the same record content according to the correspondence of the tasks to be scheduled, and the observation items after release are obtained.
[0106] S6.2. Based on the observation entries after release, update and determine the resource release status, pressure reduction status, and execution cost of the task to be scheduled, and obtain the hierarchical scheduling update amount.
[0107] Furthermore, based on the correspondence between the tasks to be scheduled, the records are read, and the release results of local and edge resource quotas, as well as the status of the local resource layer and the status of the edge collaborative resources after release, are extracted from the observation entries after release. For each task to be scheduled, it is checked whether the resource quota has been released and whether the resources have been restored to an allocatable state after release. Then, it is checked whether the resource occupancy and resource pressure in the status of the local resource layer and the status of the edge collaborative resources after release have decreased. At the same time, the total execution time and the number of migrations are determined as the execution cost by combining the changes in resource occupancy, resource compression, and inter-layer migration during the execution of the task to be scheduled. The resource release status, pressure decrease status, and execution cost are summarized into a hierarchical scheduling update quantity, which includes at least the resource release update field, the pressure decrease update field, and the execution cost update field.
[0108] S6.3 Merge task attribute information by scheduling execution status and post-release observation entries to generate task profile data, and modify resource thresholds, admission thresholds and migration restrictions by scheduling execution status, post-release observation entries and hierarchical scheduling update amount to generate scheduling parameter data.
[0109] Furthermore, the current execution location, resource quota, and status change information of the task in the scheduling execution status are matched and merged with the resource release results, local resource layer status after release, and edge collaborative resource status after release in the post-release observation entries, combined with task attribute information. Content reflecting the execution process, resource occupancy changes, inter-layer migration results, and release results of the task to be scheduled is organized into the corresponding record of the same task to be scheduled. Duplicate content is checked and cleaned up, and inconsistent content is corrected according to the actual execution results, generating task profile data. The scheduling parameter data includes at least the resource pressure migration threshold, admission threshold, and migration restrictions determined in the previous steps. The source pressure migration threshold is a threshold set based on historical resource pressure data of the local resource layer and edge nodes and corrected after execution feedback. The admission threshold is the resource and latency condition threshold used for admission judgment of the local layer and the edge layer. The admission threshold is the resource and latency admission condition corresponding to the task to be scheduled entering the local execution layer or the edge execution layer. The migration restriction is the corresponding migration permission, maximum migration number and target layer restriction in the task attribute information. Then, combined with the scheduling execution status, post-release observation entries and hierarchical scheduling update, the actual changes of resource threshold, admission threshold and migration restriction during the execution process are checked and the corresponding corrections are completed to generate scheduling parameter data.
[0110] It should be noted that the resource threshold, admission threshold, and migration restriction are adjusted based on the changes in resource pressure, task execution results, and migration benefits represented by the hierarchical scheduling update volume, and are tightened or relaxed within their respective preset upper and lower limits.
[0111] S6.4 Summarize the task level identifier, edge node identifier, resource threshold and migration restriction in the task profile data and scheduling parameter data to generate hierarchical scheduling update information.
[0112] Furthermore, the task level identifier and edge node identifier in the task profile data, as well as the resource threshold and migration restriction in the scheduling parameter data, are read separately. Then, according to the correspondence of the tasks to be scheduled, the above content is organized into the same record. Duplicate content is checked and cleaned up, and inconsistent content is reorganized according to the actual retention results to generate hierarchical scheduling update information.
[0113] This embodiment also provides a computer device applicable to the vehicle-machine resource hierarchical scheduling method based on edge computing, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the vehicle-machine resource hierarchical scheduling method based on edge computing as proposed in the above embodiment.
[0114] The computer device can be a terminal, including a processor, memory, communication interface, display screen, and input device connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, carrier networks, NFC (Near Field Communication), or other technologies. The display screen can be an LCD screen or an e-ink display. The input device can be a touch layer covering the display screen, buttons, a trackball, or a touchpad on the computer device's casing, or an external keyboard, touchpad, or mouse.
[0115] This embodiment also provides a storage medium on which a computer program is stored. When executed by a processor, the program implements the vehicle-to-everything (V2X) resource hierarchical scheduling method based on edge computing as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0116] In summary, this invention achieves a unified scheduling foundation for vehicle-mounted tasks and edge-side resources by establishing a local resource layer and an edge collaborative resource pool, and registering, associating, and matching task attributes and resource statuses. In particular, through task hierarchy division and dual admission judgment, it realizes differentiated scheduling control for different tasks between local and edge environments, which helps improve the rationality of resource allocation. By performing resource compression, inter-layer migration, and parameter updates after release when resource pressure changes, it achieves dynamic adjustment and continuous optimization of the scheduling process, thereby achieving the beneficial effects of improving the coordination, flexibility, and operational stability of vehicle-mounted resource hierarchical scheduling.
[0117] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A hierarchical scheduling method for vehicle-to-everything (V2X) resources based on edge computing, characterized in that, include: Collect basic attribute data and initial resource data, obtain task attribute information, and establish a local resource layer and an edge collaborative resource pool; Register and associate task attribute information, local resource layer status, and edge collaborative resource status to generate an initial scheduling information set; Based on the initial scheduling information set, the local resource layer status and edge collaborative resource status are refreshed to obtain the resource status. The task attribute information is then matched with the resource status to generate the initial scheduling decision set. The specific steps are as follows: Based on task attribute information and resource status, construct candidate matching entries between the task to be scheduled and the local resource layer and edge nodes, and obtain a set of candidate matching entries; Constraint filtering is performed on the candidate matching item set to remove candidate matching items that do not meet the time limit requirements, resource requirements and migration restrictions, and obtain the effective matching item set; Based on the set of valid matching entries, the task to be scheduled is matched with the corresponding resource status, and the matching entries are sorted. Based on the matching entries, the local resource layer and edge nodes corresponding to the tasks to be scheduled are retained and merged to generate an initial scheduling decision set. Based on the initial scheduling decision set, the tasks to be scheduled are hierarchically divided to obtain task hierarchical identifiers. Dual admission criteria are then applied to these task hierarchical identifiers to generate scheduling arrangements. The specific steps are as follows: Based on the tasks to be executed in the initial scheduling decision set, extract the local candidate entries and edge candidate entries corresponding to each task to be scheduled to form a decision input entry set; Based on the set of input entries, the tasks to be scheduled are hierarchically divided to obtain task hierarchical identifiers. According to the task hierarchical identifiers, local layer admission determination and edge layer admission determination are performed on the tasks to be scheduled to obtain local admission markers and edge admission markers. Based on the task level identifier, local access marker, and edge access marker, determine the execution location, resource allocation, and execution order of the tasks to be scheduled, and generate a scheduling arrangement; The scheduled tasks are executed based on the scheduling arrangement, and resource compression and inter-layer migration are performed when the resource pressure continues to exceed the preset resource pressure migration threshold, generating the scheduling execution status. Based on the scheduling execution status, release local resource quotas and edge resource quotas, and generate hierarchical scheduling update information.
2. The vehicle-to-machine resource hierarchical scheduling method based on edge computing as described in claim 1, characterized in that, The specific steps for collecting basic attribute data and initial resource data, obtaining task attribute information, and establishing a local resource layer and an edge collaborative resource pool are as follows: Collect basic attribute data of the tasks to be scheduled, as well as initial resource data from the vehicle's local system and the edge side, and extract task attribute information from the basic attribute data; A local resource layer is established based on the initial resource data of the vehicle's local system, and an edge collaborative resource pool is established based on the initial resource data of the edge side.
3. The vehicle-to-machine resource hierarchical scheduling method based on edge computing as described in claim 1, characterized in that, The steps for registering and associating task attribute information, local resource layer status, and edge collaborative resource status to generate an initial scheduling information set are as follows: Register the task attribute information, obtain the task record set, and register the local resource layer status and edge collaborative resource status, obtain the local resource layer record set and edge collaborative resource record set; Associate the task record set, the local resource layer record set, and the edge collaborative resource record set to obtain the task resource correspondence; Based on the correspondence between tasks and resources, task attribute information, local resource layer status, and edge collaborative resource status are merged and organized to generate an initial scheduling information set.
4. The vehicle-to-machine resource hierarchical scheduling method based on edge computing as described in claim 1, characterized in that, The steps for refreshing the local resource layer status and edge collaborative resource status based on the initial scheduling information set to obtain the resource status are as follows: Extract local resource layer identifiers and edge node identifiers from the initial scheduling information set to form a refresh object set. Based on the refresh object set, synchronously refresh the local resource layer status and the edge collaborative resource status to obtain a refresh resource record set. Based on the refresh resource record set, perform corresponding processing on the local resource layer and edge nodes in the same refresh object set to obtain the resource status correspondence; The local resource layer refresh records and edge collaborative resource refresh records in the refresh resource record set are merged and organized according to the resource status correspondence to generate resource status.
5. The vehicle-to-machine resource hierarchical scheduling method based on edge computing as described in claim 1, characterized in that, The process involves executing scheduled tasks based on a scheduling arrangement, and performing resource compression and inter-layer migration when resource pressure continuously exceeds a preset resource pressure migration threshold, thereby generating a scheduling execution status. The specific steps are as follows: The scheduled tasks are started according to the scheduling arrangement, and an observation object table is established. Based on the observation object table, resource pressure data of local resource layer and edge nodes are continuously collected to obtain pressure observation entries. The resource pressure migration of the scheduled tasks is determined by the pressure observation entries, and the resource pressure migration value is obtained. When the resource pressure migration value continues to exceed the preset resource pressure migration threshold, resource compression is performed on the local resource layer, and inter-layer migration is performed on the scheduled tasks that meet the migration conditions, generating task execution status. Record the current execution location, resource quota, and status change information of the task based on the task execution status, and generate the scheduling execution status.
6. The vehicle-to-machine resource hierarchical scheduling method based on edge computing as described in claim 1, characterized in that, Based on the scheduling execution status, local resource quotas and edge resource quotas are released, and hierarchical scheduling update information is generated. The specific steps are as follows: Based on the scheduling execution status, extract the task execution status information corresponding to the task to be scheduled, form a release object list, release the corresponding local resource quota and edge resource quota according to the release object list, and collect the local resource layer status and edge collaborative resource status after release to obtain the observation items after release. Based on the observation entries after release, the resource release status, pressure reduction status, and execution cost of the task to be scheduled are updated and determined to obtain the hierarchical scheduling update amount; Task attribute information is merged by scheduling execution status and post-release observation entries to generate task profile data. Resource thresholds, admission thresholds and migration restrictions are corrected by scheduling execution status, post-release observation entries and hierarchical scheduling update amount to generate scheduling parameter data. The task level identifier, edge node identifier, resource threshold, and migration restriction in the task profile data and scheduling parameter data are summarized to generate hierarchical scheduling update information.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the vehicle-machine resource hierarchical scheduling method based on edge computing as described in any one of claims 1 to 6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the vehicle-machine resource hierarchical scheduling method based on edge computing as described in any one of claims 1 to 6.