Coding and decoding test method and electronic equipment
By acquiring the hardware parameters and data of the computing power card, test tasks adapted to actual application scenarios are generated, encoding and decoding processes are executed, resource usage is analyzed, and a comprehensive test report reflecting the performance of the computing power card is generated. This solves the problem of the disconnect between the nominal capability and actual performance of the computing power card and improves the accuracy of encoding and decoding tests.
Patent Information
- Application Number
- CN202610019623.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-08
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2046-01-08
AI Technical Summary
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.
By acquiring the hardware parameters and test data of the computing card under test, converting the resolution and format according to the hardware characteristics to generate a test dataset, performing encoding and decoding processing and collecting resource usage data and encoding and decoding results, and finally generating a test report with the help of a preset algorithm.
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.
Smart Images

Figure CN121486561A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, and particularly relates to a coding and decoding test method and an electronic device. BACKGROUND
[0002] With the rapid development of artificial intelligence, the application of computing power cards in the field of image and video analysis is increasingly widespread. These scenarios all rely on the efficient processing capability of computing power cards on massive unstructured data. The core of the computing power card not only lies in its computing power performance, but also lies in its coding and decoding capability for image and video data. Coding and decoding is a key link in data preprocessing and postprocessing: original images or videos need to be converted into a data format recognizable by the system through decoding before model inference can be performed; the inference result needs to be converted into a format that can be stored or transmitted through encoding.
[0003] Computing power cards usually integrate hardware coding and decoding chips to improve processing efficiency and reduce processor load. The adaptability difference of different chip architectures and software ecosystems causes the nominal coding and decoding capability of the computing power card to be unable to truly reflect its actual performance. SUMMARY
[0004] Embodiments of the present application provide a coding and decoding test method and an electronic device to at least solve the problem in the related art that the nominal coding and decoding capability of the computing power card cannot truly reflect its actual performance.
[0005] The present application provides a coding and decoding test method, comprising:
[0006] obtaining hardware parameters of a to-be-tested computing power card and to-be-tested data;
[0007] performing resolution and format conversion processing on the to-be-tested data according to the hardware parameters to generate a test data set, the test data set comprising a plurality of test tasks;
[0008] performing coding and decoding processing on the plurality of test tasks to determine resource occupation data corresponding to the coding and decoding processing and a coding and decoding result;
[0009] generating a test report through a preset algorithm according to the resource occupation data and the coding and decoding result.
[0010] The present application also provides a coding and decoding test device, comprising:
[0011] an obtaining module configured to obtain hardware parameters of a to-be-tested computing power card and to-be-tested data;
[0012] a conversion module configured to perform resolution and format conversion processing on the to-be-tested data according to the hardware parameters to generate a test data set, the test data set comprising a plurality of test tasks;
[0013] The determining module is configured to determine resource occupation data and a coding and decoding result corresponding to the coding and decoding processing of the plurality of test tasks.
[0014] The generating module is configured to generate a test report by using a preset algorithm according to the resource occupation data and the coding and decoding result.
[0015] The present application also provides an electronic device, comprising a memory configured to store a computer program, and a processor configured to execute the computer program to implement the steps of the coding and decoding test method.
[0016] The present application also provides a computer readable storage medium, wherein the computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the coding and decoding test method.
[0017] The present application also provides a computer program product, comprising a computer program, and the computer program is executed by a processor to implement the steps of the coding and decoding test method.
[0018] According to the present application, the resolution and format of the to-be-tested data are converted according to the hardware characteristics to generate a plurality of test tasks suitable for actual application scenarios, and then the resource occupation data and the coding and decoding result are collected by performing coding and decoding processing on each test task, and finally a test report reflecting the actual performance of the hardware coding and decoding of the computing card in different scenarios is generated by using a preset algorithm, thereby providing a scientific selection basis for users, solving the contradiction between the hardware coding and decoding capability evaluation and the actual application, and improving the accuracy of the coding and decoding test. BRIEF DESCRIPTION OF DRAWINGS
[0019] The accompanying drawings, which are incorporated into and form a part of the specification, illustrate one embodiment consistent with the present application and, together with the description, serve to explain the principles of the application.
[0020] Figure 1 A structural schematic diagram of a computer system provided by an embodiment of the present application;
[0021] Figure 2 A flowchart of a coding and decoding test method provided by an embodiment of the present application;
[0022] Figure 3 A flowchart of another coding and decoding test method provided by an embodiment of the present application;
[0023] Figure 4 A flowchart of still another coding and decoding test method provided by an embodiment of the present application;
[0024] Figure 5A structural schematic diagram of a codec test device provided by an embodiment of the present application is shown in the figure.
[0025] Figure 6 A structural schematic diagram of an electronic device provided by the present application is shown in the figure.
[0026] The specific embodiments of the present application have been shown in the above figures, and will be described in more detail hereinafter. These figures and textual descriptions are not intended to limit the scope of the concept of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0027] The technical solutions in the embodiments of the present application will be described clearly and completely in the present application with reference to the figures in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without any creative work fall within the protection scope of the present application.
[0028] It should be noted that, in the description of the present application, the terms “comprise”, “contain” or any other variants thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. The terms “first”, “second” and the like in the present 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, the application of computing cards in the field of image and video analysis is increasingly widespread. These scenarios all rely on the efficient processing capacity of computing cards for massive unstructured data. The core of computing cards not only lies in their computing power, but also lies in their coding and decoding capabilities for image and video data. Coding and decoding are the key links of data preprocessing and post-processing: original images or videos need to be converted into a data format recognizable by the system through decoding before model inference can be performed; the inference results need to be converted into a format that can be stored or transmitted through encoding.
[0030] Computing cards usually integrate hardware coding and decoding chips to improve processing efficiency and reduce processor load. The adaptability of different chip architectures and software ecosystems differs, resulting in that the nominal coding and decoding capabilities of computing cards cannot truly reflect their actual performance.
[0031] To solve the above technical problems, the embodiment of the present application provides a kind of codec test method, by first obtaining the hardware parameters of the measured computing power card and the data to be measured, according to hardware characteristics, the resolution and format of the data to be measured are converted to generate a plurality of test tasks suitable for actual application scenarios, then each test task is executed coding and decoding processing and resource occupation data and coding and decoding result are collected, finally, by means of preset algorithm, the test report that can comprehensively reflect the actual performance of the hardware coding and decoding of computing power card in different scenarios is generated, so as to provide scientific selection basis for users, solve the contradiction between hardware coding and decoding capability evaluation and actual application, improve the accuracy of coding and decoding test.
[0032] In order to enable those skilled in the art to better understand the present application, the present application will be further described in detail below in conjunction with the drawings and specific embodiments.
[0033] Next, in conjunction with the specific application environment architecture or specific hardware architecture on which the execution of the codec test method depends, the specific application environment architecture or specific hardware architecture is exemplified.
[0034] Figure 1 A structural schematic diagram of a computer system is provided for the embodiment of the present application. Please see Figure 1 , Figure 1 The computer system can include at least a computing power card, a hard disk, a memory, a central processing unit and a plurality of network cards. The computing power card includes at least an encoder, a decoder, a computing power card processor and a video memory.
[0035] The central processing unit can be the operation and control core of the computer, responsible for executing instructions, scheduling tasks, and coordinating the work of various hardware components.
[0036] In scenarios involving image / video processing and computing, the central processing unit can receive external data from the network card, interact with the memory to temporarily store data, issue coding and decoding and inference tasks to the computing power card, and simultaneously process system general computing tasks.
[0037] The memory can be a temporary data storage medium used for data buffering between the central processing unit and the computing power card and the hard disk. Raw image / video data to be processed, intermediate results of coding and decoding, and temporary data for inference can be temporarily stored in the memory for quick access by the central processing unit and the computing power card, avoiding the speed bottleneck of frequent reading from the hard disk, and greatly improving data processing efficiency.
[0038] The hard disk can be a long-term storage device used for permanently storing data such as raw image / video files, system programs, and processed results. The hard disk has large storage capacity but slow read / write speed, and data needs to be transferred to the memory for use by the central processing unit and the computing power card.
[0039] The plurality of network cards can be interfaces of the computer and an external network for input and output of data. The plurality of network cards can support multi-link data transmission, improve data throughput, and meet parallel data access requirements in multiple scenarios.
[0040] The computing card can be a special hardware acceleration card that is optimized in architecture for image and video coding, model inference, and other tasks, undertakes high-density data processing and computing work of the core, and efficiently completes format conversion, feature extraction and analysis of images and videos through hardware coding and computing card processors, thereby greatly reducing the load of the central processing unit.
[0041] The encoder can encode the processed digital signal into a general format for storage or network transmission.
[0042] For example, the results after model inference and the original image data after decoding can be converted into a storable video file or a transmittable image stream after being processed by the encoder, thereby ensuring the universality and spreadability of the data.
[0043] The decoder can be used to decode image / video data in an original compressed format into a raw data format recognizable by the system.
[0044] For example, a compressed video stream in H.265 version transmitted from the network card can be converted into original image data that can be directly processed by the computing card processor after being decoded by the decoder.
[0045] The computing card processor can be used to perform model inference and complex parallel computing tasks.
[0046] The display memory can be a special high-speed memory of the computing card for storing all data in the computing card processing process, including original data to be decoded, decoded image data, model parameters, and intermediate results in inference.
[0047] Figure 2 A flowchart of a test method for encoding and decoding provided by an embodiment of the present application. The execution subject of the embodiment of the present application can be a central processing unit. The central processing unit can be realized by software or by a combination of software and hardware. Please refer to Figure 2 The method comprises the following steps:
[0048] S201, obtaining hardware parameters of a to-be-tested computing card and to-be-tested data.
[0049] The to-be-tested computing card can refer to a hardware acceleration device with encoding and decoding functions.
[0050] For example, the to-be-tested computing card includes a graphics processor, an AI acceleration card, a special video encoding card, and the like.
[0051] The hardware parameters can be parameters describing the hardware characteristics of the computing card.
[0052] The hardware parameters can include model, video memory capacity, supported codec format, maximum resolution, interface specification, etc.
[0053] The to-be-tested data can be original multimedia data for testing, including picture data, video data, and video stream data.
[0054] The video stream data can be obtained through a network external camera and a network card.
[0055] The hardware parameters of the to-be-tested graphics card can be collected through a preset tool, and the to-be-tested data can be obtained in a storage space.
[0056] S202, according to the hardware parameters, the resolution and format of the to-be-tested data are converted to generate a test data set.
[0057] The test data set includes multiple test tasks.
[0058] The test data set can be a set composed of multiple test tasks, each test task corresponds to a specific resolution and format codec requirement, and is adapted to the hardware parameters of the to-be-tested graphics card.
[0059] The test task can be a task corresponding to a single codec requirement in the test data set.
[0060] The resolution conversion can be to adjust the resolution of the to-be-tested data to the resolution supported by the graphics card.
[0061] The format conversion can convert the format of the to-be-tested data to the codec format supported by the graphics card.
[0062] The resolution can include 720p, 1080p, 4K, 8K, etc.
[0063] The picture format can include jpeg, png, bmp, avif, and apng, etc.
[0064] The video format can include mp4, mov, avi, wmv, mkv, H.264, and H.265, etc.
[0065] The to-be-tested data can be standardized converted according to the hardware parameters to ensure accurate matching of the test task and the graphics card capability.
[0066] According to the maximum resolution supported by the graphics card, a test resolution set can be selected, according to the codec format supported by the graphics card, a picture format set and a video format set can be selected, according to the test resolution set, the picture format set and the video format set, the to-be-tested data can be converted by a conversion tool to generate multiple test tasks, all test tasks are integrated into a test data set, and all resolutions and format combinations supported by the graphics card are ensured to be covered.
[0067] Each test task can be a combination of "resolution + format + codec type".
[0068] A fixed number of pictures or videos can be included in each test task.
[0069] Optionally, the resolution and format conversion processing of the to-be-tested data can be performed according to the hardware parameters to generate the test data set in the following manner: inputting the hardware parameters into a preset model to obtain test parameters; and performing resolution and format conversion processing on the to-be-tested data according to the test parameters to generate the test data set.
[0070] The preset model can be a trained algorithm model for mapping the hardware parameters of the algorithm card to the optimal test parameters, and automatically completing the conversion of the to-be-tested data based on the test parameters to finally generate a test data set with stronger adaptability.
[0071] S203, performing codec processing on the plurality of test tasks to determine resource occupation data corresponding to the codec processing and a codec result.
[0072] The resource occupation data can be used to describe the resource usage of the system and the algorithm card during the codec process.
[0073] The resource occupation data can include processor utilization, algorithm card load rate, memory occupation rate, video memory occupation rate, algorithm card interface bandwidth, etc.
[0074] The codec result can be the output data of the codec processing, including frame rate, total time consumption, whether to drop frames or error, etc.
[0075] The hardware codec can be called through a special codec interface of the algorithm card, and the test tasks in the test data set are executed in sequence to determine the resource occupation data corresponding to the codec processing and the codec result.
[0076] S204, generating a test report through a preset algorithm according to the resource occupation data and the codec result.
[0077] The preset algorithm can be used to analyze a rule set of the resource occupation data and the codec result, including algorithms for summarizing frame rate by resolution / format, determining hardware encoder independence, and evaluating resource occupation rationality.
[0078] The test report can include codec capability indicators, resource utilization efficiency, and abnormal conditions, etc., and is used to show the codec performance of the algorithm card.
[0079] The resource occupation data and the codec result can be analyzed by the preset algorithm in layers: calculating the codec capability indicators, determining the resource utilization efficiency, summarizing the abnormal conditions, and generating the test report.
[0080] The codec capability index can be a codec capability value at each resolution and each format.
[0081] The resource utilization efficiency can be a rationality of the hard encoder independence and resource occupation.
[0082] The summary exception can be a specific type of record efficiency substandard task, an exception index, and a number of occurrences, and the like.
[0083] The test report can be presented according to data types (pictures / videos) and task types (encoding / decoding).
[0084] The test report can further include codec capability values and rankings at each resolution, efficiency evaluation results, exception analysis, and optimization suggestions, and the like.
[0085] For example, the optimization suggestion is that the 8K encoding memory is insufficient, and it is suggested to upgrade to a 64GB memory power card.
[0086] The test method for the codec provided in this embodiment can obtain the hardware parameters of the to-be-tested power card and the to-be-tested data; perform resolution and format conversion processing on the to-be-tested data according to the hardware parameters to generate a test data set, the test data set including a plurality of test tasks; perform codec processing on the plurality of test tasks to determine resource occupation data corresponding to the codec processing and a codec result; and generate a test report through a preset algorithm according to the resource occupation data and the codec result. In this way, by combining the test data with the hardware parameters of the to-be-tested power card, comprehensively monitoring the resource occupation in the codec process, and analyzing the codec result, the codec capability and the resource utilization efficiency of the power card can be accurately determined, and the accuracy of the codec test is improved.
[0087] Next, the test method for the codec will be described in combination with the accompanying drawings. Figure 3 The specific process of performing the codec processing on the plurality of test tasks to determine the resource occupation data corresponding to the codec processing and the codec result will be explained.
[0088] Figure 3 Another flowchart of the test method for the codec provided in this embodiment is shown. Based on the above embodiment, refer to Figure 3 The method comprises the following steps.
[0089] S301, performing sorting processing on the plurality of test tasks to obtain a test sequence.
[0090] The sorting processing can refer to a process of formulating an execution order according to the resource requirements, types, formats, and the like of the test tasks.
[0091] The test sequence can be an ordered queue formed after the test tasks are sorted.
[0092] The plurality of test tasks can be sorted in ascending order of resource demand to obtain a test sequence.
[0093] The plurality of test tasks can be sorted according to the type of the task to obtain a test sequence.
[0094] The plurality of test tasks can be sorted according to the resource demand complexity, type relevance, and other dimensions of the test task. The sorting rules can be flexibly configured and are not limited herein.
[0095] S302, in the order of the test sequence, the plurality of test tasks are processed in turn to obtain the corresponding encoding and decoding results of the plurality of test tasks.
[0096] The encoding and decoding results can be 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 check results, format compatibility, and total task time consumption.
[0098] Sequential execution ensures that a single task exclusively occupies the core encoding and decoding resources of the computing card, avoiding performance superposition interference caused by multi-task parallelism, and accurately positioning the independent encoding and decoding capability of each task.
[0099] The hard encoding and decoding interface is called to start the task one by one according to the test sequence, ensuring that only one test task is executed at a time. For each test task, the encoding and decoding results during the effective test period are statistically calculated in real time.
[0100] The encoding and decoding results can include encoding and decoding frame rate, data integrity index, and total time consumption.
[0101] Optionally, for any one test task, the test task can be processed to obtain the corresponding encoding and decoding results of the test task by the following method: determining the task type and task parameters of the test task; according to the task type, the test task is scheduled to a target executor; when the target executor is an encoder, the test task is encoded according to the task parameters to obtain the corresponding encoding result of the test task; when the target executor is a decoder, the test task is decoded according to the task parameters to obtain the corresponding decoding result of the test task.
[0102] The task type includes encoding type and decoding type, the target executor includes encoder and decoder, and the encoding and decoding result includes encoding result or decoding result.
[0103] The task parameters can be used to describe the specific requirements of task processing, and are the basis for the operation of the executor.
[0104] The task parameters can include resolution and data format.
[0105] The task parameters corresponding to the encoding type can further include a target code rate, a quantization parameter, an encoding level, etc.
[0106] The task parameters corresponding to the decoding type can further include a fault tolerance level, an output format, etc.
[0107] The target executor can refer to a dedicated hardware module on the computing card.
[0108] S303, in the case where the multiple test tasks are executed for codec processing, monitoring the system components to obtain resource occupation data corresponding to the multiple test tasks respectively.
[0109] The system components can refer to hardware resource components involved in the codec process.
[0110] The system components can include the to-be-tested computing card, the host CPU, the system memory, etc.
[0111] The monitoring process can refer to a process of collecting the resource usage state of the system components in real time through a dedicated tool or interface during the execution of the codec task.
[0112] The resource occupation data can be system component usage data obtained through the monitoring process.
[0113] The resource occupation data is monitored synchronously with the codec task to ensure that the resource occupation data strictly corresponds to the task execution process and accurately reflects the consumption of system resources by a single task.
[0114] The monitoring tool can be triggered to start collecting data when each test task is started and to stop collecting data when the task is terminated, so as to ensure that the resource data corresponds to the test task one by one and to obtain resource occupation data corresponding to each test task.
[0115] Optionally, for any one test task, the system components can be monitored to obtain resource occupation data corresponding to the test task in the case where the test task is executed for codec processing in the following manner: when the test task is executed for codec processing, a process identifier of the test task is obtained; at least one of the computing card load rate, the GPU occupation rate, the memory occupation rate, and the processor utilization rate corresponding to the process identifier is obtained through multiple monitoring tools; it is determined whether the test task is executed successfully; if yes, the resource occupation data corresponding to the test task includes at least one of the computing card load rate, the GPU occupation rate, the memory occupation rate, and the processor utilization rate; if not, the test task is added to a test sequence.
[0116] The test task is added to the test sequence, and the execution times of the test task are updated.
[0117] The process identifier can be a unique digital 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 plurality of first tasks in the same first set include the same data type and the same task type in the plurality of test tasks.
[0129] In this way, the test tasks are classified according to core application scenarios, the performance of the computing card in the same scenario is focused, cross interference of different scenarios is avoided, and the analysis is more targeted.
[0130] All test tasks are traversed, and test tasks with the same data type and the same task type are classified into a first set, and each first set corresponds to an explicit application scenario.
[0131] For example, the test tasks include: 1, 720p, jpeg, picture decoding; 2, 1080p, h265, video encoding; 3, 4K, png, picture decoding; 3, 8K, mp4, video encoding.
[0132] After classification, two first sets are obtained: a first set corresponding to picture decoding and a first set corresponding to video encoding.
[0133] Next, taking any one of the plurality of first sets as an example:
[0134] S402, according to the resolution and format of the first task, the plurality of first tasks are classified and processed to obtain a plurality of second sets.
[0135] The same second set includes at least one second task with the same resolution and the same format in the plurality of first tasks.
[0136] In this way, within the first set, the specific technical parameters of the test task are further subdivided, the performance of the computing card under the specific resolution and the specific format is accurately positioned, and the minimum granularity analysis unit is provided for subsequent quantitative analysis.
[0137] All first tasks in any one set can be traversed, and first tasks with the same resolution and the same data format are classified into a second set.
[0138] S403, for any one second set, according to the resource occupation data corresponding to the at least one second task in the second set, the efficiency level of the second set is determined, and according to the encoding and decoding result corresponding to the at least one second task in the second set, the processing speed of the second set is determined.
[0139] The efficiency level can be used as a hierarchical index for measuring the rationality of resource utilization of the second set, and is determined based on resource data such as computing card load rate, and reflects the resource adaptability of the encoding and decoding process.
[0140] For any one second set, the efficiency level of the second set can be determined based on the resource occupation data of all second tasks in the second set according to a preset rule, and the processing speed of the second set can be determined based on the encoding and decoding results of all second tasks in the second set.
[0141] Optionally, the resource occupation data includes at least one of corresponding GPU load rate, video memory occupation rate, memory occupation rate, and processor utilization rate, and the efficiency level of the second set can be determined according to the resource occupation data of at least one second task in the second set in the following manner: the execution object information corresponding to the at least one second task is determined according to the GPU load rate and the processor utilization rate corresponding to the at least one second task; the resource occupation information corresponding to the at least one second task is determined according to the video memory occupation rate and the memory occupation rate corresponding to the at least one second task; the efficiency level corresponding to the at least one second task is determined according to the execution object information and the resource occupation information corresponding to the at least one second task; and the efficiency level of the second set is determined according to the efficiency level corresponding to the at least one second task.
[0142] Wherein, it is judged whether the second task satisfies the condition that the GPU load rate is greater than a first threshold value and the processor utilization rate is less than a second threshold value; if yes, the execution object information corresponding to the second task is determined as a GPU, and if not, the execution object information corresponding to the second task is determined as a GPU and a processor.
[0143] It is judged whether the second task satisfies the condition that the video memory occupation rate is less than a third threshold value and the memory occupation rate is less than a fourth threshold value; if yes, the resource occupation information is determined as reasonable resource occupation, and if not, the resource occupation information is determined as abnormal resource occupation.
[0144] Optionally, the efficiency level can be represented by Table 1:
[0145] Table 1
[0146]
[0147] S404, according to the efficiency level and the processing speed corresponding to the plurality of second sets, determine the analysis result corresponding to the first set.
[0148] A mapping relationship can be generated according to the plurality of second sets, and the efficiency level and the processing speed corresponding to the plurality of second sets, and the mapping relationship can include the mapping between resolution, format, efficiency, and speed. According to the mapping relationship, the analysis result corresponding to the first set is determined.
[0149] For example, in the picture decoding scenario, when the resolution is increased from 720p to 8K, the processing speed is decreased from 81fps to 25fps, and the attenuation is 69%.
[0150] The analysis result can be picture decoding with a resolution of 4K or above, a memory occupancy rate close to 90%, and an efficiency level reduced from the first level to the second level.
[0151] For example, in the first set corresponding to picture decoding, the analysis result can be represented by the following formula:
[0152] D p r =Σfps r i
[0153] Wherein, D p r may represent the decoding capability of picture p at r resolution, p can represent a picture, fps r i may represent the processing speed of i data format at r resolution, r can represent resolution, r∈{720p, 1080p, 4K, 8K}, i represents data format, i∈{jpeg, png, bmp, avif, apng}.
[0154] Video decoding, picture encoding, and video encoding are similar to the above formula, which is not limited here.
[0155] Optionally, the analysis result corresponding to the first set can be determined according to the efficiency level and processing speed of the plurality of second sets respectively corresponding to the plurality of second sets in the following manner: determining the target resolution and target format corresponding to the plurality of second sets respectively; inputting the target resolution, target format, efficiency level and processing speed into the analysis model to determine the analysis result corresponding to the first set.
[0156] Wherein, the analysis model is a preset algorithm module for integrating, comparing and regularity refining the input multi-dimensional data, and finally outputting the structured analysis conclusion of the first set.
[0157] S405, according to the analysis result corresponding to the plurality of first sets respectively, generate a test report.
[0158] In this way, the analysis results of all first sets are systematically presented to form the final results facing users, which have professional and readable properties, and provide direct basis for power card selection and optimization.
[0159] The embodiment provides a kind of codec test method, by the data type and task type of test task, multiple test tasks are classified and handled, obtain multiple first set, same first set includes in multiple test tasks same data type and same task type multiple first task, for any one first set, according to the resolution and format of first task, multiple first tasks are classified and handled, obtain multiple second set, same second set includes in multiple first tasks same resolution and same format at least one second task, for any one second set, according to the resource occupation data corresponding to at least one second task in second set, the efficiency grade of second set is determined, according to the codec result corresponding to at least one second task in second set, the processing speed of second set is determined, according to the efficiency grade and processing speed corresponding to multiple second set, the analysis result corresponding to first set is determined, according to the analysis result corresponding to multiple first set, test report is generated. In this way, through the hierarchical classification of data type and task type, resolution and format, scattered test data is systematically integrated, the coding and decoding performance and resource efficiency characteristics of power card under different scenes and technical conditions are accurately mined, to generate comprehensive, reliable test report provides structured analysis basis, effectively support the quantitative evaluation and optimization decision of the coding and decoding capability of power card, improve the accuracy of coding and decoding test.
[0160] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiments can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases, the former is a better embodiment.
[0161] Figure 5 The structure diagram of a codec test device provided by the embodiment of the application is shown. Please refer to Figure 5 The codec 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 configured to acquire the hardware parameters of the power card to be tested and the to-be-tested data.
[0163] The conversion module 502 is configured to perform resolution and format conversion processing on the to-be-tested data according to the hardware parameters, to generate a test data set, wherein the test data set includes multiple test tasks.
[0164] The determination module 503 is configured to perform codec processing on the multiple test tasks, to determine resource occupation data and codec results corresponding to the codec processing.
[0165] The generation module 504 is configured to generate a test report by using a preset algorithm according to the resource occupation data and the codec results.
[0166] In a possible implementation, for any one test task, the determining module 503 is specifically configured to:
[0167] determine a task type and a task parameter of the test task, the task type including an encoding type and a decoding type;
[0168] schedule the test task to a target executor according to the task type, the target executor including an encoder and a decoder;
[0169] when the target executor is the encoder, perform encoding processing on the test task according to the task parameter, to obtain an encoding result corresponding to the test task;
[0170] when the target executor is the decoder, perform decoding processing on the test task according to the task parameter, to obtain a decoding result corresponding to the test task;
[0171] wherein, the encoding and decoding result includes the encoding result or the decoding result.
[0172] In a possible implementation, for any one test task, the determining module 503 is specifically configured to:
[0173] when the test task is executed for encoding and decoding processing, obtain a process identifier of the test task;
[0174] obtain at least one of a GPU load rate, a GPU memory occupancy rate, a memory occupancy rate, and a processor utilization rate corresponding to the process identifier through a plurality of monitoring tools;
[0175] determine whether the test task is executed successfully;
[0176] if yes, the resource occupation data corresponding to the test task includes at least one of the GPU load rate, the GPU memory occupancy rate, the memory occupancy rate, and the processor utilization rate;
[0177] if no, add the test task to a test sequence.
[0178] In a possible implementation, the generating module 504 is specifically configured to:
[0179] perform classification processing on the plurality of test tasks according to a data type and a task type of the test task, to obtain a plurality of first sets, a plurality of first tasks of the same data type and the same task type in the plurality of test tasks being included in a same first set;
[0180] for any one first set, perform analysis processing on resource occupation data and encoding and decoding results respectively corresponding to the plurality of first tasks, to obtain an analysis result corresponding to the first set;
[0181] generate a test report according to the analysis results respectively corresponding to the plurality of first sets.
[0182] In a possible implementation, the generating module 504 is specifically configured to:
[0183] The plurality of first tasks are classified according to resolutions and formats of the first tasks, to obtain a plurality of second sets, and each second set includes at least one second task with the same resolution and the same format in the plurality of first tasks;
[0184] For any one second set, an efficiency level of the second set is determined according to resource occupation data corresponding to the at least one second task in the second set, and a processing speed of the second set is determined according to coding and decoding results corresponding to the at least one second task in the second set;
[0185] An analysis result corresponding to the first set is determined according to efficiency levels and processing speeds corresponding to the plurality of second sets.
[0186] In a possible implementation, the resource occupation data includes at least one of a load rate of a computing card, a memory occupation rate, a memory occupation rate, and a processor utilization rate, and the generating module 504 is specifically configured to:
[0187] Execution object information corresponding to the at least one second task is determined according to the load rate of the computing card and the processor utilization rate corresponding to the at least one second task;
[0188] Resource occupation information corresponding to the at least one second task is determined according to the memory occupation rate and the memory occupation rate corresponding to the at least one second task;
[0189] Efficiency levels corresponding to the at least one second task are determined according to the execution object information and the resource occupation information corresponding to the at least one second task;
[0190] The efficiency level of the second set is determined according to the efficiency levels corresponding to the at least one second task.
[0191] In a possible implementation, the generating module 504 is specifically configured to:
[0192] Target resolutions and target formats corresponding to the plurality of second sets are determined;
[0193] The target resolutions, the target formats, the efficiency levels, and the processing speeds are input into an analysis model, to determine the analysis result corresponding to the first set.
[0194] In a possible implementation, the converting module 502 is specifically configured to:
[0195] The hardware parameters are input into a preset model, to obtain test parameters;
[0196] According to the test parameters, the resolution and format of the to-be-tested data are converted to generate a test data set.
[0197] The features of the embodiments of the test device for coding and decoding can be referred to the related descriptions of the embodiments of the test method for coding and decoding, which will not be repeated here.
[0198] Figure 6 The structural schematic diagram of the electronic device is provided in the present application. As shown in the figure, the electronic device 60 provided in the 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, the memory 602 and the communication component 603 are connected through a bus. Figure 6
[0199] In the specific implementation process, the at least one processor 601 executes the computer execution instructions stored in the memory 602, so that the at least one processor 601 executes the above-mentioned test method embodiments for coding and decoding.
[0200] The specific implementation process of the processor 601 can be referred to the above-mentioned method embodiments, which has similar implementation principles and technical effects, and will not be repeated here in the embodiment.
[0201] In the above-mentioned embodiments, it should be understood that the processor can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC) and the like. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor and the like. The steps of the method disclosed in the application can be directly embodied as the execution of the hardware processor, or the execution of the combination of the hardware and software modules in the processor.
[0202] The memory can include a random access memory (RAM), and can also include a non-volatile memory (NVM), for example, at least one disk memory.
[0203] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application does not limit to only one bus or one type of bus.
[0204] Embodiments of the present application also provide a computer readable storage medium, which stores a computer program, wherein the computer program is configured to execute the steps in any of the above-mentioned encoding and decoding test method embodiments when running.
[0205] In an example embodiment, the above-mentioned computer readable storage medium can include, but is not limited to, a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store computer programs.
[0206] Embodiments of the present application also provide a computer program product, which includes a computer program, and the computer program is executed by a processor to implement the steps in any of the above-mentioned encoding and decoding test method embodiments.
[0207] Embodiments of the present application also provide another computer program product, which includes a non-volatile computer readable storage medium, and the non-volatile computer readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in any of the above-mentioned encoding and decoding test method embodiments.
[0208] The skilled person can further realize that the units and algorithm steps of the examples described in conjunction with the embodiments disclosed herein can be realized in electronic hardware, computer software or a combination of both. In order to clearly illustrate the interchangeability of hardware and software, the components and steps of the examples have been described in the above description in a general manner. Whether the functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. The skilled person can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0209] The above describes in detail the test method for the coding and decoding provided by the present application. The principles and implementation manners of the present application are described by using specific examples, and the above description of the examples is only used to help understand the method of the present application and the core idea thereof. It should be noted that, for those skilled in the art, some improvements and modifications can be made to the present application without departing from the principles of the present application, and these improvements and modifications also fall within the protection scope of the claims of the present 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 encoded and decoded to determine the resource consumption data and encoding / decoding results corresponding to the encoding / decoding process. A test report is generated based on the resource usage data and the encoding / decoding results using a preset algorithm.
2. The method according to claim 1, characterized in that, The multiple test tasks are encoded and decoded to determine the resource consumption data and encoding / decoding results corresponding to the encoding / decoding process, 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 to obtain the encoding and decoding results corresponding to the multiple test tasks respectively; While the multiple test tasks are being encoded and decoded, the system components are monitored to obtain resource usage data corresponding to each of the multiple test tasks.
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 any one of claims 1-4, characterized in that, Based on the resource usage data and the encoding / decoding results, a test report is generated using a preset algorithm, including: Based on the data type and task type of the test tasks, the multiple test tasks are classified to obtain multiple first sets. Each first set includes multiple first tasks with the same data type and task type in multiple test tasks. For any first set, the resource usage data and encoding / decoding results corresponding to the plurality of first tasks are analyzed and processed to obtain the analysis results corresponding to the first set; A test report is generated based on the analysis results corresponding to the multiple first sets.
6. The method according to claim 5, 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 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. The analysis results corresponding to the first set are determined based on the efficiency level and processing speed corresponding to the multiple second sets.
7. The method according to claim 6, 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.
8. The method according to claim 6, 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.
9. 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.
10. 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 9 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
Video transcoding card performance test method and device, electronic equipment and storage medium
CN115767095A
Heterogeneous computing system, computing power node selection method and device thereof, equipment and medium
CN116954873A
Generative optimization models for machine learning
US20250292092A1