Task forwarding resource scheduling method and device, equipment and medium

By obtaining forwarding task information and the resources available to forwarding equipment, determining the resources occupied by forwarding tasks and optimizing resource allocation and forwarding paths, the problems of unreasonable resource allocation and poor forwarding in the existing technology are solved, and more efficient resource utilization and real-time forwarding are achieved.

CN120166147AInactive Publication Date: 2025-06-17BEIJING VISION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510159436.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-13
Publication Date
2025-06-17
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When multiple forwarding tasks are processed simultaneously, the prior art cannot effectively balance the needs of each forwarding task, resulting in unreasonable resource allocation and poor real-time performance of forwarding.

Method used

By obtaining forwarding task information and the resources available to the forwarding device, the occupied resources of each forwarding task are determined, and the first forwarding number and transit strategy are determined based on this information, and the resource allocation and forwarding path are optimized.

Benefits of technology

The rationality of resource allocation and real-time task forwarding are improved, and the resource utilization rate of forwarding equipment is improved by reasonably allocating resources and optimizing forwarding paths.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120166147A_ABST
    Figure CN120166147A_ABST
Patent Text Reader

Abstract

The invention relates to a task forwarding resource scheduling method and device, equipment and a medium, and is applied to the technical field of task forwarding, the method comprises the following steps: obtaining forwarding task information and available resources of forwarding equipment, the forwarding task information comprising forwarding tasks, a to-be-forwarded number and available resources of a target terminal; determining occupied resources of each forwarding task, wherein the occupied resources comprise a coding resource, a decoding resource, a first forwarding resource and a second forwarding resource; determining a first forwarding number based on the occupied resources and available resources of the forwarding device, wherein the first forwarding number is the number of forwarding tasks forwarded by the forwarding device; and determining a transfer strategy based on the first forwarding number, the occupied resource and the available resource of the target terminal, the transfer strategy comprising transfer terminals, second forwarding numbers and a forwarding path, and the second forwarding numbers corresponding to the transfer terminals being different. The method and the device have the effects of improving the rationality of resource allocation, thereby improving the real-time performance of task forwarding.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of task forwarding, and in particular, to a task forwarding resource scheduling method, apparatus, device, and medium. Background Art

[0002] With the rapid development of technologies such as the Internet of Things (IoT), cloud computing, and edge computing, a large amount of data needs to be frequently exchanged between various intelligent devices and terminals, which poses higher requirements for resource management. Effective task forwarding resource scheduling can optimize resource utilization, improve data transmission efficiency, reduce latency, and thus enhance the user experience.

[0003] In some application scenarios, a forwarding device needs to forward forwarding tasks including images or videos to multiple terminals. When the forwarding device needs to process multiple forwarding tasks simultaneously, due to the limited processing capacity of the forwarding device, it is unable to process all forwarding tasks simultaneously. Currently, it is usually processed sequentially according to the order in which the forwarding tasks are generated. However, this processing method cannot effectively balance the requirements of each forwarding task, easily leads to unreasonable resource allocation, and thus the real-time performance of forwarding is poor. Summary of the Invention

[0004] In order to improve the rationality of resource allocation and thus improve the real-time performance of task forwarding, this application provides a task forwarding resource scheduling method, apparatus, device, and medium.

[0005] In a first aspect, this application provides a task forwarding resource scheduling method, adopting the following technical solution: A task forwarding resource scheduling method includes: Obtain forwarding task information and available resources of the forwarding device. The forwarding task information includes the forwarding task, the number of tasks to be forwarded, and available resources of the target terminal. The available resources of the forwarding device include available computing resources of the forwarding device and available network resources of the forwarding device. The available resources of the target terminal include available computing resources of the target terminal and available network resources of the target terminal; Determine the occupied resources of each forwarding task. The occupied resources include encoding resources, decoding resources, first forwarding resources, and second forwarding resources. The first forwarding resources are the computing resources required for each forwarding of the forwarding task, and the second forwarding resources are the network resources required for each forwarding of the forwarding task; Determine a first forwarding quantity based on the occupied resources and the available resources of the forwarding device. The first forwarding quantity is the number of forwarding tasks forwarded by the forwarding device; Determine a relay strategy based on the first forwarding quantity, the occupied resources, and the available resources of the target terminal. The relay strategy includes relay terminals, a second forwarding quantity, and a forwarding path. The second forwarding quantity is the quantity of the forwarding task forwarded by each relay terminal, and the second forwarding quantity corresponding to each relay terminal is different. The forwarding path is the corresponding relationship between each relay terminal and each target terminal.

[0006] By adopting the above technical solution, the quantity that the forwarding device can forward, that is, the first forwarding quantity, is obtained based on the occupied resources of the forwarding task and the available resources of the forwarding device. The remaining forwarding process is completed by the relay terminals. The second forwarding quantity of the relay terminals is determined based on the available resources of the relay terminals, improving the utilization rate of the resources of the relay terminals. Different relay terminals correspond to different second forwarding quantities, improving the rationality of resource allocation, and thus improving the real-time performance of task forwarding.

[0007] Optionally, the determining the first forwarding quantity based on the occupied resources and the available resources of the forwarding device includes: Calculate the occupied computing resources and occupied network resources required for each forwarding task; Calculate the total computing resources required for the forwarding task; If the total computing resources are greater than the available computing resources of the forwarding device, obtain the task level and emergency level of each forwarding task; Determine the priority level score of each forwarding task based on the task level and the emergency level; Sort the forwarding tasks based on the priority level score to obtain a score sorting result; Divide the forwarding tasks into multiple task combinations based on the score sorting result, the occupied computing resources, and the available computing resources of the forwarding device. The forwarding tasks in each task combination are tasks processed by the forwarding device simultaneously; Calculate the total network resources required for the forwarding tasks in each task combination; If the total network resources are greater than the available network resources of the forwarding device, calculate the minimum forwarding quantity of each forwarding task based on a preset forwarding ratio; Calculate the minimum required network resources of each forwarding task based on the minimum forwarding quantity; Determine the first forwarding quantity of each forwarding task based on the minimum required network resources and the available network resources of the forwarding device.

[0008] By adopting the above technical solution, when the forwarding device corresponds to multiple forwarding tasks, first, determine the task combination to be processed by the forwarding device this time based on the available computing resources of the forwarding device, the total computing resources required for the multiple forwarding tasks, and the priority level scores of each forwarding task. Then, determine the first forwarding quantity of each forwarding task in the task combination based on the total network resources required for the forwarding tasks in each task combination, the available network resources of the forwarding device, and the minimum forwarding quantity of each forwarding task. By comprehensively considering the computing resources and network resources to determine the first forwarding quantity, the reliability of forwarding is improved.

[0009] Optionally, determining the first forwarding quantity of each forwarding task based on the minimum required network resources and the available network resources of the forwarding device includes: Calculate the sum of the first minimum required network resources of the forwarding tasks in each task combination, where the sum of the first minimum required network resources is the sum of the minimum required network resources of all the forwarding tasks in each task combination; If the sum of the first minimum required network resources is less than the available network resources of the forwarding device, calculate the network resource difference based on the available network resources of the forwarding device and the sum of the first minimum required network resources; Calculate the minimum computing resources corresponding to each forwarding task based on the coding resources, the minimum forwarding quantity, and the first forwarding resources; Calculate the sum of the minimum computing resources required for all the forwarding tasks in the task combination based on the minimum computing resources; Determine the computing resource difference based on the available computing resources of the forwarding device and the sum of the minimum computing resources; Allocate the remaining computing resources and the remaining network resources to the forwarding tasks in the current task combination based on the scoring and sorting results, the computing resource difference, and the network resource difference, and determine the first forwarding quantity of each forwarding task based on the allocation situation and the minimum forwarding quantity.

[0010] By adopting the above technical solution, when the sum of the first minimum required network resources of all the forwarding tasks in the task combination is less than the available network resources of the forwarding device, re-allocate the remaining computing resources and the remaining network resources to the forwarding tasks in the current task combination through the scoring and sorting results, the network resource difference, and the computing resource difference, improving the utilization rate of the resources of the forwarding device and the real-time performance of task forwarding.

[0011] Optionally, if the sum of the first minimum required network resources is greater than the available network resources of the forwarding device, the method further includes: Select the forwarding tasks in the current task combination from the scoring and sorting results in sequence until the second lowest required network resource of the selected first forwarding task meets the preset conditions. The preset conditions include that the second lowest required network resource is not greater than the available network resource of the forwarding device, and the sum of the second lowest required network resource and the lowest required network resource of the next forwarding task in the scoring and sorting results is greater than the available network resource of the forwarding device; Determine the lowest forwarding quantity as the first forwarding quantity of the first forwarding task.

[0012] By adopting the above technical solution, when the sum of the first lowest required network resources of all forwarding tasks in the task combination is greater than the available network resource of the forwarding device, resources are allocated to the forwarding tasks in the task combination in sequence according to the scoring and sorting results, so that the forwarding tasks with higher priority scores can be processed preferentially, improving the rationality of resource allocation.

[0013] Optionally, determining the transfer strategy based on the first forwarding quantity, the occupied resources, and the available resources of the target terminal includes: Calculate the remaining forwarding quantity based on the first forwarding quantity and the quantity to be forwarded; Calculate a first quantity based on the decoding resources, the available computing resources of the target terminal, and the first forwarding resources; Calculate a second quantity based on the available network resources of the target terminal and the second forwarding resources; Determine the maximum forwarding quantity based on the first quantity and the second quantity; Combine the target terminals based on the exhaustive method to obtain a plurality of first candidate transfer combinations, and the number of target terminals in the first candidate transfer combinations is the first forwarding quantity; Calculate the total sum of the maximum forwarding quantities of the target terminals in each first candidate transfer combination; Determine the first candidate transfer combinations with the total sum of the maximum forwarding quantities greater than the remaining forwarding quantity as the second candidate transfer combinations; Determine the reliability levels of the target terminals in each second candidate transfer combination; Determine the combination scores of each second candidate transfer combination based on the reliability levels; Determine the transfer strategy based on the combination scores and the reliability levels.

[0014] By adopting the above technical solution, the target terminals are combined according to the exhaustive method, and the first candidate relay combination is screened by the sum of the maximum forwarding quantities to obtain the second candidate relay combination. The combination score of each second candidate relay combination is obtained by determining the reliability level of the target terminals, and the relay strategy is determined according to the combination score and the reliability levels of the target terminals, improving the reliability of the relay strategy.

[0015] Optionally, determining the reliability levels of the target terminals in the second candidate relay combination includes: Obtaining the decoding quality, network transmission rate, and packet loss rate of each target terminal; Determining the terminal level of each target terminal based on the decoding quality of the target terminal, the network transmission rate, and the packet loss rate; Obtaining the sum of the distances between each target terminal in the second candidate relay combination and other target terminals; Calculating the total transmission duration based on the sum of the distances and the network transmission rate; Determining the reliability level of each target terminal based on the terminal level, the total transmission duration, and the maximum forwarding quantity.

[0016] By adopting the above technical solution, when determining the reliability level of the target terminals, the decoding quality, network transmission rate, packet loss rate, and the sum of the distances to other target terminals are fully considered, improving the accuracy of the reliability level.

[0017] Optionally, determining the relay strategy based on the combination score and the reliability level includes: Determining the second candidate relay combination with the highest combination score as the target relay combination; Determining the target terminals in the target relay combination as relay terminals; Calculating the difference between the sum of the maximum forwarding quantities and the remaining forwarding quantity to obtain the idle forwarding quantity; Sorting the relay terminals in ascending order of the reliability level to obtain the second sorting result; Obtaining the reduction benchmark of the relay quantity for each reliability level; Successively reducing the forwarding quantities of the relay terminals in the second sorting result according to the maximum forwarding quantity and the reduction benchmark of the relay quantity until the sum of the reduced forwarding quantities is equal to the idle forwarding quantity; Calculating the second forwarding quantity of each relay terminal based on the reduced forwarding quantity and the maximum forwarding quantity; Determining the target terminals that are not relay terminals as the terminals to be forwarded; Obtain the transmission distance between each of the relay terminals and each of the terminals to be forwarded; Sort the relay terminals in ascending order of network transmission rate to obtain a third sorting result; Determine the forwarding path between each relay terminal and the terminal to be forwarded based on the third sorting result, the transmission distance, and the second forwarding quantity; Determine the relay strategy based on the relay terminal, the second forwarding quantity, and the forwarding path.

[0018] By adopting the above technical solution, when the sum of the maximum forwarding quantities is greater than the remaining forwarding quantity, the second forwarding quantity of each relay terminal is determined according to the reduction benchmark of the relay quantity corresponding to each reliability level, and the forwarding path is determined according to the network transmission rate of the relay terminal and the transmission distance between the relay terminal and each terminal to be forwarded, so as to obtain the relay strategy, improving the reliability and forwarding efficiency of the relay strategy.

[0019] In a second aspect, the present application provides a task forwarding resource scheduling device, adopting the following technical solution: A task forwarding resource scheduling device, comprising: A task information acquisition module, configured to acquire forwarding task information and available resources of the forwarding device, where the forwarding task information includes a forwarding task, the quantity to be forwarded, and available resources of the target terminal, the available resources of the forwarding device include available computing resources of the forwarding device and available network resources of the forwarding device, and the available resources of the target terminal include available computing resources of the target terminal and available network resources of the target terminal; An occupied resource determination module, configured to determine the occupied resources of each of the forwarding tasks, where the occupied resources include encoding resources, decoding resources, first forwarding resources, and second forwarding resources, the first forwarding resources are the computing resources required for each forwarding of the forwarding task, and the second forwarding resources are the network resources required for each forwarding of the forwarding task; A forwarding quantity determination module, configured to determine a first forwarding quantity based on the occupied resources and the available resources of the forwarding device, where the first forwarding quantity is the quantity of the forwarding task forwarded by the forwarding device; A relay strategy determination module, configured to determine a relay strategy based on the first forwarding quantity, the occupied resources, and the available resources of the target terminal, where the relay strategy includes relay terminals, a second forwarding quantity, and a forwarding path, the second forwarding quantity is the quantity of the forwarding task forwarded by each of the relay terminals, the second forwarding quantity corresponding to each relay terminal is different, and the forwarding path is the corresponding relationship between each of the relay terminals and each target terminal.

[0020] By adopting the above technical solution, the number of resources occupied by the forwarding task and the available resources of the forwarding device are used to obtain the number that the forwarding device can forward, that is, the first forwarding number. The remaining forwarding process is completed by the relay terminal. The second forwarding number of the relay terminal is determined by the available resources of the relay terminal, improving the utilization rate of the resources of the relay terminal. Different relay terminals correspond to different second forwarding numbers, improving the rationality of resource allocation, and thus improving the real-time performance of task forwarding.

[0021] In a third aspect, the present application provides an electronic device, adopting the following technical solution: An electronic device includes a processor, and the processor is coupled to a memory; A computer program capable of being loaded and executed by the processor for the task forwarding resource scheduling method according to any one of the first aspect is stored on the memory.

[0022] In a fourth aspect, the present application provides a computer-readable storage medium, adopting the following technical solution: A computer-readable storage medium stores a computer program capable of being loaded and executed by the processor for the task forwarding resource scheduling method according to any one of the first aspect. Description of the Drawings

[0023] Figure 1 is a flowchart of a task forwarding resource scheduling method provided by an embodiment of the present application.

[0024] Figure 2 is a structural block diagram of a task forwarding resource scheduling device provided by an embodiment of the present application.

[0025] Figure 3 is a structural block diagram of the electronic device provided by an embodiment of the present application. Detailed Embodiments

[0026] The following further details the present application with reference to the accompanying drawings.

[0027] An embodiment of the present application provides a task forwarding resource scheduling method. The task forwarding resource scheduling method can be executed by an electronic device, and the electronic device can be a server or a terminal device. The server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. The terminal device can be a smart phone, a tablet computer, a desktop computer, etc., but is not limited thereto.

[0028] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the following will clearly and completely describe the technical solutions in the embodiments of this application with reference to the accompanying drawings in the embodiments of this application. Obviously, the described embodiments are some, but not all, of the embodiments of this application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of this application without creative efforts shall fall within the scope of protection of this application.

[0029] In addition, the term "and / or" in this document is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally represents an "or" relationship between the associated objects before and after, unless otherwise specified.

[0030] As Figure 1 shown, a task forwarding resource scheduling method, the main processes of which are described as follows (Steps S101 to S104): Step S101: Obtain the forwarding task information and the available resources of the forwarding device.

[0031] Among them, the forwarding task information includes the forwarding task, the quantity to be forwarded, the target terminal, and the available resources of the target terminal. The forwarding task can be image data to be forwarded or video data to be forwarded. The quantity to be forwarded is the number of target terminals to which the forwarding task needs to be forwarded. The target terminal is the terminal to which the forwarding task needs to be forwarded. The available resources of the target terminal are the resources currently available for the target terminal, including the available computing resources of the target terminal and the available network resources of the target terminal. The forwarding device is the device that processes and forwards the forwarding task, which can be any terminal device with encoding and forwarding functions. The relationship between the forwarding task information and the forwarding device is many-to-one. The available resources of the forwarding device are the resources currently available for the forwarding device, including the available computing resources of the forwarding device and the available network resources of the forwarding device. Obtain the forwarding task, the quantity to be forwarded, and the target terminal from the database, obtain the available resources of the target terminal from the target terminal, and obtain the available resources of the forwarding device from the forwarding device.

[0032] Step S102: Determine the occupied resources of each forwarding task.

[0033] Among them, the occupied resources include encoding resources, decoding resources, first forwarding resources, and second forwarding resources. The encoding resources are the computing resources required for encoding the forwarding task. The decoding resources are the computing resources required for decoding the forwarding task. The first forwarding resources are the computing resources required for each forwarding of the forwarding task. The second forwarding resources are the network resources required for each forwarding of the forwarding task.

[0034] In this embodiment, the method for determining the resources occupied by each forwarding task may be to analyze the historical forwarding information using a data analysis tool to obtain the corresponding relationship between the forwarding tasks and various occupied resources, and then search for the corresponding various occupied resources from the corresponding relationship according to the forwarding tasks. Among them, the historical forwarding information includes multiple forwarding tasks and various occupied resources corresponding to each forwarding task. The data analysis tool can be Excel, Python, or SQL.

[0035] Another way to determine the resources occupied by each forwarding task is to perform forwarding simulation on the forwarding tasks through a resource simulation tool to obtain various occupied resources of the forwarding tasks. The resource simulation tool includes, but is not limited to, GNS3, Wireshark, iftop, nload, netstat, Valgrind, etc.

[0036] Step S103: Determine the first forwarding quantity based on the occupied resources and the available resources of the forwarding device.

[0037] Among them, the first forwarding quantity is the quantity of forwarding tasks forwarded by the forwarding device.

[0038] Specifically, determining the first forwarding quantity based on the occupied resources and the available resources of the forwarding device includes: calculating the occupied computing resources and occupied network resources required for each forwarding task; calculating the total computing resources required for the forwarding tasks; if the total computing resources are greater than the available computing resources of the forwarding device, obtaining the task level and emergency level of each forwarding task; determining the priority level score of each forwarding task based on the task level and emergency level; sorting the forwarding tasks based on the priority level score to obtain a score sorting result; dividing the forwarding tasks into multiple task combinations based on the score sorting result, the occupied computing resources, and the available computing resources of the forwarding device. The forwarding tasks in each task combination are tasks processed by the forwarding device simultaneously; calculating the total network resources required for the forwarding tasks in each task combination; if the total network resources are greater than the available network resources of the forwarding device, calculating the minimum forwarding quantity of each forwarding task based on a preset forwarding ratio; calculating the minimum required network resources of each forwarding task based on the minimum forwarding quantity; and determining the first forwarding quantity of each forwarding task based on the minimum required network resources and the available network resources of the forwarding device.

[0039] In this embodiment, for the forwarding device, the occupied computing resources required for each forwarding task = encoding resources + first forwarding resources × quantity to be forwarded, the occupied network resources required for each forwarding task = second forwarding resources × quantity to be forwarded, and the total computing resources corresponding to each forwarding device is the sum of the occupied computing resources required for all forwarding tasks corresponding to the forwarding device.

[0040] If the total computing resources are greater than the available computing resources of the forwarding device, the forwarding device cannot process all forwarding tasks simultaneously. Obtain the task levels and emergency levels of each forwarding task from the database. Different task levels and different emergency levels correspond to different level scores. The priority level score of each forwarding task = the level score corresponding to the task level × the preset weight corresponding to the task level + the level score corresponding to the emergency level × the preset weight corresponding to the emergency level. Sort the forwarding tasks in descending order according to the priority level score to obtain a sorted score result. Select forwarding tasks from the sorted score result in sequence until the sum of the occupied computing resources required by the selected forwarding tasks meets the preset selection condition. The preset selection condition includes that the sum of the occupied computing resources required by the selected forwarding tasks is less than or equal to the available computing resources of the forwarding device, and the result obtained by adding the occupied computing resources required by the next forwarding task in the sorted score result to the sum of the occupied computing resources required by the selected forwarding tasks is greater than the available computing resources of the forwarding device. Determine the selected forwarding tasks as a task combination. For the remaining forwarding tasks in the sorted score result, continue to determine task combinations according to the above method until all the obtained task combinations include all the forwarding tasks corresponding to the forwarding device.

[0041] The total network resources required by the forwarding tasks in each task combination = the sum of the occupied network resources required by all the forwarding tasks in the task combination. If the total network resources are less than or equal to the available network resources of the forwarding device, the first forwarding quantity of each forwarding task is the quantity of tasks to be forwarded; if the total network resources are greater than the available network resources of the forwarding device, it means that the forwarding device cannot complete the forwarding process of all forwarding tasks in the task combination simultaneously. Obtain the preset forwarding ratio corresponding to each forwarding task from the database. The minimum forwarding quantity of each forwarding task = the quantity of tasks to be forwarded × the preset forwarding ratio. The minimum required network resources of each forwarding task = the minimum forwarding quantity × the second forwarding resource. Determine the first forwarding quantity of each forwarding task according to the minimum required network resources and the available network resources of the forwarding device.

[0042] If the total computing resources are less than or equal to the available computing resources of the forwarding device, the forwarding device can perform computing processing on all forwarding tasks simultaneously. Calculate the total network resources required by all the forwarding tasks corresponding to the forwarding device according to the above method, and determine the first forwarding quantity of each forwarding task. The specific steps are not elaborated here.

[0043] More specifically, determining the first forwarding quantity of each forwarding task based on the lowest required network resources and the available network resources of the forwarding device includes: calculating the sum of the first lowest required network resources of the forwarding tasks in each task combination, where the sum of the first lowest required network resources is the sum of the lowest required network resources of all forwarding tasks in each task combination; if the sum of the first lowest required network resources is less than the available network resources of the forwarding device, calculating the network resource difference based on the available network resources of the forwarding device and the sum of the first lowest required network resources; calculating the lowest computing resources corresponding to each forwarding task based on the coding resources, the lowest forwarding quantity, and the first forwarding resources; calculating the sum of the lowest computing resources required for all forwarding tasks in the task combination based on the lowest computing resources; determining the computing resource difference based on the available computing resources of the forwarding device and the sum of the lowest computing resources; allocating the remaining computing resources and the remaining network resources to the forwarding tasks in the current task combination based on the scoring and sorting results, the computing resource difference, and the network resource difference, and determining the first forwarding quantity of each forwarding task based on the allocation situation and the lowest forwarding quantity.

[0044] In this embodiment, the sum of the first lowest required network resources of the forwarding tasks in each task combination is the sum of the lowest required network resources of all forwarding tasks in the task combination. If the sum of the first lowest required network resources is equal to the available network resources of the forwarding device, the lowest forwarding quantity corresponding to each forwarding task is determined as the first forwarding quantity corresponding to the forwarding task.

[0045] If the sum of the first lowest required network resources is less than the available network resources of the forwarding device, then the network resource difference = the available network resources of the forwarding device - the sum of the first lowest required network resources, the lowest computing resources corresponding to each forwarding task = the coding resources + the lowest forwarding quantity × the first forwarding resources, the sum of the lowest computing resources required for all forwarding tasks in the task combination when all forwarding tasks are forwarded according to the lowest forwarding quantity = the sum of the lowest computing resources of all forwarding tasks in the task combination, the computing resource difference = the available computing resources of the forwarding device - the sum of the lowest computing resources, and the remaining computing resources and network resources (i.e., the computing resource difference and the network resource difference) are sequentially allocated to the forwarding tasks in the current task combination according to the order in the scoring and sorting results, and the computing resource difference and the network resource difference are updated.

[0046] When performing allocation, multiple rounds of loops are carried out. In each round of loop, resources are allocated for a forwarding task. The remaining computing resources required for each forwarding task = the first forwarding resource × (the quantity to be forwarded - the minimum forwarding quantity), and the remaining network resources required for each forwarding task = the second forwarding resource × (the quantity to be forwarded - the minimum forwarding quantity). If the remaining network resources are less than or equal to the network resource difference, and the remaining computing resources are less than or equal to the computing resource difference, then the quantity to be forwarded corresponding to the forwarding task is determined as the first forwarding quantity corresponding to the forwarding task. The updated computing resource difference = the current computing resource difference - the remaining computing resources, and the updated network resource difference = the current network resource difference - the remaining network resources. End this round of loop and continue with the next round of loop; if the remaining network resources are greater than the network resource difference and / or the remaining computing resources are greater than the computing resource difference, then the first increased quantity (the calculation result is rounded down) = the network resource difference / the second forwarding resource, the second increased quantity (the calculation result is rounded down) = the computing resource difference / the first forwarding resource, the remaining forwarding quantity = the quantity to be forwarded - the minimum forwarding quantity, the third increased quantity is the smaller of the first increased quantity, the second increased quantity, and the remaining forwarding quantity, the first forwarding quantity = the third increased quantity + the minimum forwarding quantity, the updated computing resource difference = the current computing resource difference - the third increased quantity × the first forwarding resource, the updated network resource difference = the current network resource difference - the third increased quantity × the second forwarding resource. End this round of loop and continue with the next round of loop until the number of loop rounds is equal to the number of forwarding tasks in the task combination, or the updated computing resource difference is 0, or the updated network resource difference is 0, then end the loop.

[0047] Furthermore, if the sum of the first minimum required network resources is greater than the available network resources of the forwarding device, the method further includes: sequentially selecting the forwarding tasks in the current task combination from the scoring and sorting result until the sum of the second minimum required network resources of the selected first forwarding task meets the preset conditions. The preset conditions include that the sum of the second minimum required network resources is not greater than the available network resources of the forwarding device, and the sum of the second minimum required network resources plus the minimum required network resources of the next forwarding task in the scoring and sorting result is greater than the available network resources of the forwarding device; determining the minimum forwarding quantity as the first forwarding quantity of the first forwarding task.

[0048] In this embodiment, the forwarding tasks in the current task combination are sequentially selected from the scoring and sorting results, and the selected forwarding tasks are determined as the first forwarding tasks until the sum of the second lowest required network resources of the selected first forwarding tasks (the sum of the lowest required network resources of the first forwarding tasks) meets the preset conditions, that is, the sum of the second lowest required network resources is not greater than the available network resources of the forwarding device, and the sum of the second lowest required network resources plus the lowest required network resources of the next forwarding task in the scoring and sorting results is greater than the available network resources of the forwarding device. The lowest forwarding quantity is determined as the first forwarding quantity of the first forwarding tasks. For the forwarding tasks other than the first forwarding tasks in the current task combination and the forwarding tasks in the task combinations other than the current task combination, the first forwarding quantity this time is 0, that is, no processing is performed this time, and processing needs to be carried out after the first forwarding tasks are processed. When processing, the first forwarding quantity is calculated in the same way as above, which will not be elaborated here.

[0049] Step S104: Determine the relay strategy based on the first forwarding quantity, occupied resources, and available resources of the target terminal.

[0050] Among them, since the forwarding device may not be able to complete the forwarding work of all forwarding tasks at one time, that is, the first forwarding quantity of the forwarding task is less than the quantity to be forwarded, it is necessary to assist in forwarding through the relay terminal. The relay terminal is the target terminal for forwarding work. The relay strategy includes the relay terminal, the second forwarding quantity, and the forwarding path. The second forwarding quantity is the quantity of the forwarding task forwarded by each relay terminal, and the second forwarding quantity corresponding to each relay terminal is different. The forwarding path is the corresponding relationship between each relay terminal and each target terminal.

[0051] Specifically, determining the relay strategy based on the first forwarding quantity, occupied resources, and available resources of the target terminal includes: calculating the remaining forwarding quantity based on the first forwarding quantity and the quantity to be forwarded; calculating the first quantity based on the decoding resources, available computing resources of the target terminal, and the first forwarding resources; calculating the second quantity based on the available network resources of the target terminal and the second forwarding resources; determining the maximum forwarding quantity based on the first quantity and the second quantity; combining the target terminals by the exhaustive method to obtain multiple first candidate relay combinations, and the number of target terminals in the first candidate relay combinations is the first forwarding quantity; calculating the sum of the maximum forwarding quantities of the target terminals in each first candidate relay combination; determining the first candidate relay combinations with the sum of the maximum forwarding quantities greater than the remaining forwarding quantity as the second candidate relay combinations; determining the reliability levels of the target terminals in the second candidate relay combinations; determining the combination scores of the second candidate relay combinations based on the reliability levels; and determining the relay strategy based on the combination scores and the reliability levels.

[0052] In this embodiment, when determining the relay strategy, only the forwarding tasks processed by the current forwarding device are considered. The remaining forwarding quantity of each forwarding task = the quantity to be forwarded - the first forwarding quantity. The first quantity = (the available computing resources of the target terminal - the decoding resources) / the first forwarding resource. The second quantity = the available network resources of the target terminal / the second forwarding resource. The maximum forwarding quantity of each target terminal is the smaller of the first quantity and the second quantity.

[0053] The target terminals are combined by the exhaustive method to obtain multiple first candidate relay combinations. The number of target terminals in all the first candidate relay combinations is the first forwarding quantity. The total maximum forwarding quantity corresponding to each first candidate relay combination is the sum of the maximum forwarding quantities of all the target terminals in this first candidate relay combination. The first candidate relay combinations with the total maximum forwarding quantity greater than the remaining forwarding quantity are determined as the second candidate relay combinations.

[0054] Determine the reliability levels of the respective target terminals in the second candidate relay combinations, obtain the level scores of each reliability level from the database. The combination score of each second candidate relay combination is the sum of the level scores of all the target terminals in this second candidate relay combination. Determine the relay strategy according to the combination score and the reliability level.

[0055] More specifically, determining the reliability levels of the respective target terminals in the second candidate relay combinations includes: obtaining the decoding quality, network transmission rate, and packet loss rate of each target terminal; determining the terminal level of each target terminal based on the decoding quality, network transmission rate, and packet loss rate of the target terminal; obtaining the sum of the distances between each target terminal in the second candidate relay combination and other target terminals; calculating the total transmission duration based on the sum of the distances and the network transmission rate; determining the reliability level of each target terminal based on the terminal level, the total transmission duration, and the maximum forwarding quantity.

[0056] In this embodiment, obtain the decoding quality, network transmission rate, and packet loss rate of each target terminal from the database or the target terminal. The database stores the corresponding relationship between the decoding quality, network transmission rate, packet loss rate, and the terminal level. Find the terminal level of each target terminal from the corresponding relationship according to the decoding quality, network transmission rate, and packet loss rate of the target terminal; obtain the transmission distance between every two target terminals from the staff, calculate the sum of the transmission distances between each target terminal in the second candidate relay combination and all other target terminals corresponding to the forwarding task. Each target terminal in the second candidate relay combination corresponds to a sum of the distances, that is, the number of the sums of the distances is equal to the number of target terminals in the second candidate relay combination. The total transmission duration = the sum of the distances / the network transmission rate. The database stores the corresponding relationship between the terminal level, the total transmission duration, the maximum forwarding quantity, and the reliability level. Find the reliability level of each target terminal from the corresponding relationship according to the terminal level, the total transmission duration, and the maximum forwarding quantity.

[0057] More specifically, a transit strategy is determined based on the combined score and the reliability level, including: determining the second candidate transit combination with the highest combined score as the target transit combination; determining the target terminal in the target transit combination as the transit terminal; calculating the difference between the total maximum forwarding quantity and the remaining forwarding quantity to obtain the idle forwarding quantity; sorting the transit terminals in ascending order of reliability level to obtain the second sorting result; obtaining the reduction benchmark of the transit quantity for each reliability level; successively reducing the forwarding quantity of each transit terminal in the second sorting result according to the maximum forwarding quantity and the reduction benchmark of the transit quantity until the total reduced forwarding quantity is equal to the idle forwarding quantity; calculating the second forwarding quantity of each transit terminal based on the reduced forwarding quantity and the maximum forwarding quantity; determining the target terminal that is not a transit terminal as the terminal to be forwarded; obtaining the transmission distance between each transit terminal and each terminal to be forwarded; sorting the transit terminals in ascending order of network transmission rate to obtain the third sorting result; determining the forwarding path between each transit terminal and the terminal to be forwarded based on the third sorting result, the transmission distance, and the second forwarding quantity; and determining the transit strategy based on the transit terminals, the second forwarding quantity, and the forwarding path.

[0058] In this embodiment, the second candidate transit combination with the highest combined score is determined as the target transit combination, and the target terminal in the target transit combination is determined as the transit terminal, that is, the terminal used to assist in forwarding the forwarding task. The idle forwarding quantity = the total maximum forwarding quantity corresponding to the target transit combination - the remaining forwarding quantity. If the idle forwarding quantity is greater than 0, the transit terminals are sorted in ascending order of reliability level to obtain the second sorting result. The reduction benchmark of the transit quantity corresponding to different reliability levels is different. The higher the reliability level, the smaller the reduction benchmark of the transit quantity, and the lower the reliability level, the larger the reduction benchmark of the transit quantity. The reduction benchmark of the transit quantity for each reliability level is obtained from the database.

[0059] On the basis of the maximum number of forwards, the forwarding quantities of each relay terminal in the second sorting result are sequentially reduced according to the reduction sequence corresponding to the reliability level, and the reduced quantities are accumulated. The accumulated result is determined as the total reduction of the forwarding quantity. If the total reduction of the forwarding quantity obtained in one cycle is still less than the idle forwarding quantity, the next cycle is performed, that is, the forwarding quantities of each relay terminal in the second sorting result are sequentially reduced according to the reduction sequence of the relay quantity until the total reduction of the forwarding quantity is equal to the idle forwarding quantity. For example, the second sorting result of the relay terminals is relay terminal 1 (the corresponding reduction sequence of the relay quantity is 3), relay terminal 2 (the corresponding reduction sequence of the relay quantity is 2), and relay terminal 3 (the corresponding reduction sequence of the relay quantity is 1), and the idle forwarding quantity is 10. Then, in the first cycle, the reduced forwarding quantity of relay terminal 1 is 3, the reduced forwarding quantity of relay terminal 2 is 2, and the reduced forwarding quantity of relay terminal 3 is 1. At this time, the total reduction of the forwarding quantity = 3 + 2 + 1 = 6, which is less than the idle forwarding quantity, and the next cycle needs to be continued. In the second cycle, the reduced forwarding quantity of relay terminal 1 is 3, and the reduced forwarding quantity of relay terminal 2 is 1. At this time, the total reduction of the forwarding quantity = 6 + 3 + 1 = 10, which is equal to the idle forwarding quantity, and the cycle ends. At this time, the reduced forwarding quantity of relay terminal 1 is 3 + 3 = 6, the reduced forwarding quantity of relay terminal 2 is 2 + 1 = 3, and the reduced forwarding quantity of relay terminal 3 is 1 + 0 = 1. It should be noted that if there is a relay terminal with a reduced forwarding quantity equal to the maximum number of forwards during the cycle, this relay terminal will no longer perform the relay task, and this relay terminal is re-determined as the target terminal, and this relay terminal will not participate in the process of reducing the relay quantity in the next cycle.

[0060] The second forwarding quantity of each relay terminal = the maximum number of forwards - the reduced forwarding quantity. The target terminal that is not a relay terminal is determined as the terminal to be forwarded. The transmission distances between each relay terminal and each terminal to be forwarded are obtained from the staff. The relay terminals are sorted in ascending order of network transmission rate to obtain the third sorting result. When determining the forwarding path, the forwarding paths of each relay terminal are sequentially determined according to the third sorting result. When determining the forwarding path of a relay terminal, the terminals to be forwarded are sorted in ascending order of the transmission distance corresponding to this relay terminal to obtain the fourth sorting result. The first second forwarding quantity of the terminals to be forwarded in the fourth sorting result is determined as the terminals to be forwarded corresponding to this relay terminal. The forwarding path is the forwarding path between the relay terminal and the corresponding terminal to be forwarded. The forwarding strategy is to forward the forwarding task from the relay terminal to the terminal to be forwarded according to the forwarding path.

[0061] If the idle forwarding quantity is equal to 0, the second forwarding quantity of each relay terminal is the maximum number of forwards of this relay terminal. The forwarding path and the forwarding strategy are determined in the same way as above, which will not be elaborated here.

[0062] Figure 2 This is a structural block diagram of a task forwarding resource scheduling device 200 provided by an embodiment of the present application.

[0063] As Figure 2 shown, the task forwarding resource scheduling device 200 mainly includes: A task information acquisition module 201, configured to acquire forwarding task information and available resources of the forwarding device. The forwarding task information includes the forwarding task, the quantity to be forwarded, and the available resources of the target terminal. The available resources of the forwarding device include the available computing resources of the forwarding device and the available network resources of the forwarding device. The available resources of the target terminal include the available computing resources of the target terminal and the available network resources of the target terminal; An occupied resource determination module 202, configured to determine the occupied resources of each forwarding task. The occupied resources include encoding resources, decoding resources, first forwarding resources, and second forwarding resources. The first forwarding resources are the computing resources required for each forwarding of the forwarding task, and the second forwarding resources are the network resources required for each forwarding of the forwarding task; A forwarding quantity determination module 203, configured to determine a first forwarding quantity based on the occupied resources and the available resources of the forwarding device. The first forwarding quantity is the quantity of the forwarding task forwarded by the forwarding device; A transit strategy determination module 204, configured to determine a transit strategy based on the first forwarding quantity, the occupied resources, and the available resources of the target terminal. The transit strategy includes transit terminals, a second forwarding quantity, and a forwarding path. The second forwarding quantity is the quantity of the forwarding task forwarded by each transit terminal, and the second forwarding quantity corresponding to each transit terminal is different. The forwarding path is the corresponding relationship between each transit terminal and each target terminal.

[0064] As an alternative implementation of this embodiment, the forwarding quantity determination module 203 is further specifically configured to determine the first forwarding quantity based on the occupied resources and the available resources of the forwarding device, including: calculating the occupied computing resources and occupied network resources required for each forwarding task; calculating the total computing resources required for the forwarding tasks; if the total computing resources are greater than the available computing resources of the forwarding device, obtaining the task level and urgency level of each forwarding task; determining the priority level score of each forwarding task based on the task level and urgency level; sorting the forwarding tasks based on the priority level score to obtain a score sorting result; dividing the forwarding tasks into multiple task combinations based on the score sorting result, the occupied computing resources, and the available computing resources of the forwarding device, where the forwarding tasks in each task combination are tasks processed by the forwarding device simultaneously; calculating the total network resources required for the forwarding tasks in each task combination; if the total network resources are greater than the available network resources of the forwarding device, calculating the minimum forwarding quantity of each forwarding task based on a preset forwarding ratio; calculating the minimum required network resources of each forwarding task based on the minimum forwarding quantity; and determining the first forwarding quantity of each forwarding task based on the minimum required network resources and the available network resources of the forwarding device.

[0065] As an alternative implementation of this embodiment, the forwarding quantity determination module 203 is further specifically configured to determine the first forwarding quantity of each forwarding task based on the minimum required network resources and the available network resources of the forwarding device, including: calculating the sum of the first minimum required network resources of the forwarding tasks in each task combination, where the sum of the first minimum required network resources is the sum of the minimum required network resources of all forwarding tasks in each task combination; if the sum of the first minimum required network resources is less than the available network resources of the forwarding device, calculating the network resource difference based on the available network resources of the forwarding device and the sum of the first minimum required network resources; calculating the minimum computing resources corresponding to each forwarding task based on the encoding resources, the minimum forwarding quantity, and the first forwarding resources; calculating the sum of the minimum computing resources required for all forwarding tasks in the task combination based on the minimum computing resources; determining the computing resource difference based on the available computing resources of the forwarding device and the sum of the minimum computing resources; allocating the remaining computing resources and the remaining network resources to the forwarding tasks in the current task combination based on the score sorting result, the computing resource difference, and the network resource difference, and determining the first forwarding quantity of each forwarding task based on the allocation situation and the minimum forwarding quantity.

[0066] As an alternative implementation of this embodiment, the forwarding quantity determination module 203 is further specifically configured to, if the sum of the first minimum required network resources is greater than the available network resources of the forwarding device, further include: sequentially selecting the forwarding tasks in the current task combination from the scoring and sorting result until the sum of the second minimum required network resources of the first selected forwarding task meets a preset condition, where the preset condition includes that the sum of the second minimum required network resources is not greater than the available network resources of the forwarding device, and the sum of the second minimum required network resources plus the minimum required network resources of the next forwarding task in the scoring and sorting result is greater than the available network resources of the forwarding device; determining the minimum forwarding quantity as the first forwarding quantity of the first forwarding task.

[0067] As an alternative implementation of this embodiment, the transit policy determination module 204 is further specifically configured to determine the transit policy based on the first forwarding quantity, the occupied resources, and the available resources of the target terminal, including: calculating the remaining forwarding quantity based on the first forwarding quantity and the quantity to be forwarded; calculating the first quantity based on the decoding resources, the available computing resources of the target terminal, and the first forwarding resources; calculating the second quantity based on the available network resources of the target terminal and the second forwarding resources; determining the maximum forwarding quantity based on the first quantity and the second quantity; combining the target terminals by the exhaustive method to obtain a plurality of first candidate transit combinations, where the number of target terminals in the first candidate transit combinations is the first forwarding quantity; calculating the sum of the maximum forwarding quantities of the target terminals in each first candidate transit combination; determining the first candidate transit combinations with the sum of the maximum forwarding quantities greater than the remaining forwarding quantity as the second candidate transit combinations; determining the reliability levels of the respective target terminals in the second candidate transit combinations; determining the combined scores of the respective second candidate transit combinations based on the combined scores and the reliability levels; and determining the transit policy based on the combined scores and the reliability levels.

[0068] As an alternative implementation of this embodiment, the transit policy determination module 204 is further specifically configured to determine the reliability levels of the respective target terminals in the second candidate transit combinations, including: obtaining the decoding quality, network transmission rate, and packet loss rate of each target terminal; determining the terminal level of each target terminal based on the decoding quality, network transmission rate, and packet loss rate of the target terminal; obtaining the sum of the distances between each target terminal in the second candidate transit combination and other target terminals; calculating the total transmission duration based on the sum of the distances and the network transmission rate; and determining the reliability level of each target terminal based on the terminal level, the total transmission duration, and the maximum forwarding quantity.

[0069] As an alternative implementation of this embodiment, the relay strategy determination module 204 is further specifically configured to determine a relay strategy based on the combined score and the reliability level, including: determining the second candidate relay combination with the highest combined score as the target relay combination; determining the target terminal in the target relay combination as the relay terminal; calculating the difference between the total maximum forwarding quantity and the remaining forwarding quantity to obtain the idle forwarding quantity; sorting the relay terminals in ascending order of the reliability level to obtain a second sorting result; obtaining the reduction benchmark of the relay quantity for each reliability level; sequentially reducing the forwarding quantity of each relay terminal in the second sorting result according to the maximum forwarding quantity and the reduction benchmark of the relay quantity until the total reduced forwarding quantity is equal to the idle forwarding quantity; calculating the second forwarding quantity of each relay terminal based on the reduced forwarding quantity and the maximum forwarding quantity; determining the target terminal that is not a relay terminal as the terminal to be forwarded; obtaining the transmission distance between each relay terminal and each terminal to be forwarded; sorting the relay terminals in ascending order of the network transmission rate to obtain a third sorting result; determining the forwarding path between each relay terminal and the terminal to be forwarded based on the third sorting result, the transmission distance, and the second forwarding quantity; and determining the relay strategy based on the relay terminal, the second forwarding quantity, and the forwarding path.

[0070] In one example, the modules in any of the above devices may be one or more integrated circuits configured to implement the above methods. For example: one or more application specific integrated circuits (ASICs), or, one or more digital signal processors (DSPs), or, one or more field programmable gate arrays (FPGAs), or a combination of at least two of these integrated circuit forms.

[0071] Again, when the modules in the device can be implemented in the form of a processing element scheduler, the processing element may be a general-purpose processor, such as a central processing unit (CPU) or other processors that can call programs. Again, these modules may be integrated together and implemented in the form of a system-on-a-chip (SOC).

[0072] Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.

[0073] Figure 3 This is a structural block diagram of an electronic device 300 provided in an embodiment of the present application.

[0074] As shown Figure 3 in FIG. 300, the electronic device 300 includes a processor 301 and a memory 302, and may further include one or more of an information input / output (I / O) interface 303, a communication component 304, and a communication bus 305.

[0075] Among them, the processor 301 is used to control the overall operation of the electronic device 300 to complete all or part of the steps of the above task forwarding resource scheduling method; the memory 302 is used to store various types of data to support the operation of the electronic device 300. These data may include, for example, instructions for any application or method operating on the electronic device 300, and application-related data. The memory 302 may 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 read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a disk, or an optical disc, or one or more of them.

[0076] The I / O interface 303 provides an interface between the processor 301 and other interface modules. The above other interface modules may be a keyboard, a mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 304 is used for wired or wireless communication between the electronic device 300 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, near field communication (NFC), 2G, 3G, or 4G, or a combination of one or more of them. Accordingly, the communication component 304 may include: a Wi-Fi component, a Bluetooth component, an NFC component.

[0077] The electronic device 300 can be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components, and is used to execute the task forwarding resource scheduling method given in the above embodiments.

[0078] The communication bus 305 may include a path for transmitting information between the above components. The communication bus 305 can be a PCI (Peripheral Component Interconnect) bus, an EISA (Extended Industry Standard Architecture) bus, or the like. The communication bus 305 can be divided into an address bus, a data bus, a control bus, and the like.

[0079] The electronic device 300 may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Tablet Computers), PMPs (Portable Multimedia Players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc., and may also be a server, etc.

[0080] This application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above task forwarding resource scheduling method are implemented.

[0081] The computer-readable storage medium may include: various media that can store program codes, such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs.

[0082] The term "comprising", "including" or any other variation thereof is intended to cover non-exclusive inclusion, such that a process, method, article or apparatus that comprises a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article or apparatus.

[0083] The above description is only a preferred embodiment of the present application and an explanation of the technical principles applied. Those skilled in the art should understand that the scope of the application involved in the present application is not limited to the technical solutions formed by the specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the foregoing application concept. For example, the technical solutions formed by the mutual replacement of the above features with the technical features (but not limited to) having similar functions applied in the present application.

Claims

1. A task forwarding resource scheduling method, characterized in that: include: Obtain forwarding task information and available resources of a forwarding device, wherein the forwarding task information includes forwarding tasks, a quantity to be forwarded, and available resources of a target terminal, wherein the available resources of the forwarding device include available computing resources of the forwarding device and available network resources of the forwarding device, and wherein the available resources of the target terminal include available computing resources of the target terminal and available network resources of the target terminal; Determine the occupied resources of each forwarding task, the occupied resources include encoding resources, decoding resources, first forwarding resources and second forwarding resources, the first forwarding resources are the computing resources required for each forwarding of the forwarding task, and the second forwarding resources are the network resources required for each forwarding of the forwarding task; Determine a first forwarding quantity based on the occupied resources and the available resources of the forwarding device, where the first forwarding quantity is the quantity of the forwarding task forwarded by the forwarding device; A transit strategy is determined based on the first forwarding quantity, the occupied resources and the available resources of the target terminal. The transit strategy includes a transit terminal, a second forwarding quantity and a forwarding path. The second forwarding quantity is the number of forwarding tasks forwarded by each of the transit terminals. The second forwarding quantity corresponding to each of the transit terminals is different. The forwarding path is the corresponding relationship between each of the transit terminals and each of the target terminals.

2. The method according to claim 1, characterized in that The determining the first forwarding quantity based on the occupied resources and the available resources of the forwarding device includes: Calculate the occupied computing resources and occupied network resources required for each forwarding task; Calculating the total computing resources required for the forwarding task; If the total computing resources are greater than the available computing resources of the forwarding device, obtaining the task level and the emergency level of each forwarding task; Determine a priority score for each of the forwarding tasks based on the task level and the urgency level; Sorting the forwarding tasks based on the priority scores to obtain a score sorting result; Dividing the forwarding tasks into a plurality of task combinations based on the score ranking results, the occupied computing resources, and the available computing resources of the forwarding device, wherein the forwarding tasks in each of the task combinations are tasks that are processed by the forwarding device at the same time; Calculating the total network resources required for the forwarding task in each of the task combinations; If the total network resources are greater than the available network resources of the forwarding device, the minimum forwarding quantity of each forwarding task is calculated based on a preset forwarding ratio; Calculate the minimum required network resources for each forwarding task based on the minimum forwarding quantity; A first forwarding quantity for each of the forwarding tasks is determined based on the minimum required network resources and the available network resources of the forwarding device.

3. The method according to claim 2, characterized in that The determining the first forwarding quantity of each forwarding task based on the minimum required network resources and the available network resources of the forwarding device includes: Calculate the first minimum required network resource sum of the forwarding tasks in each of the task combinations, where the first minimum required network resource sum is the sum of the minimum required network resources of all the forwarding tasks in each of the task combinations; If the first minimum required network resource sum is less than the available network resource of the forwarding device, calculating the network resource difference based on the available network resource of the forwarding device and the first minimum required network resource sum; Calculate the minimum computing resource corresponding to each of the forwarding tasks based on the encoding resource, the minimum forwarding quantity and the first forwarding resource; Calculate the minimum computing resources required for all the forwarding tasks in the task combination based on the minimum computing resources; Determining a computing resource difference based on the available computing resources of the forwarding device and the minimum computing resource; Based on the score sorting result, the computing resource difference and the network resource difference, the remaining computing resources and the remaining network resources are allocated to the forwarding tasks in the current task combination, and the first forwarding quantity of each forwarding task is determined based on the allocation situation and the minimum forwarding quantity.

4. The method according to claim 3, characterized in that If the first minimum required network resource is greater than the available network resource of the forwarding device, the method further includes: Select the forwarding tasks in the current task combination from the score sorting results in sequence until the second minimum required network resource sum of the selected first forwarding task meets a preset condition, wherein the preset condition includes that the second minimum required network resource sum is not greater than the available network resource of the forwarding device, and the second minimum required network resource sum plus the minimum required network resource of the next forwarding task in the score sorting results is greater than the available network resource of the forwarding device; The minimum forwarding quantity is determined as the first forwarding quantity of the first forwarding task.

5. The method according to claim 1, characterized in that The determining of the transfer strategy based on the first forwarding quantity, the occupied resources, and the available resources of the target terminal includes: Calculate the remaining forwarding quantity based on the first forwarding quantity and the to-be-forwarded quantity; Calculate a first quantity based on the decoding resources, the available computing resources of the target terminal, and the first forwarding resources; Calculate a second quantity based on the available network resources of the target terminal and the second forwarding resources; Determine a maximum forwarding quantity based on the first quantity and the second quantity; The target terminals are combined based on an exhaustive method to obtain a plurality of first candidate transfer combinations, wherein the number of the target terminals in the first candidate transfer combination is the first forwarding number; Calculating the sum of the maximum forwarding quantities of the target terminals in each of the first candidate transfer combinations; Determine the first candidate transfer combination whose maximum forwarding quantity sum is greater than the remaining forwarding quantity as the second candidate transfer combination; Determining a reliability level of each of the target terminals in the second candidate transfer combination; Determine a combination score for each of the second candidate transfer combinations based on the reliability level; A transfer strategy is determined based on the combined score and the reliability level.

6. The method according to claim 5, characterized in that The determining of the reliability level of each of the target terminals in the second candidate transfer combination includes: Obtaining the decoding quality, network transmission rate and packet loss rate of each of the target terminals; Determine a terminal level of each of the target terminals based on the decoding quality of the target terminal, the network transmission rate, and the packet loss rate; Obtaining a sum of distances between each of the target terminals and other target terminals in the second candidate transfer combination; Calculate the total transmission time based on the distance and the network transmission rate; The reliability level of each of the target terminals is determined based on the terminal level, the total transmission time, and the maximum forwarding quantity.

7. The method according to claim 5, characterized in that The determining of the transfer strategy based on the combined score and the reliability level includes: Determine the second candidate transfer combination with the highest combination score as the target transfer combination; Determining the target terminal in the target transfer combination as a transfer terminal; Calculate the difference between the maximum forwarding quantity and the remaining forwarding quantity to obtain the idle forwarding quantity; Sorting the transfer terminals from low to high according to the reliability levels to obtain a second sorting result; Obtaining a transfer quantity reduction benchmark for each of the reliability levels; According to the maximum forwarding quantity and the transfer quantity reduction benchmark, the forwarding quantity of each transfer terminal in the second sorting result is reduced in sequence until the sum of the reduced forwarding quantities is equal to the idle forwarding quantity; Calculate a second forwarding number of each of the transfer terminals based on the reduced forwarding number and the maximum forwarding number; Determining the target terminal that is not the transfer terminal as a terminal to be forwarded; Obtaining the transmission distance between each of the transfer terminals and each of the terminals to be forwarded; sorting the transfer terminals in ascending order according to network transmission rate to obtain a third sorting result; Determine a forwarding path between each of the transfer terminals and the terminal to be forwarded based on the third sorting result, the transmission distance, and the second forwarding quantity; The transfer strategy is determined based on the transfer terminal, the second forwarding quantity, and the forwarding path.

8. A task forwarding resource scheduling device, characterized in that: include: A task information acquisition module, used to acquire forwarding task information and available resources of a forwarding device, wherein the forwarding task information includes forwarding tasks, the number of forwardings to be forwarded, and available resources of a target terminal, wherein the available resources of the forwarding device include available computing resources of the forwarding device and available network resources of the forwarding device, and wherein the available resources of the target terminal include available computing resources of the target terminal and available network resources of the target terminal; An occupied resource determination module, used to determine the occupied resources of each forwarding task, the occupied resources including encoding resources, decoding resources, first forwarding resources and second forwarding resources, the first forwarding resources are the computing resources required for each forwarding of the forwarding task, and the second forwarding resources are the network resources required for each forwarding of the forwarding task; A forwarding quantity determination module, configured to determine a first forwarding quantity based on the occupied resources and the available resources of the forwarding device, wherein the first forwarding quantity is the quantity of the forwarding task forwarded by the forwarding device; A transit strategy determination module is used to determine a transit strategy based on the first forwarding quantity, the occupied resources and the available resources of the target terminal, wherein the transit strategy includes a transit terminal, a second forwarding quantity and a forwarding path, wherein the second forwarding quantity is the quantity of the forwarding tasks forwarded by each of the transit terminals, and the second forwarding quantity corresponding to each of the transit terminals is different, and the forwarding path is the corresponding relationship between each of the transit terminals and each of the target terminals.

9. An electronic device, characterized in that: comprising a processor coupled to a memory; The processor is configured to execute a computer program stored in the memory, so that the electronic device executes the method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The method comprises a computer program or an instruction, which, when executed on a computer, causes the computer to execute the method according to any one of claims 1 to 7.