Decoding Resource Allocation Method, Computer Device, and Readable Storage Medium
By dynamically managing decoded resources, combining the resource linked list to determine the target migration memory and perform resource migration, the problem of low resource utilization under the traditional static resource allocation method is solved, and more efficient and flexible resource allocation is achieved.
Patent Information
- Application Number
- CN202510169432.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-17
- Publication Date
- 2025-06-13
- 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 and cannot effectively respond to 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 link list, the target migration memory matching the decoding requirements is determined, and resource migration is carried out to dynamically manage the decoding resources to achieve reasonable allocation and utilization of 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 CN119645663B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical field of resource allocation, and particularly 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 fields of video decoding and streaming media services, resource management and allocation are crucial for ensuring efficient and real-time processing. Facing the popularization of high-definition, 4K, and even 8K resolution video content, as well as the increasing demand for multi-user concurrent access, the traditional statically configured resource allocation method has the problem of low resource utilization.
[0003] Regarding the problem of low resource utilization in the prior art, no effective solution has been proposed yet. Summary of the Invention
[0004] Based on this, in view of the above technical problems, it is necessary to provide a decoding resource allocation method, a computer device, and a readable storage medium.
[0005] In a first aspect, this application provides a decoding resource allocation method, and the method includes:
[0006] Obtain the first remaining decoding capacity corresponding to the target decoding system and the amount of decoding required resources corresponding to the target bitstream;
[0007] In the case where the first remaining decoding capacity does not meet the amount of decoding required resources, determine a target migration memory that matches the amount of decoding required resources from the resource linked list;
[0008] Perform resource migration on the target migration memory to obtain a first target decoding memory;
[0009] Determine the second remaining decoding capacity of the target decoding chip corresponding to the first target decoding memory;
[0010] Based on the first target decoding memory and the second remaining decoding capacity, allocate decoding resources that match the amount of decoding required resources for the target bitstream.
[0011] In one embodiment, the resource linked list includes a free resource linked list and an occupied resource linked list; the method for determining the resource linked list includes:
[0012] Obtain the total available resources corresponding to each of multiple free decoding memories;
[0013] Sort the multiple free decoding memories according to a first preset sorting method based on the available resources corresponding to each of the multiple free decoding memories to obtain a free resource linked list;
[0014] Obtain the occupied resource amounts corresponding to each of the multiple occupied decoding memories;
[0015] Sort the multiple occupied decoding memories based on the occupied resource amounts corresponding to each of the multiple occupied decoding memories according to a second preset sorting method to obtain an occupied resource linked list.
[0016] In one embodiment, when the first remaining decoding capability does not meet the decoding required resource amount, determining a target migration memory that matches the decoding required resource amount from the resource linked list includes:
[0017] Determine a first preset number of first candidate memories from the resource linked list, and the first occupied resource amount corresponding to each of the first candidate memories; the total available resource amount of the first candidate memory is greater than or equal to the decoding required resource amount;
[0018] Determine the minimum occupied resource amount from the first occupied resource amounts corresponding to the first preset number of the first candidate memories;
[0019] Use the first candidate memory corresponding to the minimum occupied resource amount as the target migration memory.
[0020] In one embodiment, the resource linked list includes an idle resource linked list and an occupied resource linked list; performing resource migration on the target migration memory to obtain a first target decoding memory includes:
[0021] According to the occupied resource linked list, determine the second occupied resource amount corresponding to the target migration memory and the code stream to be migrated corresponding to the second occupied resource amount;
[0022] Determine a target docking memory that matches the target migration memory from the idle resource linked list according to a preset matching order; 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;
[0023] Migrate the code stream to be migrated to the target docking memory to obtain the target migration memory after resource migration;
[0024] Use the target migration memory after resource migration as the first target decoding memory.
[0025] In one embodiment, allocating decoding resources that match the decoding required resource amount for the target code stream based on the first target decoding memory and the second remaining decoding capability includes:
[0026] If the second remaining decoding capability meets the decoding demand resource amount, connect the target bitstream to the target decoding chip, and allocate the first target decoding memory to the target bitstream; based on the first target decoding memory and the second remaining decoding capability, allocate decoding resources matching the decoding demand resource amount for the target bitstream;
[0027] If the second remaining decoding capability does not meet the decoding demand resource amount, perform frame dropping processing on the target bitstream.
[0028] In one embodiment, the resource linked list includes an idle resource linked list and an occupied resource linked list; the method further includes:
[0029] When the first remaining decoding capability meets the decoding demand resource amount, determine a second preset number of second candidate memories from the idle resource linked list; the total available resources of the second candidate memories are greater than or equal to the decoding demand resource amount;
[0030] Determine a second target decoding memory according to the second candidate memories of the second preset number;
[0031] Determine the third remaining decoding capability of the target decoding chip corresponding to the second target decoding memory;
[0032] Based on the second target decoding memory and the third remaining decoding capability, allocate decoding resources matching the decoding demand resource amount for the target bitstream.
[0033] In one embodiment, the determining a second target decoding memory according to the second candidate memories of the second preset number includes:
[0034] Determine the fourth remaining decoding capability of the candidate decoding chip corresponding to each second candidate memory;
[0035] According to the fourth remaining decoding capability of the candidate decoding chip corresponding to each second candidate memory, determine a target candidate memory matching the decoding demand resource amount from the second candidate memories of the first preset number; wherein, the target candidate memory refers to the second candidate memory with the smallest difference between the total available resources and the decoding demand resource amount among the second candidate memories of the first preset number, and the largest fourth remaining decoding capability of the corresponding candidate decoding chip.
[0036] In a second aspect, the present application further provides a decoding resource allocation method device, and the device includes:
[0037] An acquisition module, configured to acquire the first remaining decoding capability corresponding to a target decoding system and the decoding demand resource amount corresponding to a target bitstream;
[0038] A migration memory determination module, configured to determine a target migration memory matching the decoding required resource amount from a resource linked list when the first remaining decoding capability does not meet the decoding required resource amount;
[0039] A migration module, configured to perform resource migration on the target migration memory to obtain a first target decoding memory;
[0040] 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;
[0041] A resource allocation module, configured to allocate decoding resources matching the decoding required resource amount for the target bitstream based on the first target decoding memory and the second remaining decoding capability.
[0042] In a third aspect, the present application further provides a computer device, including a memory and a processor. 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.
[0043] In a fourth aspect, the present application further 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 method described in any one of the embodiments of the first aspect are implemented.
[0044] In a fifth aspect, the present application further provides a computer program product, including a computer program. 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.
[0045] For the above decoding resource allocation method, computer device, and readable storage medium, by obtaining the first remaining decoding capability of the target decoding system and the decoding required resource amount of the target bitstream, when the first remaining decoding capability does not meet the decoding required resource amount, combined with the resource linked list, the target migration memory matching the decoding requirement can be quickly determined, effectively reducing the resource search time and improving the resource allocation and management efficiency; further, by performing resource migration on the target migration memory to obtain the first target decoding memory, 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 capability, decoding resources matching the decoding required resource amount are allocated for the target bitstream, which can ensure that even when the resources of the target decoding system are insufficient, the reasonable utilization and reallocation of resources are achieved through dynamic adjustment of resources, effectively avoiding the problem of low resource utilization rate caused by the static resource allocation method in the prior art, and effectively improving the resource utilization rate and the flexibility of resource allocation. Description of the Drawings
[0046] To more clearly illustrate the technical solutions in the embodiments of the present application or the related art, the following will briefly introduce the accompanying drawings required for the description of the embodiments of the present application or the related art. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other related accompanying drawings can be obtained based on these drawings.
[0047] Figure 1 It is an application environment diagram of the decoding resource allocation method in an embodiment;
[0048] Figure 2 It is a schematic flowchart of the decoding resource allocation method in an embodiment;
[0049] Figure 3 It is a schematic diagram of the free resource linked list in an embodiment;
[0050] Figure 4 It is a schematic diagram of the occupied resource linked list in an embodiment;
[0051] Figure 5 It is a schematic flowchart of the steps of the target migration memory determination method in an embodiment;
[0052] Figure 6 It is a schematic diagram of the process of determining the target migration memory and the target docking memory in an embodiment;
[0053] Figure 7 It is a schematic flowchart of the steps of the first target decoding memory determination method in an embodiment;
[0054] Figure 8 It is a schematic flowchart of the decoding resource allocation method in another embodiment;
[0055] Figure 9 It is a schematic diagram of the process of determining the target candidate memory in an embodiment;
[0056] Figure 10 It is a schematic flowchart of the decoding resource allocation method in a specific embodiment;
[0057] Figure 11 It is a structural block diagram of the decoding resource allocation device in an embodiment;
[0058] Figure 12 It is an internal structure diagram of a computer device in an embodiment. Detailed implementation manners
[0059] In order to make the objectives, technical solutions and advantages of the present application more clear and understandable, the present application will be further described in detail below with reference to 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.
[0060] In current embedded video decoding devices, a multi-chip architecture is usually adopted to support the concurrent decoding of multiple video streams. For example, a typical 4-chip embedded device is configured such that each chip supports the decoding of 4 video streams, and the entire device supports the decoding tasks of a total of 16 video streams through 16 hardware channel interfaces. This design strategy fixedly assigns the decoding of the video streams of channels 1 to 4 to chip 1, channels 5 to 8 to chip 2, and so on. Therefore, in the case where there are video stream inputs only in specific channels (such as channels 1 and 5), only the corresponding chips (such as chip 1 and chip 2) participate in the decoding work, while other chips are in an idle state.
[0061] However, this fixed channel-chip binding method has obvious limitations: On the one hand, since the video decoding channels are fixedly connected to specific chips, when some channels perform video decoding, only the corresponding chips will undertake all the decoding tasks. Even if other chips are in an idle state, they cannot share the decoding load, which results in uneven utilization of decoding resources and fails to fully utilize the decoding capabilities of all chips. Especially in the demand scenario of concurrent decoding of multiple-channel video streams, it is easy to cause the problem that some chips are overloaded while other chips are idle. On the other hand, the decoding memory requirements of video streams with different resolutions vary significantly. For example, a 1080P video stream may occupy a relatively large (such as 4K-sized) decoding memory block. Once these memory blocks are occupied, they cannot be used for the decoding tasks of other higher-resolution (such as 4K video streams). Since the decoding memories of each chip are not interoperable in hardware, 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, if it is distributed on different chips, it is difficult to effectively utilize it, resulting in resource waste. Based on this, the embodiments of the present application aim to provide a decoding resource allocation method to solve the problem of low resource utilization rate existing in the above-mentioned prior art.
[0062] The decoding resource allocation method provided by the embodiments of the present application can be applied to, for example Figure 1In 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 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, laptop computers, smart phones, tablet computers, Internet of Things devices, and the Internet of Things devices can be smart TVs, smart in-vehicle 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 providing cloud computing services.
[0063] In an exemplary embodiment, as Figure 2 shown, Figure 2 is a schematic flowchart of a decoding resource allocation method in an embodiment; this embodiment takes the application of this method to a terminal as an example for illustration. It can be understood that this 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:
[0064] Step S201, obtain the first remaining decoding ability corresponding to the target decoding system, and the amount of decoding required resources corresponding to the target bitstream.
[0065] Among them, 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 ability corresponding to the target decoding system is jointly determined by multiple decoding chips in the target decoding system; it can be understood that the first remaining decoding ability refers to the total sum of the unoccupied hardware decoding performance of all decoding chips in the target decoding system.
[0066] 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 amount of decoding required resources corresponding to the target bitstream refers to the total amount of decoding resources required for decoding the target bitstream.
[0067] Step S202, in the case where the first remaining decoding ability does not meet the amount of decoding required resources, determine the target migration memory that matches the amount of decoding required resources from the resource linked list.
[0068] Among them, the resource linked list is a doubly linked list. Using a doubly linked list as the structural form of the resource linked list can quickly traverse and operate on the front and rear nodes in the resource linked list, so as to further improve the efficiency and flexibility of resource allocation. Among them, the resource linked list, that is, the doubly linked list, includes multiple nodes; each node represents a corresponding decoded memory; each node not only contains a pointer to the next node, but also includes a pointer to the previous node, which is conducive to efficiently inserting, deleting, or updating nodes when needed, while maintaining the integrity and orderliness of the linked list.
[0069] It can be understood that based on the resource linked list, the resource status of each decoded memory can be comprehensively understood, providing accurate data support for subsequent resource allocation.
[0070] Among them, the target migration memory refers to the decoded memory in the resource linked list where the total available resources are greater than or equal to the decoded required resources corresponding to the target bitstream and the occupied resources are the smallest.
[0071] Exemplarily, it is judged whether the first remaining decoding ability can meet the decoded required resources. If the first remaining decoding ability does not meet the decoded required resources, then the decoded memory in the resource linked list where the total available resources are greater than or equal to the decoded required resources corresponding to the target bitstream and the occupied resources are the smallest is determined to obtain the target migration memory. If the first remaining decoding ability meets the decoded required resources, then a decoding chip that can meet the decoded required resources is selected, and decoding resources matching the decoded required resources are allocated to the target bitstream.
[0072] Step S203: Perform resource migration on the target migration memory to obtain the first target decoded memory.
[0073] Among them, resource migration refers to migrating the bitstream corresponding to the occupied resources of the target migration memory to the decoded memory that meets the preset conditions in the resource linked list except the target migration memory. Among them, the preset conditions need to be set according to the actual resource migration requirements and are not specifically limited here. It should be noted that the preset conditions need to ensure that the resource migration is completed under the condition of minimizing the overall resource change of the target decoding system to ensure the stability of the target decoding system.
[0074] Step S204: Determine the second remaining decoding ability of the target decoding chip corresponding to the first target decoded memory.
[0075] Among them, the target decoding chip refers to the decoding chip in the target decoding system corresponding to the first target decoded memory. The second remaining decoding ability refers to the unoccupied hardware decoding performance of the target decoding chip.
[0076] Step S205: Based on the first target decoded memory and the second remaining decoding ability, allocate decoding resources matching the decoded required resources to the target bitstream.
[0077] 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.
[0078] 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.
[0079] 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.
[0080] 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:
[0081] Step 1: Obtain the total amount of available resources corresponding to each of the plurality of idle decoding memories.
[0082] The idle decoding memory refers to a decoding memory with idle available resources.
[0083] Step 2: Sort the multiple idle decoding memories based on the available resource amounts corresponding to each of them in accordance with the first preset sorting method to obtain an idle resource linked list.
[0084] Among them, the first preset sorting method may be to sort the multiple idle decoding memories in descending order of the total available resource amounts corresponding to each of them. It should be noted that if there are decoding memories with the same total available resource amount, they need to be arranged in accordance with the decoding chip numbers corresponding to the idle decoding memories on the basis of sorting in descending order of the total available resource amounts corresponding to the multiple idle decoding memories.
[0085] Among them, the idle resource linked list is a doubly linked list used to manage the idle decoding memories.
[0086] In an exemplary embodiment, the target decoding system includes multiple decoding chips and a main chip system; each decoding chip includes at least one decoding memory; when the target decoding system is started, each decoding chip reports information such as the total available resource amount, the number of decoding memories, and the hardware decoding performance of the decoding memories corresponding to it to the main chip system. Among them, the hardware decoding performance may include, but is not limited to, the maximum decoding ability and the remaining decoding ability; the maximum decoding ability refers to the maximum hardware decoding performance that the decoding chip can support; for example, the decoding chip can support a maximum of simultaneously decoding 7 1080P30-frame video bitstreams. The remaining decoding ability refers to the unoccupied hardware decoding performance of the decoding chip.
[0087] Further, based on the main chip system, sort the multiple decoding memories in descending order of the total available resource amounts corresponding to each of them; if there are decoding memories with the same total available resource amount, then on the basis of sorting in descending order of the total available resource amounts corresponding to the multiple decoding memories, arrange them in accordance with the decoding chip numbers corresponding to the idle decoding memories to form an idle resource linked list. Exemplarily, see Figure 3 , Figure 3 which gives a schematic diagram of an idle resource linked list.
[0088] Step 3: Obtain the occupied resource amounts corresponding to the multiple occupied decoding memories.
[0089] Among them, the occupied decoding memory refers to a decoding memory in which all or part of the available resource amount is occupied. The occupied resource amount refers to the available resource amount that has been allocated in the occupied decoding memory.
[0090] Step 4: Sort the idle decoding memories based on the occupied resource amounts corresponding to each of them in accordance with the second preset sorting method to obtain an occupied resource linked list.
[0091] Among them, the occupied resource linked list is a doubly linked list used to manage the occupied decoding memory. It can be understood that the occupied resource linked list is empty when the target decoding system is just started.
[0092] Among them, the second preset sorting method can be to sort multiple occupied decoding memories in descending order according to the remaining available resources corresponding to each of the multiple occupied decoding memories, or to sort multiple occupied decoding memories in ascending order according to the occupied resources corresponding to each of the multiple occupied decoding memories. It should be noted that if there are decoding memories with the same total available resources, it is necessary to sort them in descending order according to the remaining available resources corresponding to each of the multiple occupied decoding memories, or on the basis of sorting in ascending order according to the occupied 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.
[0093] In an exemplary embodiment, based on the target decoding system, multiple occupied decoding memories are sorted in descending order according to the remaining available resources corresponding to each of the multiple occupied decoding memories; if there are decoding memories with the same total available resources, it is necessary to sort them in descending order according to the 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. Exemplarily, see Figure 4 , Figure 4 A schematic diagram of an occupied resource linked list is given.
[0094] In this embodiment, by constructing the free resource linked list and the occupied resource linked list, the flexibility and convenience of resource management can be effectively improved, laying a foundation for the subsequent decoding resource allocation method.
[0095] In one embodiment, as Figure 5 shown, Figure 5 is a schematic flowchart of the steps of the target migration memory determination method in an embodiment; in the case where the first remaining decoding ability does not meet the decoding required resource amount, determining the target migration memory that matches the decoding required resource amount from the resource linked list includes the following steps:
[0096] Step S501, determine a first preset number of first candidate memories from the resource linked list, and the first occupied resource amount corresponding to each first candidate memory.
[0097] Among them, the total available resources of the first candidate memory are greater than or equal to the decoding required resource amount.
[0098] Among them, the first preset number needs to be determined according to the number of decoding memories in the resource linked list whose total available resources are greater than or equal to the decoding required resource amount, and no specific limitation is made here.
[0099] Step S502: Determine the minimum occupied resource amount from the first occupied resource amounts corresponding to the first candidate memories of the first preset quantity.
[0100] Step S503: Use the first candidate memory corresponding to the minimum occupied resource amount as the target migration memory.
[0101] Exemplarily, taking Figure 6 the occupied resource linked list shown as an example for illustration, assume the target bitstream is a 4K 30-frame video bitstream; from the occupied resource linked list, it can be determined that there are 3 first candidate memories with the total available resources equal to the decoded required resource amount, namely the decoding memory for the 4K bitstream corresponding to decoding chip 1, the decoding memory for the 4K bitstream corresponding to decoding chip 2, and the decoding memory for the 4K bitstream corresponding to decoding chip 3; further, according to 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; furthermore, according to 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 for the 4K bitstream corresponding to decoding chip 1; use the decoding memory for the 4K bitstream corresponding to decoding chip 1 as the target migration memory.
[0102] In this embodiment, based on the resource linked list, the first candidate memories of the first preset quantity with the total available resources greater than or equal to the decoded required resource amount, and the first occupied resource amount corresponding to each first candidate memory can be quickly matched. Furthermore, based on the first occupied resource amounts corresponding to the first candidate memories of the first preset quantity, the corresponding target migration memory can be accurately determined, laying a foundation for realizing the dynamic adjustment of decoding resources.
[0103] In one embodiment, as Figure 7 shown, Figure 7 is a schematic flowchart of the steps of the first target decoding memory determination method in one embodiment; perform resource migration on the target migration memory to obtain the first target decoding memory, including the following steps:
[0104] Step S701: According to the occupied resource linked list, determine the second occupied resource amount corresponding to the target migration memory and the bitstream to be migrated corresponding to the second occupied resource amount.
[0105] Among them, the bitstream to be migrated refers to the bitstream corresponding to the second occupied resource amount in the target migration memory. It can be understood that the bitstream to be migrated can be a video bitstream; exemplarily, referring to Figure 6 , when the target migration memory is the decoding memory for the 4K bitstream corresponding to decoding chip 1, the bitstream to be migrated is a 1080P video bitstream.
[0106] Step S702: Determine the target docking memory that matches the target migration memory from the free resource linked list according to the preset matching order.
[0107] Among them, 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. It can be understood that based on the resource linked list, the total available resources and the occupied resource amount corresponding to the target docking memory can be determined; furthermore, based on the total available resources and the occupied resource amount corresponding to the target docking memory, the remaining available resource amount corresponding to the target docking memory can be calculated.
[0108] Among them, the preset matching order needs to be set according to the free resource linked list, and no specific limitation is made here; for example, the preset matching order can be to match in the order from the end to the head of the free resource linked list.
[0109] Step S703: Migrate the code stream to be migrated to the target docking memory to obtain the target migration memory after resource migration.
[0110] Step S704: Use the target migration memory after resource migration as the first target decoding memory.
[0111] Exemplarily, taking Figure 6 the free resource linked list in as an example, when the target code stream is a 4K 30-frame video code stream and the target migration memory is the decoding memory of the 4K code stream 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 free resource linked list, determine the target docking memory corresponding to the second occupied resource amount from the free resource linked list, and it can be obtained that the target docking memory is the decoding memory of the 1080P code stream corresponding to decoding chip 2 in the free resource linked list. Further, the code stream 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 use the target migration memory after resource migration as the first target decoding memory.
[0112] It should be noted that after the resource migration of the target migration memory is completed, the resource linked list needs to be updated to ensure the real-time and accuracy of the resource linked list.
[0113] In this embodiment, based on the free resource linked 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 realized, laying a foundation for improving the utilization rate of decoding resources.
[0114] In one embodiment, based on the first target decoding memory and the second remaining decoding ability, allocating decoding resources that match the decoding requirement resource amount for the target code stream includes the following steps:
[0115] Step 1, determine whether the second remaining decoding capability can meet the decoding demand resource amount.
[0116] Step 2, if the second remaining decoding capability meets the decoding demand resource amount, then connect the target bitstream to the target decoding chip, and allocate the first target decoding memory to the target bitstream; based on the first target decoding memory and the second remaining decoding capability, allocate decoding resources matching the decoding demand resource amount for the target bitstream.
[0117] Step 3, if the second remaining decoding capability does not meet the decoding demand resource amount, then perform frame dropping processing on the target bitstream.
[0118] Among them, frame dropping processing refers to performing frame reduction processing on the target bitstream to reduce the frame rate required by the target bitstream; it can be understood that when the second remaining decoding capability does not meet the decoding demand resource amount, performing frame dropping processing on the target bitstream can effectively reduce the decoding demand resource amount corresponding to the target bitstream.
[0119] Exemplarily, after determining the first target decoding memory, determine the second remaining decoding capability of the target decoding chip corresponding to the first target decoding memory; further, determine whether the second remaining decoding capability of the target decoding chip can meet the decoding demand resource amount corresponding to the target bitstream; if the second remaining decoding capability meets the decoding demand resource amount, then connect the target bitstream to the target decoding chip, and allocate the first target decoding memory to the target bitstream, and based on the first target decoding memory and the second remaining decoding capability, allocate decoding resources matching the decoding demand resource amount for the target bitstream.
[0120] It should be noted that since embedded devices generally operate in a relatively stable personal environment, that is, the hardware decoding performance of the decoding chip is usually greater than the decoding capability required when all the pre-allocated decoding memories of the decoding chip are fully loaded, 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 bitstreams with uncommon frame rates are connected (for example, the conventional ones are 25 frames and 30 frames, and the unconventional ones are 125 frames), resulting in the inability to connect new video bitstreams even when the pre-allocated decoding memory is idle.
[0121] In order not to affect the video bitstream being decoded, when the hardware decoding capability of the decoding chip is insufficient, that is, when the second remaining decoding capability does not meet the decoding demand resource amount, video frame dropping processing is performed on the target bitstream to reduce the frame rate required by the target bitstream until the decoding demand resource amount corresponding to the target bitstream after frame dropping is less than the second remaining decoding capability. Then, the target bitstream after frame dropping is connected to the target decoding chip, and the first target decoding memory is allocated to the target bitstream after frame dropping. Based on the first target decoding memory and the second remaining decoding capability, corresponding decoding resources are allocated to the target bitstream after frame dropping. If after the frame dropping processing of the target bitstream, the second remaining decoding capability still cannot meet the decoding demand resource amount corresponding to the target bitstream after frame dropping, then the target bitstream is discarded.
[0122] In this embodiment, by determining whether the second remaining decoding capability corresponding to the target decoding chip meets the decoding demand resource amount, it can be determined whether the target decoding chip has sufficient remaining decoding capability to connect the target bitstream, effectively improving the utilization rate of decoding resources and ensuring the reasonable allocation and use of resources. At the same time, when the second remaining decoding capability does not meet the decoding demand resource amount, frame dropping processing is performed on the target bitstream, which can effectively reduce the frame rate required by the target bitstream so that the target bitstream after frame dropping can be connected to the target decoding chip, further improving the utilization rate of decoding resources.
[0123] In one embodiment, as Figure 8 shown, Figure 8 is a schematic flowchart of a decoding resource allocation method in another embodiment; the decoding resource allocation method further includes the following steps:
[0124] Step S801, when the first remaining decoding capability meets the decoding demand resource amount, determine a second preset number of second candidate memories from the free resource linked list.
[0125] Among them, the total available resources of the second candidate memory are greater than or equal to the decoding demand resource amount.
[0126] Among them, the second preset number needs to be determined according to the number of decoding memories in the free resource linked list whose total available resources are greater than or equal to the decoding demand resource amount, and no specific limitation is made here.
[0127] Among them, the second candidate memory refers to a decoding memory in the free resource linked list whose total available resources are greater than or equal to the decoding demand resource amount corresponding to the target bitstream.
[0128] Step S802, determine the second target decoding memory according to the second preset number of second candidate memories.
[0129] Step S803, determine the third remaining decoding capability of the target decoding chip corresponding to the second target decoding memory.
[0130] Step S804: Based on the second target decoding memory and the third remaining decoding capability, allocate decoding resources that match the amount of decoding demand resources for the target bitstream.
[0131] Exemplarily, when the first remaining decoding capability meets the amount of decoding demand resources, determine a second preset number of second candidate memories from the free resource linked list; further, based on the second preset number of second candidate memories, determine the second target decoding memory and the third remaining decoding capability of the target decoding chip corresponding to the second target decoding memory, connect the target bitstream to the target decoding chip, allocate the second target decoding memory to the target bitstream, and based on the second target decoding memory and the third remaining decoding capability, allocate decoding resources that match the amount of decoding demand resources for the target bitstream.
[0132] In an exemplary embodiment, step S802: Determine the second target decoding memory according to the second preset number of second candidate memories, including the following steps:
[0133] Step 1: Determine the fourth remaining decoding capability of the candidate decoding chip corresponding to each second candidate memory.
[0134] Among them, the candidate decoding chip refers to the decoding chip corresponding to the second candidate memory. The fourth remaining decoding capability refers to the unoccupied hardware decoding performance of the candidate decoding chip.
[0135] Step 2: According to the fourth remaining decoding capability of the candidate decoding chip corresponding to each second candidate memory, determine the target candidate memory that matches the amount of decoding demand resources from the first preset number of second candidate memories.
[0136] Among them, the target candidate memory refers to the second candidate memory with the smallest difference between the total available resources and the amount of decoding demand resources and the largest fourth remaining decoding capability of the corresponding candidate decoding chip among the first preset number of second candidate memories.
[0137] It can be understood that the target candidate memory refers to the decoding memory that can support connecting the target bitstream. For example, for a 1080P target bitstream, the target candidate memory can at least support a 1080P video bitstream; for a 2K target bitstream, the target candidate memory can at least support a 2K video bitstream.
[0138] It should be noted that when there are second candidate memories with the same total available resources and the same fourth remaining decoding capability of the corresponding candidate decoding chips, the target candidate memory can be determined according to the number of the candidate decoding chips; for example, when there are multiple second candidate memories with the same total available resources and the same fourth remaining decoding capability of the corresponding candidate decoding chips, select the second candidate memory corresponding to the smallest decoding chip number as the target candidate memory.
[0139] Exemplarily, based on Figure 9 the shown free resource linked list, taking the target bitstream as a 4K30-frame video bitstream as an example for illustration. According to the target bitstream, i.e., the 4K30-frame video bitstream, from the free resource linked list, 2 second candidate memories can be determined, which are the decoding memories for the 4K bitstream corresponding to decoding chip 1 and the decoding memories for the 4K bitstream corresponding to decoding chip 2 respectively; further, it can be determined that the remaining decoding capacity of decoding chip 1 can support decoding a 1080P30-frame × 4 video bitstream, and it can be determined that the remaining decoding capacity of decoding chip 2 can support decoding a 1080P30-frame × 3 video bitstream. The remaining decoding capacity of decoding chip 1 is greater than that of decoding chip 2; based on this, the target candidate memory can be determined as the decoding memory for the 4K bitstream corresponding to decoding chip 1.
[0140] In this embodiment, based on the free resource linked list, the second preset number of second candidate memories can be quickly matched and determined; furthermore, according to the fourth remaining decoding capacity of each candidate decoding chip corresponding to each second candidate memory, the target candidate memory that matches the decoding demand 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.
[0141] In a specific embodiment, in the presence of a target bitstream, first perform calculus analysis based on the decoding resource allocation method to determine whether the target bitstream can be accessed to the target decoding system; in the case that the target bitstream can be accessed to the target decoding system, then formally execute the decoding resource allocation method. Refer to Figure 10 and the decoding resource allocation method includes the following steps:
[0142] Step S1001, obtain the first remaining decoding capacity corresponding to the target decoding system and the decoding demand resource amount corresponding to the target bitstream.
[0143] Step S1002, determine whether the first remaining decoding capacity can meet the decoding demand resource amount.
[0144] If it is satisfied, execute step S1007; if not, execute step S1003.
[0145] Step S1003, in the case that the first remaining decoding capacity does not meet the decoding demand resource amount, determine the target migration memory that matches the decoding demand resource amount from the resource linked list.
[0146] Step S1004, perform resource migration on the target migration memory to obtain the first target decoding memory.
[0147] Step S1005, determine the second remaining decoding capacity of the target decoding chip corresponding to the first target decoding memory.
[0148] Step S1006, based on the first target decoding memory and the second remaining decoding capacity, allocate decoding resources that match the decoding requirement resource amount for the target bitstream.
[0149] Step S1007, when the first remaining decoding capacity meets the decoding requirement resource amount, determine a second preset number of second candidate memories from the free resource linked list.
[0150] Among them, the total available resources of the second candidate memory are greater than or equal to the decoding requirement resource amount.
[0151] Step S1008, determine the second target decoding memory according to the second preset number of second candidate memories.
[0152] Step S1009, determine the third remaining decoding capacity of the target decoding chip corresponding to the second target decoding memory.
[0153] Step S1010, based on the second target decoding memory and the third remaining decoding capacity, allocate decoding resources that match the decoding requirement resource amount for the target bitstream.
[0154] The above decoding resource allocation method, by obtaining the first remaining decoding capacity of the target decoding system and the decoding requirement resource amount of the target bitstream, 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 to obtain the first target decoding memory, 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, allocate decoding resources that match the decoding requirement resource amount for the target bitstream, 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 through dynamic adjustment of resources, effectively avoiding the problem of low resource utilization rate caused by the static resource allocation method in the prior art, and effectively improving the resource utilization rate and the flexibility of resource allocation.
[0155] It should be understood that although the steps in the flowcharts involved in the above-described embodiments are sequentially shown according to the indications of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear description in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-described embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily executed at the same moment, but can be executed at different moments. The execution order of these steps or stages is not necessarily sequential, but can be executed alternately or in turn with at least a part of other steps or steps or stages in other steps.
[0156] Based on the same inventive concept, an embodiment of the present application also provides a decoding resource allocation device for implementing the above-mentioned decoding resource allocation method. The solution provided by this device to solve the problem is similar to the solution described in the above method. Therefore, the specific limitations in one or more embodiments of the decoding resource allocation device provided below can refer to the limitations on the decoding resource allocation method in the above text, and will not be repeated here.
[0157] In an exemplary embodiment, as Figure 11 shown, a decoding resource allocation device is provided, including: an acquisition module 1101, a migration memory determination module 1102, a migration module 1103, a decoding ability determination module 1104, and a resource allocation module 1105;
[0158] The acquisition module 1101 is configured to acquire the first remaining decoding ability corresponding to the target decoding system and the decoding required resource amount corresponding to the target code stream;
[0159] The migration memory determination module 1102 is configured to determine a target migration memory matching the decoding required resource amount from the resource linked list when the first remaining decoding ability does not meet the decoding required resource amount;
[0160] The migration module 1103 is configured to perform resource migration on the target migration memory to obtain a first target decoding memory;
[0161] The decoding ability determination module 1104 is configured to determine the second remaining decoding ability of the target decoding chip corresponding to the first target decoding memory;
[0162] The resource allocation module 1105 is configured to allocate decoding resources matching the decoding required resource amount to the target code stream based on the first target decoding memory and the second remaining decoding ability.
[0163] The above decoding resource allocation device, by obtaining the first remaining decoding capacity of the target decoding system and the decoding required resource amount of the target bitstream, can quickly determine the target migration memory that matches the decoding requirements in combination with the resource linked list when the first remaining decoding capacity does not meet the decoding required 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 to obtain the first target decoding memory, 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 matching the decoding required resource amount are allocated to the target bitstream, which can ensure that even when the resources of the target decoding system are insufficient, the reasonable utilization and reallocation of resources are achieved through dynamic adjustment of resources, effectively avoiding the problem of low resource utilization rate caused by the static resource allocation method in the prior art, and effectively improving the resource utilization rate and the flexibility of resource allocation.
[0164] In one embodiment, the resource linked list includes a free resource linked list and an occupied resource linked list; the decoding resource allocation device further includes a resource linked list determination module; the resource linked list determination module is used for
[0165] Obtain the total available resources corresponding to each of multiple free decoding memories;
[0166] Sort the multiple free decoding memories based on the available resource amounts corresponding to each of the multiple free decoding memories according to the first preset sorting method to obtain a free resource linked list;
[0167] Obtain the occupied resource amounts corresponding to each of multiple occupied decoding memories;
[0168] Sort the multiple occupied decoding memories based on the occupied resource amounts corresponding to each of the multiple occupied decoding memories according to the second preset sorting method to obtain an occupied resource linked list.
[0169] In one embodiment, the migration memory determination module 1102 is further used for
[0170] Determine a first preset number of first candidate memories from the resource linked list, and the first occupied resource amount corresponding to each first candidate memory; the total available resources of the first candidate memory are greater than or equal to the decoding required resource amount;
[0171] Determine the minimum occupied resource amount from the first occupied resource amounts corresponding to the first preset number of first candidate memories;
[0172] Use the first candidate memory corresponding to the minimum occupied resource amount as the target migration memory.
[0173] In one embodiment, the resource linked list includes an idle resource linked list and an occupied resource linked list; the migration module 1103 is further configured to
[0174] Determine a second occupied resource amount corresponding to the target migration memory according to the occupied resource linked list, and a bitstream to be migrated corresponding to the second occupied resource amount;
[0175] Determine a target docking memory matching the target migration memory from the idle resource linked list according to a preset matching order; 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;
[0176] Migrate the bitstream to be migrated to the target docking memory to obtain the target migration memory after resource migration;
[0177] Use the target migration memory after resource migration as the first target decoding memory.
[0178] In one embodiment, the resource allocation module 1105 is further configured to
[0179] If the second remaining decoding capability meets the decoding required resource amount, connect the target bitstream to the target decoding chip, and allocate the first target decoding memory to the target bitstream; based on the first target decoding memory and the second remaining decoding capability, allocate decoding resources matching the decoding required resource amount for the target bitstream;
[0180] If the second remaining decoding capability does not meet the decoding required resource amount, perform frame dropping processing on the target bitstream.
[0181] In one embodiment, the resource linked list includes an idle resource linked list and an occupied resource linked list; the resource allocation module 1105 is configured to
[0182] When the first remaining decoding capability meets the decoding required resource amount, determine a second preset number of second candidate memories from the idle resource linked list; the total available resource amount of the second candidate memories is greater than or equal to the decoding required resource amount;
[0183] Determine a second target decoding memory according to the second preset number of second candidate memories;
[0184] Determine the third remaining decoding capability of the target decoding chip corresponding to the second target decoding memory;
[0185] Based on the second target decoding memory and the third remaining decoding capability, allocate decoding resources matching the decoding required resource amount for the target bitstream.
[0186] In one embodiment, the resource allocation module 1105 is configured to
[0187] Determine the fourth remaining decoding capabilities of the candidate decoding chips corresponding to each second candidate memory respectively;
[0188] According to the fourth remaining decoding capabilities of the candidate decoding chips corresponding to each second candidate memory respectively, determine the target candidate memory that matches the decoding requirement resource amount from the first preset number of second candidate memories; wherein, the target candidate memory refers to the second candidate memory among the first preset number of second candidate memories with the smallest difference between the total available resources and the decoding requirement resource amount, and the largest fourth remaining decoding capability of the corresponding candidate decoding chip.
[0189] Each module in the above decoding resource allocation device can be implemented in whole or in part by software, hardware, and their combinations. Each of the above modules can be embedded in the processor of the computer device in hardware form or be independent of it, or be stored in the memory of the computer device in software form, so that the processor can call and execute the operations corresponding to each of the above modules.
[0190] In an exemplary embodiment, a computer device is provided. The computer device can be a server, and its internal structure diagram can be as Figure 12 shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, abbreviated as I / O), and a communication interface. Among them, 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. Among them, 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 data related to decoding resource allocation. The input / output interface of the computer device is used for the processor to exchange information with external devices. The communication interface of the computer device is used to communicate with external terminals through a network connection. When the computer program is executed by the processor, it implements a decoding resource allocation method.
[0191] Those skilled in the art can understand that Figure 12 the structure shown in
[0192] merely represents the block diagram of some structures related to the solution of this application, and does not constitute a limitation on the computer device to which the solution of this application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.
[0193] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0194] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0195] Those of ordinary skill in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing relevant hardware through a computer program. 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 above method embodiments. Among them, any reference to a 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), Magnetoresistive 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. By way of illustration and not limitation, RAM can be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), etc. The databases involved in the embodiments provided in the present application can include at least one of relational databases and non-relational databases. Non-relational databases can include distributed databases based on blockchain, etc., and are not limited thereto. The processors involved in the embodiments provided in the present application can be general-purpose processors, central processors, graphics processors, digital signal processors, programmable logic devices, data processing logics based on quantum computing, Artificial Intelligence (AI) processors, etc., and are not limited thereto.
[0196] The technical features of the above embodiments can be combined arbitrarily. For the sake of concise description, 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, it should be considered as the scope recorded in this application.
[0197] The above-described embodiments merely represent several implementation manners of this application. The description is relatively specific and detailed, but it should not be construed as a limitation on the patent scope of this application. It should be noted that for those of ordinary skill in the art, without departing from the concept of this application, several modifications and improvements can still be made, and these all belong to the protection scope of this application. Therefore, the protection scope of this application shall be subject to the appended claims.
Claims
1. A decoding resource allocation method, characterized in that: The method comprises: Obtaining a first remaining decoding capacity corresponding to the target decoding system and a required decoding resource amount corresponding to the target bitstream; the first remaining decoding capacity refers to the sum of the unoccupied hardware decoding performance of all decoding chips in the target decoding system; In the case where the first remaining decoding capacity does not meet the required decoding resource amount, determining a target migration memory that matches the required decoding resource amount from a resource linked list; the resource linked list is a bidirectional linked list; the resource linked list includes an idle resource linked list and an occupied resource linked list; the target migration memory refers to a decoding memory in the resource linked list whose total available resources are greater than or equal to the required decoding resource amount corresponding to the target code stream and whose occupied resources are the smallest; Perform resource migration on the target migration memory to obtain a first target decoding memory; Determine a second remaining decoding capacity of a target decoding chip corresponding to the first target decoding memory; the second remaining decoding capacity refers to unoccupied hardware decoding performance of the target decoding chip; 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, performing frame dropping processing on the target bitstream; The method further comprises: An analysis is performed based on the decoding resource allocation method. If the analysis result is that the target code stream can access the target decoding system, the steps of the decoding resource allocation method are executed; if the analysis result is that the target code stream cannot access the target decoding system, the steps of the decoding resource allocation method are not executed.
2. The method according to claim 1, characterized in that 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; Get the occupied resource amount corresponding to each of the multiple 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 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 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.
4. The method according to claim 1, characterized in that The 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 method further comprises: 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.
6. The method according to claim 5, 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.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
8. 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 6 are implemented.
9. 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 6 are implemented.
Citation Information
Patent Citations
Virtual machine migration processing and strategy generation method and device, equipment and storage medium
CN112286622A
Method for starting operation of video conference and electronic equipment
CN118963850A