A method and electronic device for encoding and decoding.

By acquiring the hardware parameters and data of the computing power card, generating a test dataset adapted to actual application scenarios, performing encoding and decoding processing, and analyzing the results, the problem of the disconnect between the nominal capability and actual performance of the computing power card is solved, and the accuracy of encoding and decoding testing and scientific selection are achieved.

CN121486561BActive Publication Date: 2026-04-03INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-08
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

The nominal encoding and decoding capabilities of computing cards cannot truly reflect their actual performance, leading to a disconnect between encoding and decoding capability assessment and practical applications.

Method used

By acquiring the hardware parameters and test data of the computing card under test, the resolution and format are converted according to the hardware characteristics to generate a test dataset, encoding and decoding processing is performed and resource usage data and encoding and decoding results are collected, and finally a test report is generated with the help of a preset algorithm.

Benefits of technology

Accurately determining the encoding and decoding capabilities and resource utilization efficiency of computing cards improves the accuracy of encoding and decoding tests and provides a scientific basis for selection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121486561B_ABST
    Figure CN121486561B_ABST
Patent Text Reader

Abstract

This application discloses a coding and decoding testing method and electronic device, relating to the field of data processing technology. The method involves first acquiring the hardware parameters and test data of the computing card under test, then specifically converting the resolution and format of the test data according to hardware characteristics to generate multiple test tasks adapted to actual application scenarios. Next, coding and decoding processing is performed on each test task, and resource usage data and coding / decoding results are collected. Finally, a preset algorithm is used for analysis to generate a test report that comprehensively reflects the actual hardware coding and decoding performance of the computing card in different scenarios. This provides users with a scientific basis for selection, resolves the contradiction between hardware coding and decoding capability assessment and actual application, and improves the accuracy of coding and decoding testing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing technology, and more particularly to a testing method and electronic device for encoding and decoding. Background Technology

[0002] With the rapid development of artificial intelligence, computing cards are increasingly being used in image and video analysis. These scenarios all rely on the efficient processing capabilities of computing cards for massive amounts of unstructured data. The core of a computing card lies not only in its computing power but also in its ability to encode and decode image and video data. Encoding and decoding are crucial steps in data preprocessing and post-processing: raw images or videos need to be decoded into a data format that the system can recognize before model inference can be performed; the inference results then need to be encoded into a format that can be stored or transmitted.

[0003] Computing power cards typically integrate hardware codec chips to improve processing efficiency and reduce processor load. Differences in chip architecture and software ecosystem compatibility mean that the advertised codec capabilities of a computing power card may not accurately reflect its actual performance. Summary of the Invention

[0004] This application provides a method and electronic device for testing encoding and decoding, in order to at least solve the problem in related technologies that the nominal encoding and decoding capabilities of computing cards cannot truly reflect their actual performance.

[0005] This application provides a method for testing encoding and decoding, including:

[0006] Obtain the hardware parameters and test data of the computing card under test;

[0007] Based on the hardware parameters, the data to be tested is converted in terms of resolution and format to generate a test dataset, which includes multiple test tasks.

[0008] Perform encoding and decoding processing on multiple test tasks to determine the resource consumption data and encoding / decoding results corresponding to the encoding and decoding processing;

[0009] A test report is generated based on resource usage data and encoding / decoding results using a preset algorithm.

[0010] This application also provides a testing apparatus for encoding and decoding, comprising:

[0011] The acquisition module is used to acquire the hardware parameters and test data of the computing card under test;

[0012] The conversion module is used to convert the resolution and format of the data to be tested according to the hardware parameters, and generate a test dataset, which includes multiple test tasks.

[0013] The determination module is used to perform encoding and decoding processing on multiple test tasks, and to determine the resource consumption data and encoding and decoding results corresponding to the encoding and decoding processing.

[0014] The generation module is used to generate test reports based on resource usage data and encoding / decoding results using a preset algorithm.

[0015] This application also provides an electronic device, comprising: a memory for storing a computer program; and a processor for executing the computer program to implement the steps of any of the above-described encoding / decoding test methods.

[0016] This application also provides a computer-readable storage medium storing a computer program, wherein when the computer program is executed by a processor, it implements the steps of any of the above-described encoding / decoding test methods.

[0017] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of any of the above-described encoding / decoding test methods.

[0018] This application involves first acquiring the hardware parameters and test data of the computing card under test, then converting the resolution and format of the test data according to the hardware characteristics to generate multiple test tasks adapted to actual application scenarios. Each test task is then subjected to encoding and decoding processing, and resource usage data and encoding / decoding results are collected. Finally, a preset algorithm is used for analysis to generate a test report that comprehensively reflects the actual hardware encoding and decoding performance of the computing card in different scenarios. This provides users with a scientific basis for selection, resolves the contradiction between hardware encoding and decoding capability assessment and actual application, and improves the accuracy of encoding and decoding testing. Attached Figure Description

[0019] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0020] Figure 1 A schematic diagram of the structure of a computer system provided in an embodiment of this application;

[0021] Figure 2 A flowchart illustrating a testing method for encoding and decoding provided in an embodiment of this application;

[0022] Figure 3 A flowchart illustrating another encoding / decoding testing method provided in an embodiment of this application;

[0023] Figure 4 A flowchart illustrating another encoding / decoding testing method provided in an embodiment of this application;

[0024] Figure 5A schematic diagram of the structure of a codec testing device provided in an embodiment of this application;

[0025] Figure 6 A schematic diagram of the structure of the electronic device provided in this application.

[0026] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation

[0027] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the protection scope of this application.

[0028] It should be noted that, in the description of this application, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. The terms "first," "second," etc., in this application are used to distinguish similar objects and are not used to describe a specific order or sequence.

[0029] With the rapid development of artificial intelligence, computing cards are increasingly being used in image and video analysis. These scenarios all rely on the efficient processing capabilities of computing cards for massive amounts of unstructured data. The core of a computing card lies not only in its computing power but also in its ability to encode and decode image and video data. Encoding and decoding are crucial steps in data preprocessing and post-processing: raw images or videos need to be decoded into a data format that the system can recognize before model inference can be performed; the inference results then need to be encoded into a format that can be stored or transmitted.

[0030] Computing power cards typically integrate hardware codec chips to improve processing efficiency and reduce processor load. Differences in chip architecture and software ecosystem compatibility mean that the advertised codec capabilities of a computing power card may not accurately reflect its actual performance.

[0031] To address the aforementioned technical issues, this application provides a method for encoding and decoding testing. First, the hardware parameters and test data of the computing card under test are acquired. Then, the resolution and format of the test data are specifically converted based on hardware characteristics to generate multiple test tasks adapted to actual application scenarios. Next, encoding and decoding processing is performed on each test task, and resource usage data and encoding / decoding results are collected. Finally, a preset algorithm is used for analysis to generate a test report that comprehensively reflects the actual hardware encoding and decoding performance of the computing card in different scenarios. This provides users with a scientific basis for selection, resolves the contradiction between hardware encoding / decoding capability assessment and actual application, and improves the accuracy of encoding and decoding testing.

[0032] To enable those skilled in the art to better understand the present application, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0033] Below, we will provide examples of specific application environment architectures or specific hardware architectures that the execution of encoding and decoding test methods depends on.

[0034] Figure 1 This is a schematic diagram of the structure of a computer system provided in an embodiment of this application. Please refer to [link / reference]. Figure 1 , Figure 1 It may include a computer system, which includes at least a computing power card, hard disk, memory, central processing unit, and multiple network interface cards (NICs). The computing power card includes at least an encoder, decoder, computing power card processor, and video memory.

[0035] The central processing unit (CPU) is the core of a computer's computation and control, responsible for executing instructions, scheduling tasks, and coordinating the work of various hardware components.

[0036] In scenarios involving image and video processing and computation, the central processing unit can receive external data from the network card, interact with memory to temporarily store data, issue encoding, decoding and inference tasks to the computing card, and handle general system computing tasks at the same time.

[0037] Memory can serve as a temporary data storage medium, acting as a data buffer between the central processing unit (CPU), computing card, and hard drive. Raw image / video data to be processed, intermediate encoding / decoding results, and temporary inference data can be temporarily stored in memory for fast access by the CPU and computing card, avoiding the speed bottleneck of frequent hard drive reads and significantly improving data processing efficiency.

[0038] Hard drives can be long-term storage devices used to permanently store data, such as original image / video files, system programs, and processed results. Hard drives have large storage capacities but slow read / write speeds, requiring data to be loaded into memory for use by the central processing unit and computing card.

[0039] Multiple network interface cards (NICs) can serve as interfaces between a computer and external networks, used for data input and output. Multiple NICs can support multi-link data transmission, improving data throughput and meeting the parallel data access needs in various scenarios.

[0040] Computing power cards can be dedicated hardware acceleration cards with architecture optimized for tasks such as image and video encoding and decoding, and model inference. They undertake core high-density data processing and computing work, and through hardware encoding and decoding and computing power card processors, they can efficiently complete image and video format conversion, feature extraction and analysis, and significantly reduce the load on the central processing unit.

[0041] An encoder can encode processed digital signals into a universal format for storage or network transmission.

[0042] For example, the results of model inference and the decoded raw image data can be converted into storable video files or transmittable image streams after being processed by an encoder, ensuring the universality and dissemination of the data.

[0043] A decoder can be used to decode raw compressed image / video data into a raw data format that the system can recognize.

[0044] For example, an H.265 compressed video stream received from the network card is decoded by the decoder and converted into raw image data that can be directly processed by the computing power card processor.

[0045] Computing power cards can be used to perform model inference and complex parallel computing tasks.

[0046] Video memory can be a dedicated high-speed memory for computing cards, used to store all data during the computing card's processing, including the raw data to be decoded, the decoded image data, model parameters, intermediate inference results, etc.

[0047] Figure 2 This is a flowchart illustrating a codec testing method provided in an embodiment of this application. The execution entity in this embodiment can be a central processing unit (CPU). The CPU can be implemented in software or a combination of software and hardware. Please refer to... Figure 2 The method includes:

[0048] S201. Obtain the hardware parameters and test data of the computing card to be tested.

[0049] The computing power card to be tested can refer to a hardware acceleration device with encoding and decoding functions.

[0050] For example, the computing cards to be tested include graphics processors, AI accelerator cards, and dedicated video codec cards.

[0051] Hardware parameters can be parameters that describe the hardware characteristics of a computing card.

[0052] Hardware parameters may include model number, video memory capacity, supported codec formats, maximum resolution, interface specifications, etc.

[0053] The data to be tested can be the raw multimedia data used for testing, including image data, video data, and video stream data.

[0054] Video stream data can be obtained through an external network camera and network card.

[0055] The hardware parameters of the computing card under test can be collected using preset tools, and the test data can be obtained from the storage space.

[0056] S202. Based on the hardware parameters, perform resolution and format conversion processing on the data to be tested to generate a test dataset.

[0057] The test dataset includes multiple test tasks.

[0058] The test dataset can be a collection of multiple test tasks, each with specific resolution and format encoding / decoding requirements, and adapted to the hardware parameters of the computing card under test.

[0059] A test task can be a task corresponding to a single encoding / decoding requirement in the test dataset.

[0060] Resolution conversion can adjust the resolution of the data to be tested to a resolution supported by the computing card.

[0061] Format conversion can convert the format of the data to be tested into the encoding and decoding format supported by the computing card.

[0062] Resolutions can include 720p, 1080p, 4K, 8K, etc.

[0063] Image formats can include jpeg, png, bmp, avif, and apng, etc.

[0064] Video formats can include mp4, mov, avi, wmv, mkv, H.264, and H.265, etc.

[0065] The test data can be standardized and transformed according to the hardware parameters to ensure a precise match between the test task and the computing card's capabilities.

[0066] Based on the maximum resolution supported by the computing card, a set of test resolutions can be selected. Based on the encoding and decoding formats supported by the computing card, a set of image formats and a set of video formats can be selected. Based on the set of test resolutions, image formats, and video formats, the data to be tested can be converted using a conversion tool to generate multiple test tasks. All test tasks are integrated into a test dataset to ensure coverage of all resolution and format combinations supported by the computing card.

[0067] Each test task can be a combination of "resolution + format + codec type".

[0068] Each test task may include a fixed number of images or videos.

[0069] Optionally, the test dataset can be generated by converting the resolution and format of the test data according to the hardware parameters as follows: input the hardware parameters into a preset model to obtain the test parameters; and convert the resolution and format of the test data according to the test parameters to generate the test dataset.

[0070] The preset model can be a trained algorithm model used to map the hardware parameters of the computing card to the optimal test parameters, and then automatically complete the transformation of the test data based on the test parameters, ultimately generating a more adaptable test dataset.

[0071] S203. Perform encoding and decoding processing on multiple test tasks, and determine the resource usage data and encoding / decoding results corresponding to the encoding and decoding processing.

[0072] Resource usage data can be used to describe the resource usage of the system and computing card during the encoding and decoding process.

[0073] Resource usage data can include processor utilization, computing card load rate, memory usage, video memory usage, computing card interface bandwidth, etc.

[0074] The encoding and decoding results can be the output data of the encoding and decoding process, including frame rate, total time, whether frames are dropped or errors occur, etc.

[0075] The hardware codec can be called through the dedicated codec interface of the computing power card to execute the test tasks in the test dataset in sequence, and determine the resource consumption data and codec results corresponding to the codec processing.

[0076] S204. Based on resource usage data and encoding / decoding results, generate a test report using a preset algorithm.

[0077] The preset algorithm can be used to analyze resource usage data and encoding / decoding results, including algorithms such as summarizing frame rate by resolution / format, determining the independence of the hard encoder, and evaluating the rationality of resource usage.

[0078] Test reports can include encoding / decoding capability metrics, resource utilization efficiency, and anomalies, and are used to demonstrate the encoding / decoding performance of the computing card.

[0079] The system can perform hierarchical analysis of resource usage data and encoding / decoding results using a preset algorithm: calculate encoding / decoding capability indicators, determine resource utilization efficiency, summarize abnormal situations, and generate test reports.

[0080] Encoding and decoding capability metrics can be values ​​for encoding and decoding capabilities at various resolutions and in various formats.

[0081] Resource utilization efficiency can be measured by the independence of the hard encoder and the rationality of resource usage.

[0082] Summarizing abnormal situations can include recording the specific types of tasks that fail to meet efficiency standards, abnormal indicators, and the number of times they occur.

[0083] Test reports can be categorized by data type (images / videos) and task type (encoding / decoding).

[0084] Test reports may also include encoding and decoding capability values ​​and rankings for each resolution, efficiency evaluation results, anomaly analysis and optimization suggestions, etc.

[0085] For example, the optimization suggestion is that the video memory is insufficient for 8K encoding, and it is recommended to upgrade to a 64GB video memory computing card.

[0086] This embodiment provides a method for encoding and decoding testing. It involves acquiring the hardware parameters and test data of the computing card under test; converting the resolution and format of the test data based on the hardware parameters to generate a test dataset, which includes multiple test tasks; performing encoding and decoding processing on the multiple test tasks to determine the corresponding resource consumption data and encoding / decoding results; and generating a test report based on the resource consumption data and encoding / decoding results using a preset algorithm. By combining the hardware parameters of the computing card under test with the test data, comprehensively monitoring the resource consumption during the encoding and decoding process, and analyzing the encoding and decoding results, the method can accurately determine the encoding and decoding capabilities and resource utilization efficiency of the computing card, thus improving the accuracy of encoding and decoding testing.

[0087] Below, in conjunction with Figure 3 The process of encoding and decoding multiple test tasks, determining the resource consumption data and encoding / decoding results, is explained.

[0088] Figure 3 This is a flowchart illustrating another encoding / decoding testing method provided in an embodiment of this application. Based on the above embodiments, see [link to relevant documentation]. Figure 3 The method includes:

[0089] S301. Sort multiple test tasks to obtain a test sequence.

[0090] Sorting can refer to the process of determining the execution order based on the resource requirements, type, format, and other characteristics of a test task.

[0091] A test sequence can be an ordered queue formed by sorting test tasks.

[0092] Multiple test tasks can be sorted in ascending order of resource requirements to obtain a test sequence.

[0093] Multiple test tasks can be sorted according to task type to obtain a test sequence.

[0094] The test tasks can be sorted according to their resource requirements, complexity, type correlation, and other dimensions. The sorting rules are flexibly configurable and are not limited here.

[0095] S302. Following the order of the test sequence, encode and decode multiple test tasks sequentially to obtain the encoding and decoding results corresponding to each test task.

[0096] The encoding and decoding results can be the core performance and correctness data output after the test task is executed.

[0097] The encoding and decoding results can include encoding and decoding frame rate, data integrity verification results, format compatibility, total task time, etc.

[0098] Execution in sequence ensures that each task has exclusive access to the core encoding and decoding resources of the computing card, avoiding performance interference caused by multiple tasks running in parallel, and accurately positioning the independent encoding and decoding capabilities of each task.

[0099] Call the hardware encoding / decoding interface and start the task one by one according to the test sequence to ensure that only one test task is executed at a time. For each test task, the encoding / decoding results within the effective test period are statistically analyzed in real time.

[0100] The encoding and decoding results can include the encoding / decoding frame rate, data integrity metrics, and total time.

[0101] Optionally, for any test task, the encoding and decoding process can be performed as follows to obtain the corresponding encoding and decoding result: determine the task type and task parameters of the test task; schedule the test task to the target executor according to the task type; when the target executor is an encoder, encode the test task according to the task parameters to obtain the corresponding encoding result; when the target executor is a decoder, decode the test task according to the task parameters to obtain the corresponding decoding result.

[0102] The task types include encoding and decoding types, the target executors include encoders and decoders, and the encoding / decoding results include either the encoding result or the decoding result.

[0103] Task parameters can be used to describe the specific requirements of task processing and serve as the basis for the executor's operation.

[0104] Task parameters can include resolution and data format.

[0105] The task parameters corresponding to the encoding type may also include target bitrate, quantization parameters, encoding level, etc.

[0106] The task parameters corresponding to the decoding type may also include fault tolerance level, output format, etc.

[0107] The target executor can refer to a dedicated hardware module on the computing power card.

[0108] S303. When multiple test tasks are being processed for encoding and decoding, the system components are monitored to obtain resource usage data corresponding to each of the multiple test tasks.

[0109] System components can refer to the hardware resource components involved in the encoding and decoding process.

[0110] System components may include the computing card under test, the host CPU, system memory, etc.

[0111] Monitoring and processing can refer to the process of collecting the resource usage status of system components in real time through special tools or interfaces during the execution of encoding and decoding tasks.

[0112] Resource usage data can be data on the usage of system components obtained through monitoring and processing.

[0113] Synchronous monitoring with encoding and decoding tasks ensures that resource usage data strictly corresponds to the task execution process, accurately reflecting the consumption of system resources by a single task.

[0114] The monitoring tool can be triggered to start collecting data when each test task starts and stop collecting data when the task ends, ensuring that the resource data corresponds one-to-one with the test task and obtaining the resource usage data corresponding to each test task.

[0115] Optionally, for any test task, the system components can be monitored and processed to obtain the resource usage data corresponding to the test task while the test task is being encoded and decoded, in the following way: when the test task is being encoded and decoded, obtain the process identifier of the test task; obtain at least one of the following parameters corresponding to the process identifier: computing card load rate, video memory usage rate, memory usage rate, and processor utilization rate, through multiple monitoring tools; determine whether the test task is executed successfully; if so, the resource usage data corresponding to the test task includes at least one of the following parameters: computing card load rate, video memory usage rate, memory usage rate, and processor utilization rate; if not, add the test task to the test sequence.

[0116] This involves adding test tasks to the test sequence and updating the number of times the test task is executed.

[0117] A process identifier can be a unique numerical identifier assigned by the system to each running test task.

[0118] When a test task is started through the target executor (encoder / decoder), the system can assign it a process identifier, which can be obtained in real time by calling the system interface.

[0119] The resource usage data collected subsequently is bound to the process identifier to ensure that the data corresponds only to the current test task and to exclude interference from the resource consumption of other processes.

[0120] The computing power card load rate can be used to measure the busyness of the core computing unit of the computing power card under test. It is a key indicator reflecting whether the computing power card is fully engaged in encoding and decoding tasks.

[0121] Video memory utilization rate can be used to measure the percentage of dedicated video memory used by the computing card under test, reflecting whether the video memory resources can support the current test task.

[0122] Memory utilization rate can be used to measure the proportion of system memory used by a test task, reflecting the consumption of host general memory by the task.

[0123] Processor utilization can be used to measure the proportion of CPU usage in a test task, reflecting whether the CPU participates in the core computation of encoding and decoding, and is an indicator for judging the independence of encoding and decoding.

[0124] This embodiment provides a method for encoding and decoding testing. It involves sorting multiple test tasks to obtain a test sequence; then, according to the test sequence, performing encoding and decoding processing on the multiple test tasks sequentially to obtain encoding and decoding results for each task; and finally, monitoring system components while multiple test tasks are being processed to obtain resource usage data for each task. By sorting test tasks to avoid resource contention, executing them sequentially to ensure a stable operating environment, and synchronously monitoring to accurately bind resource data with tasks, this method effectively improves the accuracy and repeatability of encoding and decoding results and resource usage data. This provides reliable data support for subsequent evaluation of the encoding and decoding capabilities and resource utilization efficiency of computing cards, thus enhancing the accuracy of encoding and decoding testing.

[0125] Below, in conjunction with Figure 4 The process of generating a test report based on resource usage data and encoding / decoding results using a preset algorithm is explained.

[0126] Figure 4 This is a flowchart illustrating another encoding / decoding testing method provided in an embodiment of this application. Based on the above embodiments, see [link to relevant documentation]. Figure 4 The method includes:

[0127] S401. Based on the data type and task type of the test tasks, classify and process multiple test tasks to obtain multiple first sets.

[0128] The same first set includes multiple first tasks with the same data type and the same task type in multiple test tasks.

[0129] In this way, the test tasks are categorized according to core application scenarios, focusing on the performance of computing cards in the same type of scenario, avoiding cross-interference of data from different scenarios, and making the analysis more targeted.

[0130] Iterate through all test tasks and group test tasks with the same data type and task type into a first set. Each first set corresponds to a specific application scenario.

[0131] For example, the test tasks include: 1. 720p, jpeg image decoding; 2. 1080p, h265 video encoding; 3. 4K, png image decoding; 4. 8K, mp4 video encoding.

[0132] After classification, two first sets are obtained: the first set corresponding to image decoding and the first set corresponding to video encoding.

[0133] Below, we take any one of the multiple first sets as an example:

[0134] S402. According to the resolution and format of the first task, classify and process multiple first tasks to obtain multiple second sets.

[0135] The same second set includes at least one second task with the same resolution and format as multiple first tasks.

[0136] In this way, within the first set, it can be further subdivided according to the specific technical parameters of the test task, accurately locate the performance of the computing card under a specific resolution and format, and provide the smallest granular analysis unit for subsequent quantitative analysis.

[0137] It can iterate through all first tasks in any set and group first tasks with the same resolution and data format into a second set.

[0138] S403. For any second set, determine the efficiency level of the second set based on the resource usage data corresponding to at least one second task in the second set, and determine the processing speed of the second set based on the encoding and decoding results corresponding to at least one second task in the second set.

[0139] Efficiency level can be used as a grading index to measure the rationality of resource utilization in the second set. It is determined based on resource data such as computing power card load rate and reflects the resource adaptability of the encoding and decoding process.

[0140] For any given second set, the efficiency level of the second set can be determined according to preset rules based on the resource usage data of all second tasks within the second set, and the processing speed of the second set can be determined based on the encoding and decoding results of all second tasks within the second set.

[0141] Optionally, the resource usage data includes at least one of the following: computing card load rate, video memory usage rate, memory usage rate, and processor utilization rate. The efficiency level of the second set can be determined based on the resource usage data corresponding to at least one second task in the second set in the following manner: based on the computing card load rate and processor utilization rate corresponding to at least one second task, determine the execution object information corresponding to at least one second task; based on the video memory usage rate and memory usage rate corresponding to at least one second task, determine the resource usage information corresponding to at least one second task; based on the execution object information and resource usage information corresponding to at least one second task, determine the efficiency level corresponding to at least one second task; and based on the efficiency level corresponding to at least one second task, determine the efficiency level of the second set.

[0142] Specifically, it is determined whether the second task satisfies the condition that the computing power card load rate is greater than the first threshold and the processor utilization rate is less than the second threshold. If yes, the execution object information corresponding to the second task is determined to be the computing power card; otherwise, the execution object information corresponding to the second task is determined to be the computing power card and the processor.

[0143] Determine whether the second task satisfies the condition that the video memory usage rate is less than the third threshold and the memory usage rate is less than the fourth threshold; if yes, then the resource usage information is determined to be reasonable; otherwise, the resource usage information is determined to be abnormal.

[0144] Alternatively, efficiency levels can be represented using Table 1:

[0145] Table 1

[0146]

[0147] S404. Based on the efficiency level and processing speed corresponding to the multiple second sets, determine the analysis results corresponding to the first set.

[0148] A mapping relationship can be generated based on multiple second sets, as well as the efficiency levels and processing speeds corresponding to each second set. The mapping relationship can include the mapping between resolution, format, efficiency, and speed. Based on the mapping relationship, the analysis results corresponding to the first set can be determined.

[0149] For example, the analysis results show that in the image decoding scenario, when the resolution is increased from 720p to 8K, the processing speed drops from 81fps to 25fps, a decrease of 69%.

[0150] The analysis results show that for decoding images at resolutions of 4K and above, the video memory usage rate is close to 90%, and the efficiency level drops from level one to level two.

[0151] For example, in the first set corresponding to image decoding, the analysis results can be expressed by the following formula:

[0152] D p r =Σfps r i

[0153] Among them, D p r It can represent the decoding capability of an image p at resolution r, where p can represent an image, and fps. r i This can represent the processing speed of data format i at resolution r, where r represents resolution, r∈{720p,1080p,4K,8K}, and i represents data format, i∈{jpeg,png,bmp,avif,apng}.

[0154] Video decoding, image encoding, and video encoding follow similar formulas and are not limited here.

[0155] Optionally, the analysis results corresponding to the first set can be determined based on the efficiency level and processing speed corresponding to the multiple second sets as follows: determine the target resolution and target format corresponding to the multiple second sets; input the target resolution, target format, efficiency level and processing speed into the analysis model respectively to determine the analysis results corresponding to the first set.

[0156] The analysis model is a pre-defined algorithm module used to integrate, compare, and extract patterns from the input multi-dimensional data, and finally output the structured analysis conclusions of the first set.

[0157] S405. Generate a test report based on the analysis results corresponding to the multiple first sets respectively.

[0158] In this way, the analysis results of all the first sets are presented systematically, forming a user-oriented final result that is both professional and readable, providing a direct basis for the selection and optimization of computing cards.

[0159] This embodiment provides a codec testing method. Multiple test tasks are categorized according to their data type and task type to obtain multiple first sets. Each first set includes multiple first tasks of the same data type and task type from the multiple test tasks. For any given first set, the multiple first tasks are categorized according to their resolution and format to obtain multiple second sets. Each second set includes at least one second task of the same resolution and format from the multiple first tasks. For any given second set, the efficiency level of the second set is determined based on the resource usage data corresponding to at least one second task in the second set. The processing speed of the second set is determined based on the codec results corresponding to at least one second task in the second set. The analysis results corresponding to the first set are determined based on the efficiency level and processing speed of the multiple second sets. A test report is generated based on the analysis results corresponding to the multiple first sets. In this way, by classifying data types, task types, resolutions, and formats hierarchically, scattered test data is systematically integrated, accurately mining the encoding and decoding performance and resource efficiency characteristics of computing cards under different scenarios and technical conditions. This provides a structured analysis basis for generating comprehensive and reliable test reports, effectively supporting the quantitative evaluation and optimization decisions of computing card encoding and decoding capabilities, and improving the accuracy of encoding and decoding tests.

[0160] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0161] Figure 5 This is a schematic diagram of a codec testing apparatus provided in an embodiment of this application. Please refer to [link / reference]. Figure 5 The encoding and decoding test device 500 includes an acquisition module 501, a conversion module 502, a determination module 503, and a generation module 504.

[0162] The acquisition module 501 is used to acquire the hardware parameters and test data of the computing card under test;

[0163] The conversion module 502 is used to convert the resolution and format of the data to be tested according to the hardware parameters, and generate a test dataset, which includes multiple test tasks.

[0164] The determination module 503 is used to perform encoding and decoding processing on multiple test tasks and determine the resource consumption data and encoding and decoding results corresponding to the encoding and decoding processing.

[0165] The generation module 504 is used to generate a test report based on resource usage data and encoding / decoding results using a preset algorithm.

[0166] In one possible implementation, for any given test task, the determination module 503 is specifically used for:

[0167] Determine the task type and parameters of the test task. The task type includes encoding type and decoding type.

[0168] Based on the task type, the test task is scheduled to the target executor, which includes an encoder and a decoder;

[0169] When the target executor is an encoder, the test task is encoded according to the task parameters to obtain the encoding result corresponding to the test task.

[0170] When the target executor is a decoder, the test task is decoded according to the task parameters to obtain the decoding result corresponding to the test task.

[0171] The encoding and decoding results include either the encoding result or the decoding result.

[0172] In one possible implementation, for any given test task, the determination module 503 is specifically used for:

[0173] When the test task is processed by encoding and decoding, obtain the process identifier of the test task;

[0174] Obtain at least one of the following parameters corresponding to the process identifier: computing card load rate, video memory usage rate, memory usage rate, and processor utilization rate, through multiple monitoring tools.

[0175] Determine whether the test task was executed successfully;

[0176] If so, the resource usage data corresponding to the test task includes at least one of the following: computing card load rate, video memory usage rate, memory usage rate, and processor utilization rate;

[0177] If not, add the test task to the test sequence.

[0178] In one possible implementation, the generation module 504 is specifically used for:

[0179] Based on the data type and task type of the test tasks, multiple test tasks are classified and processed to obtain multiple first sets. The same first set includes multiple first tasks with the same data type and the same task type in multiple test tasks.

[0180] For any given first set, the resource usage data and encoding / decoding results corresponding to multiple first tasks are analyzed and processed to obtain the analysis results corresponding to the first set.

[0181] A test report is generated based on the analysis results corresponding to the multiple first sets.

[0182] In one possible implementation, the generation module 504 is specifically used for:

[0183] According to the resolution and format of the first task, multiple first tasks are classified and processed to obtain multiple second sets. Each second set includes at least one second task with the same resolution and format as the multiple first tasks.

[0184] For any given second set, determine the efficiency level of the second set based on the resource consumption data corresponding to at least one second task in the second set, and determine the processing speed of the second set based on the encoding and decoding results corresponding to at least one second task in the second set.

[0185] Based on the efficiency level and processing speed corresponding to the multiple second sets, the analysis results corresponding to the first set are determined.

[0186] In one possible implementation, the resource usage data includes at least one of the following: computing card load rate, video memory usage rate, memory usage rate, and processor utilization rate. The generation module 504 is specifically used for:

[0187] Based on the computing card load rate and processor utilization rate corresponding to at least one second task, determine the execution object information corresponding to each of the at least one second task.

[0188] Based on the video memory usage and memory usage corresponding to at least one second task, determine the resource usage information corresponding to at least one second task.

[0189] Based on the execution object information and resource usage information corresponding to at least one second task, determine the efficiency level corresponding to each of the at least one second task;

[0190] The efficiency level of the second set is determined based on the efficiency level corresponding to at least one second task.

[0191] In one possible implementation, the generation module 504 is specifically used for:

[0192] Determine the target resolution and target format corresponding to each of the multiple second sets;

[0193] Input the target resolution, target format, efficiency level, and processing speed into the analysis model to determine the analysis results corresponding to the first set.

[0194] In one possible implementation, the conversion module 502 is specifically used for:

[0195] Input the hardware parameters into the preset model to obtain the test parameters;

[0196] Based on the test parameters, the test data is converted in terms of resolution and format to generate a test dataset.

[0197] For a description of the features in the embodiment corresponding to the encoding / decoding test apparatus, please refer to the relevant description in the embodiment corresponding to the encoding / decoding test method, which will not be repeated here.

[0198] Figure 6 A schematic diagram of the structure of the electronic device provided in this application. Figure 6 As shown, the electronic device 60 provided in this embodiment includes at least one processor 601 and a memory 602. Optionally, the electronic device 60 further includes a communication component 603. The processor 601, memory 602, and communication component 603 are connected via a bus.

[0199] In a specific implementation, at least one processor 601 executes computer execution instructions stored in memory 602, causing at least one processor 601 to execute the above-described encoding and decoding test method embodiment.

[0200] The specific implementation process of processor 601 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.

[0201] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in the application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.

[0202] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.

[0203] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.

[0204] Embodiments of this application also provide a computer-readable storage medium storing a computer program, wherein the computer program is configured to execute the steps in any of the above-described encoding / decoding test method embodiments at runtime.

[0205] In one exemplary embodiment, the aforementioned computer-readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard disk, magnetic disk, or optical disk.

[0206] Embodiments of this application also provide a computer program product, which includes a computer program that, when executed by a processor, implements the steps in any of the above-described encoding / decoding test method embodiments.

[0207] Embodiments of this application also provide another computer program product, including a non-volatile computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in any of the above-described encoding / decoding test method embodiments.

[0208] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0209] The above provides a detailed description of the encoding and decoding testing method provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and its core ideas. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from its principles, and these improvements and modifications also fall within the protection scope of the claims of this application.

Claims

1. A method for testing encoding and decoding, characterized in that, include: Obtain the hardware parameters and test data of the computing card under test; Based on the hardware parameters, the data to be tested is converted in terms of resolution and format to generate a test dataset, which includes multiple test tasks. The multiple test tasks are sequentially encoded and decoded, and while each test task is being encoded and decoded, the system components are monitored simultaneously to obtain the resource usage data and encoding / decoding results corresponding to the encoding / decoding process. Based on the data type and task type of the test tasks, the multiple test tasks are classified to obtain multiple first sets; wherein, each first set contains multiple first tasks with the same data type and the same task type; For each first set, the resource consumption data and encoding / decoding results corresponding to each first task are analyzed to obtain the analysis results for that first set. A test report is generated based on the analysis results corresponding to the multiple first sets.

2. The method according to claim 1, characterized in that, The multiple test tasks are encoded and decoded sequentially, including: The multiple test tasks are sorted to obtain a test sequence; The multiple test tasks are encoded and decoded sequentially according to the order of the test sequence.

3. The method according to claim 2, characterized in that, For any given test task, the test task is encoded and decoded to obtain the encoding and decoding result corresponding to the test task, including: Determine the task type and task parameters of the test task, wherein the task type includes encoding type and decoding type; According to the task type, the test task is scheduled to the target executor, which includes an encoder and a decoder; When the target executor is an encoder, the test task is encoded according to the task parameters to obtain the encoding result corresponding to the test task; When the target executor is a decoder, the test task is decoded according to the task parameters to obtain the decoding result corresponding to the test task; The encoding / decoding result includes either the encoding result or the decoding result.

4. The method according to claim 2, characterized in that, For any given test task, when the test task undergoes encoding / decoding processing, the system components are monitored to obtain the resource usage data corresponding to the test task, including: When the test task is subjected to encoding and decoding processing, the process identifier of the test task is obtained; Obtain at least one of the following parameters corresponding to the process identifier: computing card load rate, video memory usage rate, memory usage rate, and processor utilization rate, through multiple monitoring tools: Determine whether the test task was executed successfully; If so, the resource usage data corresponding to the test task includes at least one of the following: computing card load rate, video memory usage rate, memory usage rate, and processor utilization rate; If not, add the test task to the test sequence.

5. The method according to claim 1, characterized in that, The resource usage data and encoding / decoding results corresponding to the multiple first tasks are analyzed and processed to obtain the analysis results corresponding to the first set, including: According to the resolution and format of the first task, the multiple first tasks are classified to obtain multiple second sets. Each second set includes at least one second task with the same resolution and format as the multiple first tasks. For any second set, determine the efficiency level of the second set based on the resource consumption data corresponding to at least one second task in the second set, and determine the processing speed of the second set based on the encoding and decoding results corresponding to at least one second task in the second set. The analysis results corresponding to the first set are determined based on the efficiency level and processing speed corresponding to the multiple second sets.

6. The method according to claim 5, characterized in that, The resource usage data includes at least one of the following: computing card load rate, video memory usage rate, memory usage rate, and processor utilization rate. Based on the resource usage data corresponding to at least one second task in the second set, the efficiency level of the second set is determined, including: Based on the computing card load rate and processor utilization rate corresponding to the at least one second task, the execution object information corresponding to the at least one second task is determined. Based on the video memory usage rate and memory usage rate corresponding to the at least one second task, the resource usage information corresponding to the at least one second task is determined. Based on the execution object information and resource usage information corresponding to the at least one second task, the efficiency level corresponding to the at least one second task is determined. The efficiency level of the second set is determined based on the efficiency level corresponding to each of the at least one second task.

7. The method according to claim 5, characterized in that, Based on the efficiency levels and processing speeds corresponding to the multiple second sets, the analysis results corresponding to the first set are determined, including: Determine the target resolution and target format corresponding to the plurality of second sets respectively; Input the target resolution, target format, efficiency level, and processing speed into the analysis model to determine the analysis results corresponding to the first set.

8. The method according to any one of claims 1-4, characterized in that, Based on the hardware parameters, the data to be tested is converted in terms of resolution and format to generate a test dataset, including: The hardware parameters are input into a preset model to obtain the test parameters; Based on the test parameters, the test data is processed for resolution and format conversion to generate a test dataset.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to implement the steps of the encoding / decoding test method as described in any one of claims 1 to 8 when executing the computer program.

Citation Information

Patent Citations

  • A video decoding test method and related equipment

    CN106231051A

  • Video stream coding and decoding task scheduling method

    CN114051143A