Decoding resource allocation method, computer equipment and readable storage medium
By dynamically managing decoded resources, combining resource linked list to determine the target migration memory and perform resource migration, the problem of low resource utilization caused by traditional static resource allocation methods is solved, and more efficient and flexible resource allocation is achieved.
Patent Information
- Application Number
- CN202510169432.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2045-02-17
AI Technical Summary
In modern multimedia processing systems, especially in the fields of video decoding and streaming media services, traditional statically configured resource allocation methods lead to low resource utilization, which cannot effectively meet the needs of high-definition, 4K or even 8K resolution video content and multi-user concurrent access.
By obtaining the remaining decoding capabilities of the target decoding system and the decoding requirements resources of the code stream, combining the resource list, the target migration memory matching the decoding requirements is determined, and resource migration is carried out to dynamically manage the decoding resources to ensure that the code stream obtains matching decoding resources.
It effectively improves the flexibility of resource utilization and resource allocation, avoids resource waste caused by static resource allocation methods, and ensures that resources can be rationally utilized and redistributed even in the absence of resources.
Smart Images

Figure CN119645663A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of resource allocation, and in particular to a decoding resource allocation method, a computer device, and a readable storage medium. Background Art
[0002] In modern multimedia processing systems, especially in the field of video decoding and streaming services, resource management and allocation are the key to ensuring efficient and real-time processing. Faced with the popularity of high-definition, 4K and even 8K resolution video content and the growing demand for concurrent access by multiple users, the traditional statically configured resource allocation method has the problem of low resource utilization.
[0003] There is no effective solution to the problem of low resource utilization in the prior art. Summary of the invention
[0004] Based on this, it is necessary to provide a decoding resource allocation method, a computer device and a readable storage medium to address the above technical problems.
[0005] In a first aspect, the present application provides a decoding resource allocation method, the method comprising: Obtaining a first remaining decoding capability corresponding to a target decoding system and a decoding required resource amount corresponding to a target bitstream; In a case where the first remaining decoding capacity does not meet the required decoding resource amount, determining a target migration memory matching the required decoding resource amount from a resource linked list; Perform resource migration on the target migration memory to obtain a first target decoding memory; determining a second remaining decoding capability of a target decoding chip corresponding to the first target decoding memory; Based on the first target decoding memory and the second remaining decoding capacity, decoding resources matching the required decoding resource amount are allocated to the target code stream.
[0006] In one embodiment, the resource linked list includes an idle resource linked list and an occupied resource linked list; the method for determining the resource linked list includes: Get the total amount of available resources corresponding to each of the multiple free decoding memories; According to a first preset sorting method, based on the available resource amounts corresponding to the plurality of idle decoding memories, the plurality of idle decoding memories are sorted to obtain an idle resource linked list; Obtaining the occupied resource amounts corresponding to the plurality of occupied decoding memories; According to a second preset sorting method, based on the occupied resource amounts corresponding to the multiple occupied decoding memories, the multiple occupied decoding memories are sorted to obtain an occupied resource linked list.
[0007] In one of the embodiments, when the first remaining decoding capacity does not meet the required decoding resource amount, determining a target migration memory matching the required decoding resource amount from a resource linked list includes: Determine a first preset number of first candidate memories and a first occupied resource amount corresponding to each of the first candidate memories from the resource linked list; the total amount of available resources of the first candidate memories is greater than or equal to the required decoding resource amount; Determine a minimum occupied resource amount from first occupied resource amounts corresponding to a first preset number of the first candidate memories; The first candidate memory corresponding to the minimum occupied resource amount is used as the target migration memory.
[0008] In one embodiment, the resource linked list includes an idle resource linked list and an occupied resource linked list; and performing resource migration on the target migration memory to obtain the first target decoding memory includes: Determine, according to the occupied resource linked list, a second occupied resource amount corresponding to the target migration memory and a code stream to be migrated corresponding to the second occupied resource amount; According to a preset matching order, a target docking memory matching the target migration memory is determined from the idle resource linked list; the remaining available resource amount corresponding to the target docking memory is greater than or equal to the second occupied resource amount corresponding to the target migration memory; Migrating the code stream to be migrated to the target docking memory to obtain the target migration memory after resource migration; The target migration memory after the resource migration is used as the first target decoding memory.
[0009] In one embodiment, allocating decoding resources matching the required decoding resource amount to the target bitstream based on the first target decoding memory and the second remaining decoding capability includes: If the second remaining decoding capacity satisfies the required decoding resource amount, the target code stream is connected to the target decoding chip, and the first target decoding memory is allocated to the target code stream; based on the first target decoding memory and the second remaining decoding capacity, decoding resources matching the required decoding resource amount are allocated to the target code stream; If the second remaining decoding capacity does not meet the required decoding resource amount, frame dropping processing is performed on the target code stream.
[0010] In one embodiment, the resource linked list includes an idle resource linked list and an occupied resource linked list; the method further includes: In the case where the first remaining decoding capacity satisfies the required decoding resource amount, determining a second preset number of second candidate memories from the idle resource linked list; the total amount of available resources of the second candidate memories is greater than or equal to the required decoding resource amount; Determining a second target decoding memory according to a second preset number of the second candidate memories; determining a third remaining decoding capability of a target decoding chip corresponding to the second target decoding memory; Based on the second target decoding memory and the third remaining decoding capacity, decoding resources matching the required decoding resource amount are allocated to the target code stream.
[0011] In one embodiment, determining the second target decoding memory according to the second preset number of the second candidate memories includes: Determine a fourth remaining decoding capability of a candidate decoding chip corresponding to each of the second candidate memories; According to the fourth remaining decoding capacity of the candidate decoding chip corresponding to each of the second candidate memories, a target candidate memory that matches the required decoding resource amount is determined from the first preset number of second candidate memories; wherein the target candidate memory refers to the second candidate memory whose total amount of available resources among the first preset number of second candidate memories has the smallest difference with the required decoding resource amount and whose corresponding candidate decoding chip has the largest fourth remaining decoding capacity.
[0012] In a second aspect, the present application further provides a decoding resource allocation method device, the device comprising: An acquisition module, used to acquire a first remaining decoding capability corresponding to a target decoding system and a decoding required resource amount corresponding to a target bitstream; a migration memory determination module, configured to determine a target migration memory matching the required decoding resource amount from a resource chain table when the first remaining decoding capacity does not meet the required decoding resource amount; A migration module, used for performing resource migration on the target migration memory to obtain a first target decoding memory; A decoding capability determination module, configured to determine a second remaining decoding capability of a target decoding chip corresponding to the first target decoding memory; A resource allocation module is used to allocate decoding resources matching the required decoding resource amount to the target code stream based on the first target decoding memory and the second remaining decoding capacity.
[0013] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in any one of the embodiments of the first aspect are implemented.
[0014] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method described in any one of the embodiments of the first aspect are implemented.
[0015] In a fifth aspect, the present application further provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in any one of the embodiments of the first aspect.
[0016] The above-mentioned decoding resource allocation method, computer device and readable storage medium, by obtaining the first remaining decoding capacity of the target decoding system and the decoding requirement resource amount of the target code stream, when the first remaining decoding capacity does not meet the decoding requirement resource amount, combined with the resource linked list, can quickly determine the target migration memory that matches the decoding requirement, effectively reducing the resource search time and improving the resource allocation and management efficiency; further, by performing resource migration on the target migration memory, the first target decoding memory is obtained, and the dynamic management of decoding resources is realized, laying a foundation for improving the utilization rate of decoding resources; further, based on the first target decoding memory and the second remaining decoding capacity, decoding resources that match the decoding requirement resource amount are allocated to the target code stream, which can ensure that even when the resources of the target decoding system are insufficient, the reasonable utilization and reallocation of resources can be achieved by dynamically adjusting the resources, effectively avoiding the problem of low resource utilization caused by the static resource allocation method in the prior art, and effectively improving the resource utilization rate and the flexibility of resource allocation. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 A diagram of an application environment of a decoding resource allocation method in an embodiment; Figure 2 A schematic diagram of a flow chart of a decoding resource allocation method in an embodiment; Figure 3 is a schematic diagram of an idle resource linked list in one embodiment; Figure 4 A schematic diagram of an occupied resource linked list in one embodiment; Figure 5 A flowchart of the steps of a method for determining a target migration memory in one embodiment; Figure 6 A schematic diagram of a target migration memory and a target docking memory determination process in one embodiment; Figure 7 A schematic flow chart of the steps of a method for determining a first target decoding memory in one embodiment; Figure 8 A schematic diagram of a flow chart of a decoding resource allocation method in another embodiment; Fig. 9 is a schematic diagram of a target candidate memory determination process in one embodiment; Fig.10 It is a flowchart of a decoding resource allocation method in a specific embodiment; Fig.11 It is a structural block diagram of a decoding resource allocation device in one embodiment; Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0020] In current embedded video decoding devices, a multi-chip architecture is usually used to support concurrent decoding of multiple video streams. For example, a typical 4-chip embedded device is configured so that each chip supports 4-channel video stream decoding, and the entire device supports a total of 16 video stream decoding tasks through 16 hardware channel interfaces. This design strategy assigns the decoding of streams of channels 1 to 4 to chip 1, channels 5 to 8 to chip 2, and so on. Therefore, when only specific channels (such as channel 1 and channel 5) have video stream input, only the corresponding chips (such as chip 1 and chip 2) participate in the decoding work, while other chips are idle.
[0021] However, this fixed channel-chip binding method has obvious limitations: First, since the video decoding channel is fixed to a specific chip, when some channels perform video decoding, only the corresponding chip will bear all decoding tasks. Even if other chips are idle, they cannot share the decoding load, which leads to uneven utilization of decoding resources and failure to give full play to the decoding capabilities of all chips. Especially in the scenario where multi-channel video streams are decoded simultaneously, it is easy to cause some chips to be overloaded while other chips are idle. Second, the requirements for decoding memory for video streams of different resolutions vary significantly. For example, a 1080P video stream may occupy a large (such as 4K) decoding memory block. Once these memory blocks are occupied, they cannot be used for other decoding tasks with higher resolutions (such as 4K video streams). Since the decoding memory hardware of each chip is not interoperable, each chip can only manage its own pre-allocated decoding memory, which further limits the flexibility and sharing of memory resources; in this case, even if there is sufficient remaining decoding memory, it is difficult to use it effectively if it is distributed on different chips, resulting in resource waste. Based on this, an embodiment of the present application aims to provide a decoding resource allocation method to solve the problem of low resource utilization existing in the above-mentioned prior art.
[0022] The decoding resource allocation method provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Among them, the terminal 102 can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and Internet of Things devices. The Internet of Things devices can be smart TVs, smart car devices, projection devices, etc. The server 104 can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud computing services.
[0023] In an exemplary embodiment, Figure 2 As shown, Figure 2 1 is a flowchart of a decoding resource allocation method in an embodiment; this embodiment uses the method applied to a terminal as an example for explanation, and it is understandable that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps: Step S201, obtaining a first remaining decoding capability corresponding to a target decoding system and a decoding required resource amount corresponding to a target bitstream.
[0024] The target decoding system is not limited to including multiple decoding chips; each decoding chip includes at least one decoding memory. The first remaining decoding capacity corresponding to the target decoding system is jointly determined by the multiple decoding chips in the target decoding system; it can be understood that the first remaining decoding capacity refers to the sum of the unoccupied hardware decoding performance of all decoding chips in the target decoding system.
[0025] Among them, the target bitstream can be but is not limited to a video bitstream; for example, the target bitstream can be a video bitstream with a resolution of 1080P, a video bitstream with a resolution of 4K, etc.; the decoding required resource amount corresponding to the target bitstream refers to the total amount of decoding resources required when decoding the target bitstream.
[0026] Step S202: when the first remaining decoding capacity does not meet the required decoding resource amount, determine a target migration memory matching the required decoding resource amount from the resource linked list.
[0027] The resource list is a two-way linked list. Using a two-way linked list as the structural form of the resource list can quickly traverse and operate the previous and next nodes in the resource list to further improve the efficiency and flexibility of resource allocation. The resource list, i.e., a two-way linked list, includes multiple nodes. Each node represents a corresponding decoding memory. Each node contains not only a pointer to the next node, but also a pointer to the previous node, which is conducive to efficiently inserting, deleting or updating nodes when needed, while maintaining the integrity and order of the list.
[0028] It can be understood that based on the resource linked list, the resource status of each decoding memory can be fully understood, providing accurate data support for subsequent resource allocation.
[0029] The target migration memory refers to a decoding memory in which the total amount of available resources in the resource chain is greater than or equal to the amount of decoding required resources corresponding to the target code stream and occupies the smallest amount of resources.
[0030] Exemplarily, it is determined whether the first remaining decoding capacity can meet the required decoding resource amount. If the first remaining decoding capacity does not meet the required decoding resource amount, a decoding memory whose total available resources are greater than or equal to the required decoding resource amount corresponding to the target code stream and occupies the smallest amount of resources is determined from the resource chain table to obtain the target migration memory. If the first remaining decoding capacity meets the required decoding resource amount, a decoding chip that can meet the required decoding resource amount is selected to allocate decoding resources matching the required decoding resource amount to the target code stream.
[0031] Step S203: Perform resource migration on the target migration memory to obtain a first target decoding memory.
[0032] Among them, resource migration refers to migrating the bitstream corresponding to the amount of resources occupied by the target migration memory to a decoding memory that meets the preset conditions except for the target migration in the resource chain list. Among them, the preset conditions need to be set according to the actual resource migration needs and are not specifically limited here. It should be noted that the preset conditions need to ensure that the resource migration is completed while minimizing the overall resource changes of the target decoding system to ensure the stability of the target decoding system.
[0033] Step S204: determining a second remaining decoding capability of a target decoding chip corresponding to the first target decoding memory.
[0034] The target decoding chip refers to the decoding chip in the target decoding system corresponding to the first target decoding memory. The second remaining decoding capacity refers to the hardware decoding performance of the target decoding chip that is not occupied.
[0035] Step S205: Allocate decoding resources that match the required decoding resources to the target bitstream based on the first target decoding memory and the second remaining decoding capability.
[0036] Exemplarily, if the second remaining decoding capacity corresponding to the target decoding chip can meet the decoding requirement resource amount corresponding to the target code stream, the target code stream is connected to the target decoding chip, and the first target decoding memory is allocated to the target code stream, and based on the first target decoding memory and the second remaining decoding capacity, decoding resources matching the decoding requirement resource amount are allocated to the target code stream; if the second remaining decoding capacity corresponding to the target decoding chip cannot meet the decoding requirement resource amount corresponding to the target code stream, frame drop processing is performed on the target code stream.
[0037] It should be noted that, in order to ensure the feasibility and reliability of the decoding resource allocation method, an analysis can be performed based on the decoding resource allocation method of this embodiment to evaluate whether the target code stream can be connected to the target decoding system; if the target code stream can be connected to the target decoding system, the decoding resource allocation method of this embodiment can be directly executed; if the target code stream cannot be connected to the target decoding system, the decoding resource allocation method of this embodiment is not executed, and the running target decoding system will not be affected at this time, so the stability and reliability of the target decoding system can be ensured.
[0038] In this embodiment, by obtaining the first remaining decoding capacity of the target decoding system and the decoding requirement resource amount of the target code stream, when the first remaining decoding capacity does not meet the decoding requirement resource amount, combined with the resource linked list, the target migration memory that matches the decoding requirement can be quickly determined, which effectively reduces the resource search time and improves the resource allocation and management efficiency; further, by performing resource migration on the target migration memory, the first target decoding memory is obtained, and the dynamic management of the decoding resources is realized, which lays a foundation for improving the utilization rate of the decoding resources; further, based on the first target decoding memory and the second remaining decoding capacity, decoding resources that match the decoding requirement resource amount are allocated to the target code stream, which can ensure that even when the resources of the target decoding system are insufficient, the reasonable utilization and reallocation of resources can be achieved by dynamically adjusting the resources, which effectively avoids the problem of low resource utilization caused by the static resource allocation method in the prior art, and effectively improves the resource utilization rate and the flexibility of resource allocation.
[0039] In one embodiment, the resource linked list includes an idle resource linked list and an occupied resource linked list; the method for determining the resource linked list includes the following steps: Step 1: Obtain the total amount of available resources corresponding to each of the plurality of idle decoding memories.
[0040] The idle decoding memory refers to a decoding memory with idle available resources.
[0041] Step 2: sorting the plurality of idle decoding memories according to a first preset sorting method based on the available resource amounts corresponding to the plurality of idle decoding memories to obtain an idle resource linked list.
[0042] Among them, the first preset sorting method can be to sort multiple idle decoding memories in order from large to small according to the total amount of available resources corresponding to each of the multiple idle decoding memories; it should be noted that if there are decoding memories with the same total amount of available resources, it is necessary to arrange them according to the decoding chip numbers corresponding to each of the idle decoding memories on the basis of sorting them in order from large to small according to the total amount of available resources corresponding to each of the multiple idle decoding memories.
[0043] Among them, the idle resource linked list is a bidirectional linked list, which is used to manage the idle decoding memory.
[0044] In an exemplary embodiment, the target decoding system includes multiple decoding chips and a main chip system; the decoding chip includes at least one decoding memory; when the target decoding system is started, each decoding chip reports the total amount of available resources of its corresponding decoding memory, the number of decoding memories, hardware decoding performance and other information to the main chip system. Among them, the hardware decoding performance may include but is not limited to the maximum decoding capacity and the remaining decoding capacity; among them, the maximum decoding capacity refers to the maximum hardware decoding performance that the decoding chip can support; for example, the decoding chip supports the simultaneous decoding of 7 channels of 1080P30 frame video streams. The remaining decoding capacity refers to the hardware decoding performance that is not occupied by the decoding chip.
[0045] Further, based on the main chip system, multiple decoding memories are sorted in descending order according to the total amount of available resources corresponding to each of the multiple decoding memories; if there are decoding memories with the same total amount of available resources, then on the basis of sorting in descending order according to the total amount of available resources corresponding to each of the multiple decoding memories, they are arranged according to the decoding chip numbers corresponding to each of the idle decoding memories to form an idle resource linked list. For example, see Figure 3 , Figure 3 A schematic diagram of a free resource list is given.
[0046] Step 3, obtaining the occupied resource amounts corresponding to the multiple occupied decoding memories.
[0047] The occupied decoding memory refers to the decoding memory occupied by all or part of the available resources. The occupied resource amount refers to the amount of available resources that have been allocated in the occupied decoding memory.
[0048] Step 4: sort the idle decoding memories according to the second preset sorting method based on the occupied resource amounts corresponding to the idle decoding memories to obtain an occupied resource linked list.
[0049] The occupied resource linked list is a bidirectional linked list used to manage the occupied decoding memory. It is understandable that the occupied resource linked list is empty when the target decoding system is just started.
[0050] Among them, the second preset sorting method can be to sort the multiple occupied decoding memories in the order of the remaining available resources corresponding to each of the multiple occupied decoding memories from large to small, or to sort the multiple occupied decoding memories in the order of the occupied resources corresponding to each of the multiple occupied decoding memories from small to large. It should be noted that if there are decoding memories with the same total amount of available resources, it is necessary to sort the multiple occupied decoding memories in the order of the remaining available resources corresponding to each of the multiple occupied decoding memories from large to small, or, on the basis of sorting the multiple occupied decoding memories in the order of the occupied resources corresponding to each of the multiple occupied decoding memories from small to large, and then arrange them according to the decoding chip numbers corresponding to each of the occupied decoding memories.
[0051] In an exemplary embodiment, based on the target decoding system, multiple occupied decoding memories are sorted in descending order according to the amount of remaining available resources corresponding to each of the multiple occupied decoding memories; if there are decoding memories with the same total amount of available resources, it is necessary to sort the multiple occupied decoding memories in descending order according to the amount of remaining available resources corresponding to each of the multiple occupied decoding memories, and then arrange them according to the decoding chip numbers corresponding to each of the occupied decoding memories. For example, see Figure 4 , Figure 4 A schematic diagram of a resource occupation list is given.
[0052] In this embodiment, by constructing an idle resource linked list and an occupied resource linked list, the flexibility and convenience of resource management can be effectively improved, laying a foundation for a subsequent decoding resource allocation method.
[0053] In one embodiment, Figure 5 As shown, Figure 5 The flowchart of the target migration memory determination method steps in one embodiment is as follows; when the first remaining decoding capacity does not meet the required decoding resource amount, determining the target migration memory matching the required decoding resource amount from the resource linked list includes the following steps: Step S501: Determine a first preset number of first candidate memories and a first occupied resource amount corresponding to each first candidate memory from a resource linked list.
[0054] The total amount of available resources of the first candidate memory is greater than or equal to the amount of resources required for decoding.
[0055] The first preset number needs to be determined based on the number of decoding memories whose total available resources actually existing in the resource linked list are greater than or equal to the required decoding resources, and is not specifically limited here.
[0056] Step S502: determining a minimum occupied resource amount from first occupied resource amounts corresponding to a first preset number of first candidate memories.
[0057] Step S503: taking the first candidate memory corresponding to the minimum occupied resource amount as the target migration memory.
[0058] For example, Figure 6The occupied resource linked list shown is used as an example for explanation, assuming that the target bitstream is a 4K30 frame video bitstream; from the occupied resource linked list, it can be determined that there are 3 first candidate memories whose total available resources are equal to the decoding required resource amount, namely the decoding memory of the 4K bitstream corresponding to decoding chip 1, the decoding memory of the 4K bitstream corresponding to decoding chip 2, and the decoding memory of the 4K bitstream corresponding to decoding chip 3; further, based on the 3 first candidate memories, from the occupied resource linked list, the first occupied resource amount corresponding to each first candidate memory can be determined; and further, based on the first occupied resource amount corresponding to each first candidate memory, it can be determined that the first candidate memory corresponding to the minimum occupied resource amount is the decoding memory of the 4K bitstream corresponding to decoding chip 1; the decoding memory of the 4K bitstream corresponding to decoding chip 1 is used as the target migration memory.
[0059] In this embodiment, based on the resource chain table, a first preset number of first candidate memories whose total available resources are greater than or equal to the required decoding resources can be quickly matched, as well as the first occupied resource amount corresponding to each first candidate memory. Furthermore, based on the first occupied resource amount corresponding to the first preset number of first candidate memories, the corresponding target migration memory can be accurately determined, laying a foundation for realizing dynamic adjustment of decoding resources.
[0060] In one embodiment, Figure 7 As shown, Figure 7 The flowchart of the method steps for determining the first target decoding memory in one embodiment is as follows; performing resource migration on the target migration memory to obtain the first target decoding memory includes the following steps: Step S701: Determine, according to the occupied resource linked list, a second occupied resource amount corresponding to the target migration memory and a code stream to be migrated corresponding to the second occupied resource amount.
[0061] The code stream to be migrated refers to the code stream corresponding to the second occupied resource amount in the target migration memory. It can be understood that the code stream to be migrated can be a video code stream; for example, see Figure 6 , when the target migration memory is the decoding memory of the 4K code stream corresponding to the decoding chip 1, the code stream to be migrated is the 1080P video code stream.
[0062] Step S702: Determine a target docking memory that matches the target migration memory from the idle resource linked list according to a preset matching order.
[0063] Among them, the remaining available resources corresponding to the target docking memory are greater than or equal to the second occupied resources corresponding to the target migration memory. It can be understood that based on the resource linked list, the total available resources and occupied resources corresponding to the target docking memory can be determined; and then based on the total available resources and occupied resources corresponding to the target docking memory, the remaining available resources corresponding to the target docking memory can be calculated.
[0064] The preset matching order needs to be set according to the idle resource list, and is not specifically limited here; for example, the preset matching order may be matching in the order from the end to the head of the idle resource list.
[0065] Step S703, migrate the code stream to be migrated to the target docking memory to obtain the target migration memory after resource migration.
[0066] Step S704: Use the target migration memory after resource migration as the first target decoding memory.
[0067] For example, Figure 6 Take the idle resource linked list in as an example to illustrate that, when the target bitstream is a 4K30 frame video bitstream and the target migration memory is the decoding memory of the 4K bitstream corresponding to decoding chip 1, according to the second occupied resource amount corresponding to the target migration memory, in the order from the end to the head of the idle resource linked list, the target docking memory corresponding to the second occupied resource amount is determined from the idle resource linked list, and it can be concluded that the target docking memory is the decoding memory of the 1080P bitstream corresponding to decoding chip 2 in the idle resource linked list. Further, the bitstream to be migrated corresponding to the second occupied resource amount can be migrated to the target docking memory to obtain the target migration memory after resource migration, and the target migration memory after resource migration is used as the first target decoding memory.
[0068] It should be noted that after the migration of the target migration memory resources is completed, the resource chain list needs to be updated to ensure the real-time and accuracy of the resource chain list.
[0069] In this embodiment, based on the idle resource list and the preset matching order, the target docking memory corresponding to the target migration memory can be accurately determined, and then based on the target docking memory, dynamic resource adjustment can be achieved, laying a foundation for improving the utilization of decoding resources.
[0070] In one embodiment, based on the first target decoding memory and the second remaining decoding capacity, allocating decoding resources matching the required decoding resources to the target bitstream includes the following steps: Step 1: determine whether the second remaining decoding capacity can meet the required decoding resources.
[0071] Step 2: If the second remaining decoding capacity meets the required decoding resources, the target code stream is connected to the target decoding chip, and the first target decoding memory is allocated to the target code stream; based on the first target decoding memory and the second remaining decoding capacity, decoding resources matching the required decoding resources are allocated to the target code stream.
[0072] Step 3: If the second remaining decoding capacity does not meet the required decoding resource amount, frame dropping processing is performed on the target code stream.
[0073] Among them, frame loss processing refers to performing frame reduction processing on the target code stream to reduce the frame rate required for the target code stream; it can be understood that when the second remaining decoding capacity does not meet the required decoding resources, performing frame loss processing on the target code stream can effectively reduce the required decoding resources corresponding to the target code stream.
[0074] Exemplarily, after determining the first target decoding memory, determine the second remaining decoding capacity of the target decoding chip corresponding to the first target decoding memory; further, determine whether the second remaining decoding capacity of the target decoding chip can meet the decoding requirement resource amount corresponding to the target code stream; if the second remaining decoding capacity meets the decoding requirement resource amount, connect the target code stream to the target decoding chip, allocate the first target decoding memory to the target code stream, and allocate decoding resources that match the decoding requirement resource amount to the target code stream based on the first target decoding memory and the second remaining decoding capacity.
[0075] It should be noted that because embedded devices generally run in a relatively stable personal environment, the hardware decoding performance of the decoding chip is usually greater than the decoding capacity required when all pre-allocated decoding memory of the decoding chip is fully loaded, so the probability of insufficient hardware decoding performance is very small. The main reason for the insufficient hardware decoding performance of the decoding chip is that some video streams with unusual frame rates (for example, the conventional ones are 25 frames and 30 frames, and the unconventional ones are 125 frames) are connected, resulting in the inability to connect new video streams later when the pre-allocated decoding memory is idle.
[0076] In order not to affect the video code stream being decoded, when the hardware decoding capability corresponding to the decoding chip is insufficient, that is, when the second remaining decoding capability does not meet the required decoding resources, the target code stream is subjected to video frame loss processing to reduce the frame rate required by the target code stream until the required decoding resources corresponding to the target code stream after the frame loss are less than the second remaining decoding capability, the target code stream after the frame loss is connected to the target decoding chip, and the first target decoding memory is allocated to the target code stream after the frame loss, and the corresponding decoding resources are allocated to the target code stream after the frame loss based on the first target decoding memory and the second remaining decoding capability. If the second remaining decoding capability still cannot meet the required decoding resources corresponding to the target code stream after the frame loss after the target code stream is subjected to frame loss processing, the target code stream is discarded.
[0077] In this embodiment, by judging whether the second remaining decoding capacity corresponding to the target decoding chip meets the required decoding resource amount, it can be determined whether the target decoding chip has sufficient remaining decoding capacity to access the target code stream, which effectively improves the utilization rate of decoding resources and ensures the reasonable allocation and use of resources; at the same time, when the second remaining decoding capacity does not meet the required decoding resource amount, the target code stream is subjected to frame loss processing, which can effectively reduce the frame rate required by the target code stream, so that the target code stream after the frame loss can be connected to the target decoding chip, further improving the utilization rate of decoding resources.
[0078] In one embodiment, Figure 8 As shown, Figure 8 The figure is a flow chart of a decoding resource allocation method in another embodiment; the decoding resource allocation method further includes the following steps: Step S801, when the first remaining decoding capacity satisfies the required decoding resources, a second preset number of second candidate memories are determined from the idle resource linked list.
[0079] The total amount of available resources of the second candidate memory is greater than or equal to the amount of resources required for decoding.
[0080] The second preset number needs to be determined based on the number of decoding memories whose total available resources actually existing in the free resource list are greater than or equal to the required decoding resources, and is not specifically limited here.
[0081] The second candidate memory refers to a decoding memory in which the total amount of available resources in the idle resource list is greater than or equal to the amount of decoding required resources corresponding to the target code stream.
[0082] Step S802: determining a second target decoding memory according to a second preset number of second candidate memories.
[0083] Step S803: determine a third remaining decoding capability of the target decoding chip corresponding to the second target decoding memory.
[0084] Step S804: Allocate decoding resources that match the required decoding resources to the target bitstream based on the second target decoding memory and the third remaining decoding capability.
[0085] Exemplarily, when the first remaining decoding capacity meets the required decoding resource amount, a second preset number of second candidate memories is determined from the free resource list; further, based on the second preset number of second candidate memories, a second target decoding memory and a third remaining decoding capacity of a target decoding chip corresponding to the second target decoding memory are determined, the target code stream is connected to the target decoding chip, and the second target decoding memory is allocated to the target code stream, and based on the second target decoding memory and the third remaining decoding capacity, decoding resources matching the required decoding resource amount are allocated to the target code stream.
[0086] In an exemplary embodiment, step S802, determining a second target decoding memory according to a second preset number of second candidate memories, includes the following steps: Step 1: determine the fourth remaining decoding capability of the candidate decoding chip corresponding to each second candidate memory.
[0087] The candidate decoding chip refers to the decoding chip corresponding to the second candidate memory. The fourth remaining decoding capacity refers to the hardware decoding performance that is not occupied by the candidate decoding chip.
[0088] Step 2: Determine a target candidate memory that matches the required decoding resource amount from a first preset number of second candidate memories according to the fourth remaining decoding capability of the candidate decoding chip corresponding to each second candidate memory.
[0089] The target candidate memory refers to the second candidate memory whose total available resources have the smallest difference with the decoding required resources among the first preset number of second candidate memories and whose corresponding candidate decoding chip has the largest fourth remaining decoding capacity.
[0090] It can be understood that the target candidate memory refers to the decoding memory that can support access to the target code stream. For example, for a 1080P target code stream, the target candidate memory can at least support a 1080P video code stream; for a 2K target code stream, the target candidate memory can at least support a 2K video code stream.
[0091] It should be noted that when there is a second candidate memory with the same total amount of available resources and the fourth remaining decoding capacity of the corresponding candidate decoding chip, the target candidate memory can be determined according to the number of the candidate decoding chip; for example, when there are multiple second candidate memories with the same total amount of available resources and the fourth remaining decoding capacity of the corresponding candidate decoding chips, the second candidate memory corresponding to the smallest decoding chip number is selected as the target candidate memory.
[0092] For example, based on Fig. 9 The idle resource linked list shown is explained by taking the target bitstream as a 4K30-frame video bitstream as an example. According to the target bitstream, i.e., the 4K30-frame video bitstream, two second candidate memories can be determined from the idle resource linked list, namely, the decoding memory of the 4K bitstream corresponding to decoding chip 1 and the decoding memory of the 4K bitstream corresponding to decoding chip 2; further, it can be determined that the remaining decoding capability of decoding chip 1 can support decoding of a 1080P30-frame×4 video bitstream, and it can be determined that the remaining decoding capability of decoding chip 2 can support decoding of a 1080P30-frame×3 video bitstream, and the remaining decoding capability of decoding chip 1 is greater than the remaining decoding capability of decoding chip 2; based on this, it can be determined that the target candidate memory is the decoding memory of the 4K bitstream corresponding to decoding chip 1.
[0093] In this embodiment, based on the free resource list, the second preset number of second candidate memories can be quickly matched and determined; further, according to the fourth remaining decoding capacity of the candidate decoding chip corresponding to each second candidate memory, the target candidate memory that matches the required decoding resource amount can be accurately determined from the first preset number of second candidate memories, laying a foundation for improving the accuracy and reliability of resource allocation, and laying a foundation for improving resource utilization.
[0094] In a specific embodiment, when there is a target code stream, an analysis is first performed based on the decoding resource allocation method to determine whether the target code stream can be connected to the target decoding system; when the target code stream can be connected to the target decoding system, the decoding resource allocation method is formally executed. Fig.10 , the decoding resource allocation method comprises the following steps: Step S1001, obtaining a first remaining decoding capability corresponding to a target decoding system and a decoding resource requirement corresponding to a target bitstream.
[0095] Step S1002: determine whether the first remaining decoding capacity can meet the required decoding resources.
[0096] If so, execute step S1007; if not, execute step S1003.
[0097] Step S1003: when the first remaining decoding capacity does not meet the required decoding resource amount, a target migration memory matching the required decoding resource amount is determined from the resource linked list.
[0098] Step S1004: perform resource migration on the target migration memory to obtain a first target decoding memory.
[0099] Step S1005 , determining a second remaining decoding capability of a target decoding chip corresponding to the first target decoding memory.
[0100] Step S1006: Allocate decoding resources that match the required decoding resources to the target bitstream based on the first target decoding memory and the second remaining decoding capability.
[0101] Step S1007, when the first remaining decoding capacity satisfies the required decoding resources, a second preset number of second candidate memories are determined from the idle resource linked list.
[0102] The total amount of available resources of the second candidate memory is greater than or equal to the amount of resources required for decoding.
[0103] Step S1008: determining a second target decoding memory according to a second preset number of second candidate memories.
[0104] Step S1009: determining a third remaining decoding capability of the target decoding chip corresponding to the second target decoding memory.
[0105] Step S1010: Allocate decoding resources that match the required decoding resources to the target bitstream based on the second target decoding memory and the third remaining decoding capability.
[0106] The above-mentioned decoding resource allocation method, by obtaining the first remaining decoding capacity of the target decoding system and the decoding demand resource amount of the target code stream, can quickly determine the target migration memory that matches the decoding demand in combination with the resource linked list when the first remaining decoding capacity does not meet the decoding demand resource amount, effectively reducing the resource search time and improving the resource allocation and management efficiency; further, by performing resource migration on the target migration memory, the first target decoding memory is obtained, and the dynamic management of decoding resources is realized, laying a foundation for improving the utilization rate of decoding resources; further, based on the first target decoding memory and the second remaining decoding capacity, decoding resources that match the decoding demand resource amount are allocated to the target code stream, which can ensure that even when the resources of the target decoding system are insufficient, the reasonable utilization and reallocation of resources can be achieved by dynamically adjusting the resources, effectively avoiding the problem of low resource utilization caused by the static resource allocation method in the prior art, and effectively improving the resource utilization rate and the flexibility of resource allocation.
[0107] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0108] Based on the same inventive concept, the embodiment of the present application also provides a decoding resource allocation device for implementing the above-mentioned decoding resource allocation method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the one or more decoding resource allocation device embodiments provided below can refer to the above-mentioned limitations on the decoding resource allocation method, which will not be repeated here.
[0109] In an exemplary embodiment, Fig.11As shown, a decoding resource allocation device is provided, comprising: an acquisition module 1101, a migration memory determination module 1102, a migration module 1103, a decoding capability determination module 1104 and a resource allocation module 1105; The acquisition module 1101 is used to acquire a first remaining decoding capability corresponding to a target decoding system and a decoding required resource amount corresponding to a target bitstream; A migration memory determination module 1102 is used to determine a target migration memory matching the required decoding resource amount from a resource linked list when the first remaining decoding capacity does not meet the required decoding resource amount; A migration module 1103 is used to perform resource migration on a target migration memory to obtain a first target decoding memory; A decoding capability determination module 1104, configured to determine a second remaining decoding capability of a target decoding chip corresponding to the first target decoding memory; The resource allocation module 1105 is configured to allocate decoding resources matching the required decoding resources to the target bitstream based on the first target decoding memory and the second remaining decoding capability.
[0110] The above-mentioned decoding resource allocation device, by obtaining the first remaining decoding capacity of the target decoding system and the decoding demand resource amount of the target code stream, can quickly determine the target migration memory that matches the decoding demand in combination with the resource linked list when the first remaining decoding capacity does not meet the decoding demand resource amount, effectively reducing the resource search time and improving the resource allocation and management efficiency; further, by performing resource migration on the target migration memory, the first target decoding memory is obtained, and the dynamic management of decoding resources is realized, laying a foundation for improving the utilization rate of decoding resources; further, based on the first target decoding memory and the second remaining decoding capacity, decoding resources that match the decoding demand resource amount are allocated to the target code stream, which can ensure that even when the resources of the target decoding system are insufficient, the reasonable utilization and reallocation of resources can be achieved by dynamically adjusting the resources, effectively avoiding the problem of low resource utilization caused by the static resource allocation method in the prior art, and effectively improving the resource utilization rate and the flexibility of resource allocation.
[0111] In one embodiment, the resource list includes an idle resource list and an occupied resource list; the decoding resource allocation device also includes a resource list determination module; the resource list determination module is used to Get the total amount of available resources corresponding to each of the multiple free decoding memories; According to a first preset sorting method, based on the available resource amounts corresponding to the plurality of idle decoding memories, the plurality of idle decoding memories are sorted to obtain an idle resource linked list; Get the occupied resource amount corresponding to each of the multiple occupied decoding memories; According to the second preset sorting method, based on the occupied resource amounts corresponding to the multiple occupied decoding memories, the multiple occupied decoding memories are sorted to obtain an occupied resource linked list.
[0112] In one embodiment, the migration memory determination module 1102 is also used to Determine a first preset number of first candidate memories and a first occupied resource amount corresponding to each first candidate memory from the resource linked list; the total amount of available resources of the first candidate memories is greater than or equal to the amount of resources required for decoding; Determine a minimum occupied resource amount from first occupied resource amounts corresponding to a first preset number of first candidate memories; The first candidate memory corresponding to the minimum occupied resource amount is used as the target migration memory.
[0113] In one embodiment, the resource list includes an idle resource list and an occupied resource list; the migration module 1103 is also used to Determine, according to the occupied resource linked list, a second occupied resource amount corresponding to the target migration memory and a code stream to be migrated corresponding to the second occupied resource amount; According to a preset matching order, a target docking memory matching the target migration memory is determined from the idle resource linked list; the remaining available resource amount corresponding to the target docking memory is greater than or equal to the second occupied resource amount corresponding to the target migration memory; Migrate the code stream to be migrated to the target docking memory to obtain the target migration memory after resource migration; The target migration memory after resource migration is used as the first target decoding memory.
[0114] In one embodiment, the resource allocation module 1105 is also used to If the second remaining decoding capacity satisfies the required decoding resources, the target code stream is connected to the target decoding chip, and the first target decoding memory is allocated to the target code stream; based on the first target decoding memory and the second remaining decoding capacity, decoding resources matching the required decoding resources are allocated to the target code stream; If the second remaining decoding capacity does not meet the required decoding resource amount, frame drop processing is performed on the target code stream.
[0115] In one embodiment, the resource list includes an idle resource list and an occupied resource list; the resource allocation module 1105 is used to In the case where the first remaining decoding capacity satisfies the required decoding resources, determining a second preset number of second candidate memories from the idle resource linked list; the total amount of available resources of the second candidate memories is greater than or equal to the required decoding resources; Determining a second target decoding memory according to a second preset number of second candidate memories; determining a third remaining decoding capability of a target decoding chip corresponding to the second target decoding memory; Based on the second target decoding memory and the third remaining decoding capacity, decoding resources matching the required decoding resources are allocated to the target code stream.
[0116] In one embodiment, the resource allocation module 1105 is used to Determine a fourth remaining decoding capability of a candidate decoding chip corresponding to each second candidate memory; According to the fourth remaining decoding capacity of the candidate decoding chip corresponding to each second candidate memory, a target candidate memory that matches the required decoding resource amount is determined from the first preset number of second candidate memories; wherein the target candidate memory refers to the second candidate memory whose total amount of available resources among the first preset number of second candidate memories has the smallest difference between the required decoding resource amount and the total amount of available resources, and whose corresponding candidate decoding chip has the largest fourth remaining decoding capacity.
[0117] Each module in the above decoding resource allocation device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0118] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Fig.12 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store decoding resource allocation related data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a decoding resource allocation method is implemented.
[0119] Those skilled in the art will understand that Fig.12The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0120] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.
[0121] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0122] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.
[0123] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0124] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0125] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A decoding resource allocation method, characterized in that: The method comprises: Obtaining a first remaining decoding capability corresponding to a target decoding system and a decoding required resource amount corresponding to a target bitstream; In a case where the first remaining decoding capacity does not meet the required decoding resource amount, determining a target migration memory matching the required decoding resource amount from a resource linked list; Perform resource migration on the target migration memory to obtain a first target decoding memory; determining a second remaining decoding capability of a target decoding chip corresponding to the first target decoding memory; Based on the first target decoding memory and the second remaining decoding capacity, decoding resources matching the required decoding resource amount are allocated to the target code stream.
2. The method according to claim 1, characterized in that The resource linked list includes an idle resource linked list and an occupied resource linked list; the method for determining the resource linked list includes: Get the total amount of available resources corresponding to each of the multiple free decoding memories; According to a first preset sorting method, based on the available resource amounts corresponding to the plurality of idle decoding memories, the plurality of idle decoding memories are sorted to obtain an idle resource linked list; Obtaining the occupied resource amounts corresponding to the plurality of occupied decoding memories; According to a second preset sorting method, based on the occupied resource amounts corresponding to the multiple occupied decoding memories, the multiple occupied decoding memories are sorted to obtain an occupied resource linked list.
3. The method according to claim 1, characterized in that The step of determining, in a case where the first remaining decoding capacity does not meet the required decoding resource amount, a target migration memory matching the required decoding resource amount from a resource linked list comprises: Determine a first preset number of first candidate memories and a first occupied resource amount corresponding to each of the first candidate memories from the resource linked list; the total amount of available resources of the first candidate memories is greater than or equal to the required decoding resource amount; Determine a minimum occupied resource amount from first occupied resource amounts corresponding to a first preset number of the first candidate memories; The first candidate memory corresponding to the minimum occupied resource amount is used as the target migration memory.
4. The method according to claim 1, characterized in that: The resource linked list includes an idle resource linked list and an occupied resource linked list; the step of performing resource migration on the target migration memory to obtain a first target decoding memory includes: Determine, according to the occupied resource linked list, a second occupied resource amount corresponding to the target migration memory and a code stream to be migrated corresponding to the second occupied resource amount; According to a preset matching order, a target docking memory matching the target migration memory is determined from the idle resource linked list; the remaining available resource amount corresponding to the target docking memory is greater than or equal to the second occupied resource amount corresponding to the target migration memory; Migrating the code stream to be migrated to the target docking memory to obtain the target migration memory after resource migration; The target migration memory after the resource migration is used as the first target decoding memory.
5. The method according to claim 1, characterized in that The allocating, for the target code stream, decoding resources matching the required decoding resource amount based on the first target decoding memory and the second remaining decoding capability, comprises: If the second remaining decoding capacity satisfies the required decoding resource amount, the target code stream is connected to the target decoding chip, and the first target decoding memory is allocated to the target code stream; based on the first target decoding memory and the second remaining decoding capacity, decoding resources matching the required decoding resource amount are allocated to the target code stream; If the second remaining decoding capacity does not meet the required decoding resource amount, frame dropping processing is performed on the target code stream.
6. The method according to claim 1, characterized in that The resource linked list includes an idle resource linked list and an occupied resource linked list; the method further includes: In the case where the first remaining decoding capacity satisfies the required decoding resource amount, determining a second preset number of second candidate memories from the idle resource linked list; the total amount of available resources of the second candidate memories is greater than or equal to the required decoding resource amount; Determining a second target decoding memory according to a second preset number of the second candidate memories; determining a third remaining decoding capability of a target decoding chip corresponding to the second target decoding memory; Based on the second target decoding memory and the third remaining decoding capacity, decoding resources matching the required decoding resource amount are allocated to the target code stream.
7. The method according to claim 6, characterized in that The determining a second target decoding memory according to a second preset number of the second candidate memories comprises: Determine a fourth remaining decoding capability of a candidate decoding chip corresponding to each of the second candidate memories; According to the fourth remaining decoding capacity of the candidate decoding chip corresponding to each of the second candidate memories, a target candidate memory that matches the required decoding resource amount is determined from the first preset number of second candidate memories; wherein the target candidate memory refers to the second candidate memory whose total amount of available resources among the first preset number of second candidate memories has the smallest difference with the required decoding resource amount and whose corresponding candidate decoding chip has the largest fourth remaining decoding capacity.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Virtual machine newly-built method, device and equipment
CN109739614A
Virtual machine creation method, system and device and medium
CN111722908A
Virtual machine migration processing and strategy generation method and device, equipment and storage medium
CN112286622A
Resources allocation method and device, readable medium and electronic equipment
CN114020470A
Resource allocation method, system and device, equipment and storage medium
CN115202887A