AI SOC Modular Unit Testing Method and Device for Set-Top Boxes
By employing a modular testing method that combines FPGA hardware simulation and software simulation, the shortcomings in performance evaluation under inter-module interactions and boundary conditions in AI SOC testing are addressed. This enables accurate evaluation of AI SOC performance and anomaly detection, thereby improving testing efficiency and accuracy.
Patent Information
- Application Number
- CN202411875509.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-11-14
- Estimated Expiration
- 2044-12-19
AI Technical Summary
Traditional testing methods struggle to comprehensively cover all functional modules of an AI SOC, especially in terms of performance evaluation under inter-module interactions and boundary conditions. Furthermore, the performance differences of AI SOCs across different batches or usage scenarios affect the comparability and reliability of test results.
A modular testing environment is constructed by combining FPGA hardware simulation and software simulation to generate parallel test cases, compensate for interference between modules in real time, and perform multi-dimensional clustering analysis and performance boundary identification through multi-scale feature extraction and cross-batch alignment technology to dynamically optimize the testing strategy.
It improves the authenticity, comprehensiveness and accuracy of AI SOC testing, solves the comparability problem of performance data from different batches, and enhances the reliability and efficiency of test results.
Smart Images

Figure CN119342257B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of SOC modular unit testing technology, and in particular to a method and apparatus for modular unit testing of AI SOC in a set-top box. Background Technology
[0002] With the rapid development of artificial intelligence technology, AI SOCs are increasingly being used in smart home devices such as set-top boxes. These AI SOCs typically integrate multiple functional modules, including video processing, audio processing, and AI inference, significantly improving the intelligence level of set-top boxes and the user experience. However, the complexity of AI SOCs also presents significant challenges to their testing. Traditional testing methods often struggle to comprehensively cover all functional modules of an AI SOC, particularly in terms of inter-module interaction and performance evaluation under boundary conditions.
[0003] Furthermore, due to variations in production batches and usage environments, the performance of AI SOCs from different batches or in different application scenarios may differ significantly. This variability affects the comparability and reliability of test results, making it difficult to accurately assess the true performance and potential problems of AI SOCs. Simultaneously, as AI SOC functions are continuously iterated and upgraded, testing strategies also need to be adjusted and optimized in a timely manner to adapt to new functionalities and performance requirements. Summary of the Invention
[0004] This invention provides a modular unit testing method and apparatus for AI SOCs in set-top boxes. This invention can automatically construct a test platform simulating a real-world usage environment, generate test cases covering various scenarios, achieve parallel testing and real-time interference compensation, and perform multi-dimensional analysis and cross-batch alignment of test data. Furthermore, it possesses adaptive optimization capabilities, dynamically adjusting test strategies based on test results to continuously improve testing efficiency and accuracy.
[0005] In a first aspect, the present invention provides a modular unit testing method for an AI SOC of a set-top box, the method comprising:
[0006] Based on the preset first test strategy, the set-top box AI SOC module is functionally divided, and a modular test environment is constructed.
[0007] Based on the modular testing environment, historical test data is analyzed to generate a test case set.
[0008] The test case set is input into the multi-test controller to perform parallel testing and real-time interference compensation, and to obtain the raw performance data of each module of AISOC.
[0009] Multi-scale feature extraction and cross-batch alignment are performed on the raw performance data to obtain a standardized performance index set;
[0010] Multidimensional clustering analysis and neighbor-based boundary identification are performed on the standardized performance index set to obtain comprehensive performance evaluation results;
[0011] Based on the comprehensive performance evaluation results, the first testing strategy is dynamically optimized to output a second testing strategy.
[0012] Secondly, the present invention provides a modular unit testing device for an AI SOC of a set-top box, the AI SOC modular unit testing device for the set-top box comprising:
[0013] The functional partitioning module is used to partition the set-top box AI SOC module based on a preset first test strategy and build a modular test environment.
[0014] The analysis module is used to analyze historical test data based on the modular testing environment and generate test case sets;
[0015] The execution module is used to input the test case set into the multi-test controller, perform parallel testing and real-time interference compensation, and obtain the raw performance data of each module of the AI SOC.
[0016] The extraction module is used to perform multi-scale feature extraction and cross-batch alignment on the original performance data to obtain a standardized performance index set;
[0017] The identification module is used to perform multidimensional clustering analysis and neighbor-based boundary identification on the standardized performance index set to obtain a comprehensive performance evaluation result.
[0018] The output module is used to dynamically optimize the first test strategy based on the comprehensive performance evaluation results and output the second test strategy.
[0019] A third aspect of the present invention provides an AI SOC modular unit test device for a set-top box, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor invokes the instructions in the memory to cause the AI SOC modular unit test device for the set-top box to execute the above-described AI SOC modular unit test method for the set-top box.
[0020] A fourth aspect of the present invention provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the above-described AI SOC modular unit test method for a set-top box.
[0021] The technical solution provided by this invention accurately simulates the various functional modules of an AI SOC and its real-world usage environment through a combination of FPGA hardware simulation and software simulation, improving the realism and comprehensiveness of the test. Based on historical test data analysis, test cases are dynamically generated and optimized, improving test coverage and relevance. Multiple test controllers are used to execute test tasks in parallel and compensate for inter-module interference in real time, improving test efficiency and accuracy. Multi-scale feature extraction and cross-batch alignment techniques solve the comparability problem of AI SOC performance data from different batches, enhancing the reliability of test results. Multi-dimensional clustering analysis and a neighbor-based boundary degree-based performance boundary identification method are used to achieve accurate evaluation and anomaly detection of AI SOC performance. Based on the comprehensive performance evaluation results, reinforcement learning and other algorithms are used to dynamically optimize the test strategy, improving test efficiency and accuracy.
[0022] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention are realized and obtained in accordance with the structures particularly pointed out in the description, claims and drawings.
[0023] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0024] Figure 1 This is a schematic diagram of an embodiment of the AI SOC modular unit testing method for a set-top box according to the present invention;
[0025] Figure 2 This is a schematic diagram of an embodiment of the AI SOC modular unit testing device for a set-top box according to the present invention;
[0026] Figure 3 This is a schematic diagram of an embodiment of the AI SOC modular unit test equipment for a set-top box in this invention. Detailed Implementation
[0027] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0028] The terms "comprising" and "having," and any variations thereof, used in the embodiments of this invention are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the steps or units listed, but may optionally include other steps or units not listed, or may optionally include other steps or units inherent to these processes, methods, products, or devices.
[0029] To facilitate understanding of this embodiment, a modular unit testing method for an AI SOC of a set-top box, as disclosed in this embodiment of the invention, will first be described in detail. For example... Figure 1 As shown, this method includes the following steps:
[0030] 101. Based on the preset first test strategy, the set-top box AI SOC module is functionally divided, and a modular test environment is constructed;
[0031] It is understood that the execution subject of this invention can be an AI SOC modular unit testing device for a set-top box, or it can be a terminal or a server; the specific implementation is not limited here. This embodiment of the invention will be described using a server as an example.
[0032] Specifically, based on a pre-set first test strategy, the set-top box AI SOC is functionally analyzed and divided into a video processing unit, an audio processing unit, and an AI inference unit, resulting in a functional division. The video processing unit processes various video data from the set-top box, such as high-definition video playback and video decoding; the audio processing unit is involved in the acquisition, decoding, and synthesis of audio data; and the AI inference unit performs AI-related inference tasks, such as image recognition or voice control functions. Based on the above functional division results, a hardware simulator is built using an FPGA (Field-Programmable Gate Array). The FPGA is chosen for its flexible programmability, enabling it to simulate the core computing units, storage units, and communication interfaces in the AI SOC. By configuring the FPGA parameters, the hardware simulator can achieve system characteristics consistent with the actual AI SOC, including clock frequency, storage capacity, and interface bandwidth. This configuration ensures the realism and high fidelity of the test environment, so as to simulate the real performance of the AI SOC as closely as possible in subsequent tests. The clock frequency setting ensures that the hardware simulator matches the computing rhythm of the actual system, while the matching of storage capacity and interface bandwidth ensures the consistency of the system in data processing and transmission capabilities. A software simulation system was created based on a hardware simulator to simulate the main functional modules of a set-top box operating system, including video decoding, audio processing, and network communication. The software simulation system aims to supplement the hardware simulator's functionality, providing a more detailed simulation of test scenarios at the system software level. To make the testing more representative and comprehensive, the software simulation system was configured with scenarios, including the establishment of a test database encompassing high-definition video playback, online streaming media, and game operation. This test database covers typical application scenarios encountered by set-top boxes in actual use, especially in video playback, online streaming media services, and highly interactive game operation, providing a comprehensive and diverse testing environment to ensure that the performance of the AI SOC is fully verified in different scenarios. Based on the test database, test controllers were configured. A master-slave architecture was adopted to allocate test tasks and manage test resources, enabling the entire testing process to proceed in an orderly and efficient manner. The existence of multiple test controllers allows test tasks to be distributed across different modules, achieving parallelization and fine-grained management. The main test controller is responsible for formulating the overall test strategy and allocating resources, coordinating the management of various parts of the test environment, and specifying specific test strategies and resource allocation methods for each module's testing. Meanwhile, the secondary test controllers focus on executing specific module tests. By strictly following the instructions of the primary test controller, they complete specific test tasks for video processing, audio processing, and AI inference, ensuring the independence of each module's testing and the accuracy of the test results. Permissions are configured for each test controller, ensuring that the primary test controller has global management privileges, while the secondary test controllers are limited to executing tests for specific modules.By integrating hardware simulators, software simulation systems, and test controllers, a modular testing environment is constructed. This allows the components to work closely together in the unit testing of the AI SOC. The hardware simulator provides physical hardware functionality support for testing, the software simulation system provides a realistic software runtime environment, and the master-slave test controller is responsible for the specific execution and management of test tasks.
[0033] 102. Analyze historical test data based on a modular testing environment to generate test case sets;
[0034] Specifically, historical test data undergoes cleaning and standardization to obtain a standardized historical test dataset. Based on this standardized dataset, feature extraction and dimensionality reduction are performed to identify the feature datasets affecting AI SOC performance. Multi-dimensional analysis is then conducted on the feature datasets to reasonably classify the test scenarios. Test scenarios are divided into three categories: normal operation, boundary conditions, and abnormal situations, better covering all operational scenarios faced by the AI SOC. In normal operation scenarios, the purpose of testing is to verify the system's performance under normal conditions; boundary condition scenarios focus on the AI SOC's performance under extreme operating conditions, such as high load or low power consumption; and abnormal situation scenarios are used to verify the system's handling capabilities and robustness under unforeseen circumstances such as sudden failures and data anomalies. This scenario classification results in more hierarchical and targeted test case generation. Based on the test scenario classification results, test case generation rules are constructed. These rules define the triggering conditions and data ranges for each type of scenario, i.e., under what circumstances and how to generate corresponding test cases. For example, test cases for normal operation scenarios primarily use general input data, while test cases for boundary condition scenarios apply more extreme data inputs. By specifying the triggering conditions and data range in detail, a test case generation template is formed. This template can guide the construction of basic test cases and quickly adjust and generate adaptive test content under new testing requirements. The test case generation template is applied to new test data to dynamically generate a basic test case set adapted to the current AI SOC characteristics. The basic test case set generates test cases with specific objectives for different AISOC modules through a templated approach. The basic test case set is combined and mutated to generate complex test scenarios covering multi-module interactions, resulting in an extended test case set. Based on the extended test case set, test cases are deduplicated and merged to eliminate redundant and repetitive test content, resulting in a simplified test case set. The simplified test case set is prioritized and sorted according to the degree of impact and risk of the tests on AI SOC performance, resulting in a test case set with reasonable priority. 103. The test case set is input into a multi-test controller to execute parallel testing and real-time interference compensation, obtaining the raw performance data of each AISOC module.
[0035] Specifically, the test case set is decomposed into different test task groups to form a reasonable test task allocation scheme. Based on the test task allocation scheme, tasks are assigned to multiple test controllers, and test task groups are assigned to the corresponding test controllers, resulting in a task list for each test controller. Based on the task lists of the test controllers, each test controller is started in parallel. Through parallel start-up, each test controller can execute different test tasks simultaneously, obtaining the initial results of parallel testing. The initial results of parallel testing are monitored in real time to detect interference between different modules and obtain interference intensity data. Interference intensity data is key information describing the mutual influence between modules, helping to determine which modules have strong interference and thus require adjustment and compensation. Based on the interference intensity data, interference compensation parameters are calculated to compensate for interference in real time during the testing process. The purpose of real-time interference compensation is to reduce the mutual influence between modules and ensure that the test results of each module are close to its true performance. The compensation parameters are applied to the testing process to effectively compensate for existing interference, obtaining compensated test data. The compensated test data is collected and stored to record the performance indicators of each module of the AI SOC under different test scenarios, obtaining the first performance dataset. Based on the first performance dataset, a data integrity check is performed to verify the accuracy and completeness of the test data. Missing or outlier data points are marked and supplemented as necessary to obtain the second performance dataset. Data supplementation employs methods such as interpolation, estimation, or retesting to ensure that the final dataset comprehensively and accurately reflects the true performance of each module. A preliminary analysis of the second performance dataset is conducted, calculating various performance indicators to obtain raw performance data such as processing speed, resource utilization, and power consumption for each module of the AI SOC. By comparing and analyzing the performance data of different modules, it is determined whether the performance of each module in different scenarios meets the design requirements, and performance bottlenecks or optimization opportunities are identified within the system.
[0036] 104. Perform multi-scale feature extraction and cross-batch alignment on the raw performance data to obtain a standardized performance index set;
[0037] Specifically, seasonal trend decomposition is performed on the raw performance data, breaking down each performance index sequence into a trend term, a seasonal term, and a residual term. The trend term reflects long-term changes, capturing the overall changes in performance over time; the seasonal term reveals periodic fluctuations in the data, which are usually due to the influence of external periodic factors; and the residual term represents short-term fluctuations, including random changes not explained by the trend and periodicity. This decomposition yields a decomposed performance dataset. Based on this dataset, feature extraction is performed on each part. For the trend term, its slope and curvature are calculated to quantify the direction and magnitude of its changes, helping to capture long-term performance improvement or decline trends. For the seasonal term, period and amplitude are extracted to reflect the fluctuation patterns and amplitudes of AI SOC within specific time intervals. For the residual term, variance and kurtosis are calculated; variance measures the intensity of short-term fluctuations, while kurtosis characterizes the frequency of peaks and extreme values in the data distribution. Feature extraction results in a multi-scale feature set containing long-term, periodic, and short-term features. Frequency domain analysis is then performed on each time series in the multi-scale feature set. A discrete wavelet transform method is employed, using Daubechies wavelet basis functions to perform a five-level decomposition on each time series, extracting approximation coefficients and detail coefficients in different frequency domains. Through wavelet transform, the time series is decomposed into low-frequency, mid-frequency, and high-frequency components, yielding a frequency domain feature set. Low-frequency information typically contains overall trend characteristics, while high-frequency information reflects rapid changes in the short term. Frequency domain feature extraction allows data analysis to not only focus on temporal trends but also reveal the data's fluctuation characteristics from a frequency domain perspective. A multi-head attention network is constructed based on the frequency domain feature set to perform self-attention computation on features at different scales and in the frequency domain. The multi-head attention network focuses on different parts of the input features through a multi-head mechanism and calculates the attention weight matrix. Self-attention computation automatically learns which features are more important in a given scenario, improving the effectiveness of feature representation. By using the attention weight matrix to perform weighted summation of the features, a fused feature set is obtained, enabling effective information integration among features at multiple scales and in multiple frequency domains, enhancing the expressive power of the features. Kernel principal component analysis (KPCA) is performed on the fused feature set, using radial basis functions as the kernel functions. Dimensionality reduction is achieved by solving the eigenvalue problem, resulting in a dimensionality-reduced feature set. KPCA is an effective nonlinear dimensionality reduction method that captures the hidden nonlinear structures in the fused feature set, mapping high-dimensional data to a low-dimensional space while retaining the most representative features. This reduces data dimensionality and removes redundancy, making subsequent analysis and processing more efficient. Based on the dimensionality-reduced feature set, the multi-kernel maximum mean difference (MK-MMD) method is used, selecting linear, polynomial, and Gaussian kernels as basic kernel functions to calculate the distance matrix of feature distributions between different batches of AI SOCs, obtaining the batch difference matrix.The MK-MMD method, through a combination of multiple kernel functions, comprehensively measures the distributional differences of different batches of data across different feature spaces, providing necessary information for subsequent batch alignment and identifying potential differences between different batches of test data. Feature alignment of the batch difference matrix is performed using a domain-adversarial neural network method, simultaneously minimizing the feature distribution differences between the source and target domains and the classification error. Through adversarial training, features from different batches are mapped to a common feature space, minimizing the distributional differences between batches and achieving batch alignment. Based on the batch-aligned feature set, each feature is standardized, and the mean and standard deviation of each feature are calculated to obtain a standardized set of performance metrics. All features are transformed to the same scale to eliminate the influence of different feature units, making subsequent analysis and comparisons more fair and accurate.
[0038] 105. Perform multidimensional clustering analysis and neighbor-based boundary identification on the standardized performance index set to obtain comprehensive performance evaluation results;
[0039] Specifically, based on a standardized performance index set, a Gaussian Mixture Model (GMM) is used for multidimensional clustering analysis. The GMM is a probabilistic model suitable for capturing complex data distribution characteristics, achieving clustering by assigning data points to different Gaussian distributions. To optimize the GMM parameters, the Expectation-Maximization (EM) algorithm is employed. The EEM algorithm is an iterative optimization method that continuously adjusts the model parameters by alternately updating the expectation and maximization steps to better adapt to the data distribution, resulting in k performance clusters. Each cluster represents a class of data points with similar performance characteristics. Silhouette coefficients are calculated for the k performance clusters. The silhouette coefficient is an index used to evaluate clustering quality, combining intra-cluster similarity and inter-cluster differences; a higher value indicates a better clustering result. By calculating the silhouette coefficient for each cluster and selecting the cluster with the largest silhouette coefficient as the optimal clustering scheme, the performance clustering result is obtained. Based on the performance clustering result, the average distance between each data point and its k nearest neighbors is calculated. To measure the local density of data points, the average distance of each data point is compared with the average distance from its k nearest neighbors to their respective k nearest neighbors, calculating the Local Outlier Factor (LOF) for each data point. The LOF reflects the degree of anomalousness of a data point compared to its surrounding data points; a higher value indicates a stronger anomalousness within the local region. By calculating the LOF, outliers that are significantly different from the majority of data points are identified, representing the performance boundaries of the AI SOC. For the obtained LOFs, a threshold screening method is used to select data points with LOFs greater than a preset threshold as candidate points for the performance boundaries, resulting in a preliminary performance boundary point set. These candidate points are located outside each cluster, representing the limits or anomalies of the AI SOC performance. Based on the preliminary performance boundary point set, the neighbor boundary degree of each boundary point is calculated. The neighbor boundary degree refers to the proportion of other boundary points among the k nearest neighbors of a boundary point. By statistically analyzing the neighbor boundary degree of each boundary point, a neighbor boundary degree matrix is obtained. The neighbor boundary degree reflects the density of boundary points; a higher neighbor boundary degree indicates stronger boundary characteristics in the region where the boundary point is located, effectively distinguishing the strength of boundary point characteristics. Based on the neighbor boundary degree matrix, density clustering is used to aggregate nearby boundary points with similar neighbor boundary degrees into continuous boundary segments, thus obtaining the performance boundary profile. Density clustering is an effective clustering method suitable for handling noisy sets of boundary points. By aggregating boundary points, a clearer and more intuitive performance boundary profile is obtained. Based on the performance boundary profile and performance clustering results, the performance indicators of each performance cluster are comprehensively calculated. The mean, standard deviation, and boundary features of the performance indicators of each cluster are calculated to comprehensively evaluate the performance status of each cluster. The mean represents the centrality of the cluster, the standard deviation reflects the dispersion of data within the cluster, and the boundary features describe the limiting performance of the cluster.
[0040] 106. Based on the comprehensive performance evaluation results, dynamically optimize the first test strategy and output the second test strategy.
[0041] Specifically, the comprehensive performance evaluation results are decomposed, extracting performance metrics, clustering information, and boundary features of each module in the AI SOC to obtain a performance evaluation feature set. The feature information includes the performance and performance boundaries of each module in different scenarios, as well as the feature relationships obtained through clustering analysis. This allows the overall performance evaluation to be broken down into a more granular set of metrics, facilitating personalized test strategy design for each module. Based on the performance evaluation feature set, a decision tree model is constructed, using performance metrics as feature inputs and clustering information and boundary features as target variables. The model is then trained to obtain performance classification rules. Decision trees are easily interpretable and perform well in machine learning. By continuously partitioning the feature space, a tree structure is formed that can be used for classification and prediction. After training, each leaf node corresponds to a performance category. Thus, the decision tree model can generate specific classification results for each performance feature point, revealing the key factors affecting the performance of each module and their interactions. The performance classification rules are extracted, and the decision paths of the decision tree are transformed into IF-THEN form test rules, forming a preliminary optimization strategy set. IF-THEN rules have a clear logical structure, making them easy to understand and implement. For example, when the values of certain features exceed a specific threshold, system performance deteriorates. By transforming these conditions into IF-THEN rules, the testing strategy can more effectively detect these potential problems. The initial optimized strategy set consists of multiple specific test rules, each representing a specific test scenario and corresponding countermeasure. Based on the initial optimized strategy set, a reinforcement learning environment is designed, using the test strategy as the action space, performance metrics as the state space, and test results as the reward function to establish a reinforcement learning model. The main goal of the reinforcement learning model is to optimize the test strategy through continuous exploration and trial and error in a simulated environment, thereby improving test coverage and effectiveness. Reinforcement learning can adaptively adjust the test strategy to find the optimal solution, making the testing process more efficient and comprehensive. The test strategy as the action space means that different test strategies are selected and implemented in different scenarios, while the state space of the performance metrics reflects the performance of the AI SOC under different strategies. The test results as the reward function ensure that each strategy selection maximizes the effectiveness of the test. The reinforcement learning model is trained using the Deep Q-Network (DQN) algorithm. DQN is a method combining deep learning and reinforcement learning, using neural networks to approximate the Q-value function, enabling the model to handle complex and high-dimensional state spaces. During training, the test policy is iteratively optimized through multiple rounds to continuously improve the model's perception and decision-making ability regarding performance states, resulting in an optimized test policy set. Cross-validation is then performed on the optimized test policy set, and the generalization performance of each policy is evaluated using historical test data to obtain a policy scoring matrix.Cross-validation ensures the adaptability and reliability of the test strategy across different scenarios. By scoring the performance of each strategy, the optimal strategy is identified and underperforming strategies are eliminated. Based on the strategy scoring matrix, the test strategies are combined and optimized. New strategy combinations are generated through cross-validation and mutation operations to obtain the optimal test strategy combination. The cross-validation operation combines parts of two highly-rated test strategies to generate a superior new strategy, while the mutation operation randomly adjusts certain parts of the strategy to increase strategy diversity and help explore more optimization space. The optimal test strategy combination is integrated with the first test strategy, and the test case generation rules, resource allocation scheme, and execution order are adjusted accordingly to output the second test strategy.
[0042] In this embodiment of the invention, a combination of FPGA hardware simulation and software simulation is used to accurately simulate the various functional modules of the AI SOC and the real-world usage environment, improving the realism and comprehensiveness of the test. Based on historical test data analysis, test cases are dynamically generated and optimized, improving test coverage and relevance. Multiple test controllers are used to execute test tasks in parallel, and inter-module interference is compensated in real time, improving test efficiency and accuracy. Multi-scale feature extraction and cross-batch alignment techniques solve the comparability problem of AI SOC performance data from different batches, enhancing the reliability of test results. Multi-dimensional clustering analysis and a neighbor-based boundary degree-based performance boundary identification method are used to achieve accurate evaluation and anomaly detection of AI SOC performance. Based on the comprehensive performance evaluation results, reinforcement learning and other algorithms are used to dynamically optimize the test strategy, improving test efficiency and accuracy.
[0043] In one specific embodiment, the process of performing step 101 may specifically include the following steps:
[0044] Based on the preset first test strategy, the set-top box AI SOC is functionally analyzed and divided into video processing unit, audio processing unit and AI inference unit, and the functional division results are obtained.
[0045] Based on the functional partitioning results, a hardware simulator was built using FPGA to simulate the core computing unit, storage unit and communication interface of the AI SOC. The parameters of the hardware simulator were configured to be consistent with the actual AI SOC, including clock frequency, storage capacity and interface bandwidth.
[0046] Based on a hardware simulator, a software simulation system was created to simulate the video decoding, audio processing, and network communication functions of a set-top box operating system. The software simulation system was configured with scenarios, and a test database containing high-definition video playback, online streaming media, and game operation was established.
[0047] Based on the test database, multiple test controllers are set up, and a master-slave architecture is adopted to allocate test tasks and manage test resources. Permissions are configured for the test controllers, so that the master test controller is responsible for the global test strategy formulation and resource allocation, while the slave test controllers are responsible for the execution of specific module tests.
[0048] By integrating hardware simulators, software simulation systems, and test controllers, a modular test environment can be built.
[0049] Specifically, based on a pre-set first testing strategy, the set-top box AI SOC was functionally analyzed and divided into a video processing unit, an audio processing unit, and an AI inference unit, resulting in a specific functional division. The video processing unit decodes, renders, and displays the video signals received by the set-top box, including decoding high-definition video streams and synchronously displaying multiple frames. The audio processing unit is responsible for decoding, equalizing, and outputting audio data, enabling synchronized audio and video presentation. The AI inference unit handles machine learning tasks, such as speech recognition and image recognition, using neural network models to infer and classify the input. This division allows for more targeted testing, enabling independent testing and verification of each module to ensure the performance and stability of each module within its intended function. Based on the functional division results, a hardware simulator was built using an FPGA (Field-Programmable Gate Array) to simulate the core computing units, storage units, and communication interfaces of the AI SOC. During the construction of the hardware simulator, the flexibility and programmability of the FPGA were fully utilized, allowing it to realistically simulate various functional units of the AI SOC. The hardware simulator is designed to match the parameters of the actual AI SoC. The FPGA is configured with corresponding parameters to ensure consistency with the actual AI SoC in terms of clock frequency, memory capacity, and interface bandwidth. For example, assuming the clock frequency of AISOC is... Storage capacity is The interface bandwidth is These parameters are configured on the FPGA to ensure that the hardware simulator matches the real environment in terms of timing and data throughput, guaranteeing the accuracy and validity of the test results. Clock frequency determines the operating speed of the hardware simulator, while storage capacity and interface bandwidth directly affect data processing and transmission capabilities. A software simulation system is created based on the hardware simulator to simulate the video decoding, audio processing, and network communication functional modules in the set-top box operating system. The software simulation system is created to provide a more realistic testing environment at the software level, allowing the coordination and interaction of different functional modules to be fully verified in the simulation environment. To cover more real-world application scenarios, the software simulation system is configured with scenarios, establishing a test database that includes high-definition video playback, online streaming media, and game operation. The high-definition video playback scenario is used to test the decoding and frame synchronization capabilities of the video processing unit; the online streaming media scenario is used to test the synchronization performance of video and audio when network bandwidth changes; and the game operation scenario tests the inference speed and response capability of the AI inference unit. For example, for high-definition video playback, assuming the video frame rate is... Frames per second, the size of each frame is For bytes, the bandwidth of the hardware simulator needs to be guaranteed. To meet transmission requirements and ensure smooth video playback, multiple test controllers are configured based on a test database, employing a master-slave architecture to allocate and manage test tasks. In this architecture, the master test controller is responsible for formulating the global test strategy, allocating resources, and managing test tasks, while the slave test controllers are responsible for executing tests on specific modules. Permissions are configured for the test controllers, ensuring the master test controller has global management and coordination permissions, while the slave test controllers can independently complete the testing tasks of specific modules. This ensures centralized management of the test process while maintaining sufficient modular flexibility. The master-slave architecture fully utilizes computing resources, executing tests of different modules in parallel, thereby shortening the overall test execution time. For example, suppose the system has… Each test controller is a slave test controller, and the master test controller divides the total set of test tasks into... The test controller is assigned to each test controller to achieve a parallelized test process. The hardware simulator, software simulation system, and test controller are integrated to build a modular test environment. The purpose of system integration is to enable the various modules to work collaboratively in a unified test environment to jointly complete the testing and performance evaluation of the AI SOC. The hardware simulator provides low-level hardware support, ensuring that data flow is correctly processed at the hardware level, while the software simulation system provides the software interface and application environment for the hardware simulator, enabling comprehensive testing of the performance of different functional modules in real-world application scenarios. In this integrated environment, the test controller interacts with the hardware simulator and software simulation system to execute various test tasks, collect performance data from each module, and analyze and evaluate the performance and stability of the functional modules based on the test results.
[0050] In one specific embodiment, the process of performing step 102 may specifically include the following steps:
[0051] Historical test data is cleaned and standardized to obtain a standardized historical test dataset. Based on the standardized historical test dataset, feature extraction and dimensionality reduction are performed to identify the feature datasets that affect the performance of AI SOC.
[0052] Multi-dimensional analysis of the feature dataset was performed, and the test scenarios were divided into three categories: normal operation, boundary conditions, and abnormal situations, resulting in test scenario classification results.
[0053] Based on the test scenario classification results, test case generation rules are constructed, including the trigger conditions and data range of various scenarios, to obtain test case generation templates;
[0054] The test case generation template is applied to new test data to dynamically generate a basic test case set that adapts to the characteristics of the current AI SOC. The basic test case set is then combined and mutated to generate complex test scenarios that cover the interaction of multiple modules, resulting in an extended test case set.
[0055] Based on the extended test case set, test cases are deduplicated and merged to eliminate redundant and duplicate test content, resulting in a simplified test case set. The simplified test case set is then prioritized to obtain the final test case set.
[0056] Specifically, historical test data undergoes data cleaning and standardization to obtain a standardized historical test dataset. The purpose of data cleaning is to remove noise, missing values, and outliers from the historical test data, ensuring the accuracy and completeness of the data. During this process, interpolation or mean imputation methods are used to handle missing values. For example, assuming a test metric value in the dataset is missing, denoted as... The mean of its neighboring data is calculated using the average fill method. Then As The values are used to fill in the data, thus ensuring data continuity and consistency. After data cleaning, the data is standardized to eliminate biases caused by different units of measurement between different test indicators, ensuring that all features are within the same range. The mean is subtracted from each feature and then divided by the standard deviation. Assuming a certain test feature is... Its standardized value is Then we have the formula:
[0057] ;
[0058] in, This represents the original test feature value. The mean of this feature. The standard deviation of this feature is given. Through standardization, the data for all features are adjusted to the same scale. Based on the obtained normalized historical test dataset, feature extraction and dimensionality reduction are performed to identify the feature datasets affecting AI SOC performance. During feature extraction, methods such as principal component analysis are used to reduce the dimensionality of high-dimensional data, finding the most representative features while eliminating redundant information. For example, suppose the original feature set contains multiple features... Principal component analysis was used to reduce the dimensionality, resulting in a low-dimensional feature set. ,in The dimensionality-reduced features better reflect the main performance factors of AISOC, reducing computational complexity while improving the model's generalization ability. Multi-dimensional analysis of the feature dataset categorizes test scenarios into three types: normal operation, boundary conditions, and abnormal situations, resulting in a classification of test scenarios. Normal operation scenarios refer to the performance of the AI SOC under standard operating conditions, such as high-definition video decoding capabilities in a stable network and normal temperature environment. Boundary conditions refer to the performance of the AI SOC under extreme environments, such as performance in high-load or low-power modes; this type of test is used to evaluate the system's extreme tolerance. Abnormal situations involve various uncommon or unexpected circumstances, such as network interruptions or exceeding temperature limits. Scenario classification helps to comprehensively cover different operating states, ensuring that tests can effectively verify the performance of the AI SOC under various possible conditions. Based on the classification results of the test scenarios, test case generation rules are constructed, including the triggering conditions and data ranges for each type of scenario, resulting in test case generation templates. The formulation of test case generation rules ensures that the tests under each scenario are targeted and repeatable. For example, for boundary condition scenarios, the system's input data is adjusted to extreme values; by setting input test scenarios, a set of test case templates suitable for different test scenarios is generated. Test case generation templates are applied to new test data to dynamically generate a basic test case set adapted to the current AISOC features. To expand the coverage and depth of testing, the basic test case set is combined and mutated to generate complex test scenarios covering multi-module interactions, resulting in an extended test case set. For example, test cases for the video processing unit and the AI inference unit are combined to simulate the collaborative work of video analysis and processing in edge computing scenarios, or certain input data is randomly mutated to generate unexpected inputs to test the system's performance when faced with abnormal inputs. Based on the extended test case set, test cases are deduplicated and merged to eliminate redundant and repetitive test content, resulting in a streamlined test case set. The streamlined test case set is prioritized, and based on the impact and risk of each test scenario on system performance, the test cases are sorted by priority to obtain the final test case set.
[0059] In one specific embodiment, the process of performing step 103 may specifically include the following steps:
[0060] The test case set is decomposed into different test task groups to obtain a test task allocation scheme. Based on the test task allocation scheme, tasks are allocated to multiple test controllers, and the test task groups are assigned to the corresponding test controllers to obtain a test controller task list.
[0061] According to the test controller task list, each test controller is started in parallel, and multiple test tasks are executed simultaneously to obtain the initial results of the parallel test. The initial results of the parallel test are monitored in real time to detect the interference between modules and obtain the interference intensity data.
[0062] Based on the interference intensity data, interference compensation parameters are calculated to compensate for the interference during the test process in real time, and the compensated test data is obtained.
[0063] The compensated test data is collected and stored, and the performance indicators of each module of the AI SOC under different test scenarios are recorded to obtain the first performance dataset.
[0064] Based on the first performance dataset, a data integrity check is performed, and missing or abnormal data points are marked and supplemented to obtain the second performance dataset.
[0065] A preliminary analysis of the second performance dataset was conducted to calculate the processing speed, resource utilization, and power consumption of each module in the AI SOC, thereby obtaining the raw performance data of each module in the AI SOC.
[0066] Specifically, the test case set is decomposed into tasks, dividing the test cases into different test task groups to obtain a reasonable test task allocation scheme. The test case set is then rationally allocated to different test controllers to achieve parallel testing and improve testing efficiency. By analyzing the correlations and dependencies between test cases, the test case set is split into independent test task groups, ensuring that tasks within each group are executed independently. For example, suppose the test case set... Includes multiple test cases Divide it into ,in These test task groups execute independently of each other, thus allowing for parallel execution. Based on a task allocation scheme, tasks are assigned to multiple test controllers, distributing each test task group to a corresponding test controller, forming a test controller task list. Assume there are... A test controller, denoted as... Each test controller Assigned one or more test task groups The test controller task list is then represented as follows: This ensures that each test controller can independently complete its assigned test tasks. Reasonable task allocation ensures load balancing during testing, preventing some controllers from being overloaded or idle, thereby improving overall testing efficiency. Based on the test controller task list, each test controller is started in parallel, executing multiple test tasks simultaneously to obtain initial results of parallel testing. The advantage of parallel testing is that it can fully utilize hardware resources, shorten testing time, and cover more test scenarios simultaneously. During the simultaneous execution of test tasks by multiple test controllers, mutual interference can occur between modules, affecting the accuracy of test results. Therefore, the initial results of parallel testing are monitored in real time to detect interference between modules and obtain interference intensity data. Assume the output signal of a certain module is... After being disturbed during parallel testing, it becomes The interference intensity is then expressed by calculating the signal difference as follows:
[0067] ;
[0068] in, For interference intensity, The total test time. and These are the original signal and the signal after interference, respectively. By calculating the interference intensity, the degree of interference between modules is assessed, and corresponding compensation measures are taken. Based on the obtained interference intensity data, interference compensation parameters are calculated to compensate for interference during the test process in real time, obtaining compensated test data. The interfered data is restored to a state as close to reality as possible. Assume the interference compensation parameters are... The compensated signal Represented as:
[0069] ;
[0070] in, For the compensated signal, The compensation coefficient is determined based on the interference intensity and system characteristics. By compensating the test data, the impact of inter-module interference on the test results is minimized, improving the accuracy and reliability of the test data. The compensated test data is collected and stored, recording the performance metrics of each module of the AI SOC under different test scenarios, resulting in the first performance dataset. For example, in the high-definition video playback test scenario, metrics such as frame rate, frame drop rate, and decoding latency of the video processing module are recorded, while in the AI inference module test, metrics such as inference time and accuracy are recorded. Based on the first performance dataset, data integrity checks are performed, and missing or abnormal data points are marked and supplemented. Through data integrity checks, missing or abnormal data points are identified and supplemented by interpolation or retesting. For example, assuming a performance metric value is missing at a certain time point, denoted as... By using linear interpolation, the supplemented value is obtained as follows:
[0071] ;
[0072] in, and These are performance metric values at adjacent time points. In this way, a complete and continuous performance dataset is obtained. A preliminary analysis of the second performance dataset is performed to calculate the processing speed, resource utilization, and power consumption of each module in the AI SOC, obtaining the raw performance data for each module. Processing speed is calculated based on the total time spent executing the task; assuming a module's performance within a certain time interval... Internal processing For each task, the processing speed is... Represented as:
[0073] ;
[0074] in, For processing speed, The number of tasks to be processed. The execution time is used for calculation. Resource utilization is calculated by statistically analyzing the module's resource usage during the test, such as CPU utilization and memory utilization. Power consumption is calculated by measuring the current and voltage of the module under different loads using an external power acquisition device.
[0075] In one specific embodiment, the process of performing step 104 may specifically include the following steps:
[0076] Seasonal trend decomposition is performed on the original performance data, decomposing each performance index sequence into a trend term, a seasonal term, and a residual term. The trend term reflects long-term changes, the seasonal term represents periodic fluctuations, and the residual term represents short-term fluctuations, resulting in the decomposed performance dataset.
[0077] Based on the decomposed performance dataset, features are extracted from the trend term, seasonality term and residual term respectively. The slope and curvature are calculated for the trend term, the period and amplitude are extracted for the seasonality term, and the variance and kurtosis are calculated for the residual term, resulting in a multi-scale feature set containing long-term, periodic and short-term features.
[0078] Discrete wavelet transform is performed on each time series in the multi-scale feature set. Daubechies wavelet basis functions are used for 5-level decomposition to extract approximation coefficients and detail coefficients in different frequency domains, resulting in a frequency domain feature set containing low-frequency, mid-frequency and high-frequency information.
[0079] Based on the frequency domain feature set, a multi-head attention network is constructed. Self-attention calculation is performed on features of different scales and frequency domains to obtain the attention weight matrix. The attention weight matrix is then used to perform weighted summation of features to obtain the fused feature set.
[0080] Kernel principal component analysis is performed on the fused feature set. Radial basis functions are selected as kernel functions, and principal components are obtained by solving the eigenvalue problem, resulting in the dimensionality-reduced feature set.
[0081] Based on the dimensionality-reduced feature set, the multi-kernel maximum mean difference method is used, and linear kernel, polynomial kernel and Gaussian kernel are selected as the basic kernel functions to calculate the distance matrix of feature distribution between different batches of AI SOCs, and obtain the batch difference matrix.
[0082] The batch difference matrix is aligned with features, while minimizing the feature distribution difference between the source and target domains and the classification error. The features of different batches are mapped to a common feature space to obtain the batch-aligned feature set.
[0083] Based on the feature set aligned between batches, each feature is standardized, and the mean and standard deviation of each feature are calculated to obtain a set of standardized performance indicators.
[0084] Specifically, seasonal trend decomposition is performed on the raw performance data, breaking down each performance index sequence into a trend term, a seasonal term, and a residual term. Time series analysis tools, such as STL or classic additive or multiplicative decomposition models, are used. During the decomposition, the trend term describes the long-term trend in the data sequence, reflecting the overall change in system performance over time; the seasonal term describes periodic fluctuations, representing the impact of certain periodic factors (such as day-night cycles, weekly fluctuations, etc.) on performance; and the residual term represents short-term fluctuations, i.e., those random variations that cannot be explained by trend and seasonal factors. This decomposition method helps understand the different components in the raw performance data, resulting in a decomposed performance dataset. Based on the decomposed performance dataset, features are extracted from the trend term, seasonal term, and residual term to construct a multi-scale feature set. Feature extraction of the trend term includes calculating the slope and curvature to describe the rate and pattern of long-term performance change. It is assumed that the trend term is a function... Its slope is calculated using the derivative with respect to time:
[0085] ;
[0086] in, Indicates the slope of the trend term. For trend items, For time, the slope indicates whether the system performance shows an upward or downward trend. Curvature, represented by the second derivative, describes the degree of bending of the trend term at a point, i.e., the acceleration or deceleration characteristic of long-term change. For seasonality, feature extraction includes calculating the period and amplitude. The period refers to the repetition interval of the seasonality, such as weekly or monthly; while the amplitude refers to the range of variation of the seasonality, with a larger amplitude indicating more drastic fluctuations within that period. For the residual term, its variance and kurtosis are calculated. Variance measures the intensity of short-term fluctuations. Assuming the residual term is... Its variance is expressed as:
[0087] ;
[0088] in, The variance of the residual term. For the first The residual values at each time point The average value of the residuals. The number of data points is represented by kurtosis. Kurtosis describes the peak characteristics of the residual term, reflecting the frequency of extreme fluctuations in the data. After extracting features from the trend, seasonality, and residual terms, discrete wavelet transform is performed on each time series in the multi-scale feature set to extract information from different frequency domains. Daubechies wavelet basis functions are used to perform a five-level decomposition on each time series. Through wavelet transform, the time series is decomposed into low-frequency approximation coefficients and high-frequency detail coefficients, resulting in a frequency domain feature set containing low-frequency, mid-frequency, and high-frequency information. Low-frequency components mainly reflect the overall trend of the time series, while high-frequency components reflect short-term fluctuations and anomalous features in the data. Through multi-level decomposition, information from different frequencies is effectively extracted and represented, reflecting the characteristics of performance data at different time scales. Based on the extracted frequency domain feature set, a multi-head attention network is constructed to perform self-attention calculations on features at different scales and in the frequency domain. The multi-head attention mechanism uses different heads to weight the input features from multiple perspectives, generating an attention weight matrix. The attention weight matrix measures the importance of different features in a given context, effectively highlighting key features and suppressing irrelevant features. Assume the input features are matrices The attention weight matrix is The weighted summation of the fused feature set is represented as:
[0089] ;
[0090] in, Represents the fused feature set, This is the attention weight matrix. The input feature matrix is used. Through a multi-head attention network, features from different scales and frequency domains are fully fused to obtain a feature representation containing comprehensive information. Kernel principal component analysis (KPCA) is performed on the fused feature set, and radial basis functions (RBFs) are selected as the kernel function. KPCA is a nonlinear dimensionality reduction method that, by mapping data to a high-dimensional space, can better capture the inherent structure of the data. The radial basis function is a commonly used kernel function, and its form is:
[0091] ;
[0092] in, For two feature vectors and The kernel function values between The kernel width parameter is used. By solving the eigenvalue problem, the principal components of the data in the high-dimensional space are obtained, thus achieving feature dimensionality reduction and obtaining the dimensionality-reduced feature set. Based on the dimensionality-reduced feature set, the multi-kernel maximum mean difference method is used, selecting linear kernel, polynomial kernel, and Gaussian kernel as basic kernel functions to calculate the distance matrix of feature distributions between different batches of AI SOCs, thereby obtaining the batch difference matrix. The multi-kernel maximum mean difference method can effectively measure the distribution differences of data in different batches. Assuming the features of different batches are... and Then the batch difference matrix Represented by the difference in the mean of the kernel function:
[0093] ;
[0094] in, Due to batch differences, Based on the kernel function value, and Each represents a batch and batch The feature vectors in the dataset are used for batch-adversarial feature alignment. A domain-adversarial neural network (DANN) method is employed to minimize the feature distribution differences between the source and target domains, thereby reducing classification error and mapping features from different batches to a common feature space, resulting in a batch-aligned feature set. Through adversarial training, the DANN ensures that the features generated by the feature extractor are as similar as possible across different batches, achieving batch-independent feature representation. Based on the batch-aligned feature set, each feature is standardized, and the mean and standard deviation of each feature are calculated to obtain a standardized performance metric set.
[0095] In one specific embodiment, the process of performing step 105 may specifically include the following steps:
[0096] Based on a standardized set of performance metrics, a Gaussian mixture model is used for multidimensional clustering analysis. The model parameters are iteratively optimized using the expectation-maximization algorithm to obtain k performance clusters.
[0097] The silhouette coefficients of k performance clusters are calculated to evaluate the clustering effect. The clustering result with the largest silhouette coefficient is selected as the optimal clustering scheme to obtain the performance clustering result.
[0098] Based on the performance clustering results, the average distance between each data point and its k nearest neighbors is calculated, and compared with the average distance from these k nearest neighbors to their respective k nearest neighbors to obtain the local anomaly factor of each data point.
[0099] Local outlier factors are screened by threshold, and data points with outlier factors greater than the preset threshold are selected as candidate performance boundary points to obtain a preliminary performance boundary point set;
[0100] Based on the preliminary performance boundary point set, the neighbor boundary degree of each boundary point is calculated, and the proportion of boundary points in its k nearest neighbors is counted to obtain the neighbor boundary degree matrix.
[0101] Density clustering is performed on the neighbor boundary degree matrix to aggregate nearby boundary points with similar neighbor boundary degrees into continuous boundary line segments, thus obtaining the performance boundary profile.
[0102] Based on the performance boundary profile and performance clustering results, the mean, standard deviation and boundary features of the performance indicators of each performance cluster are calculated, and the performance status of the AI SOC module is comprehensively evaluated to obtain the comprehensive performance evaluation results.
[0103] Specifically, based on a standardized performance index set, a Gaussian Mixture Model (GM) is used for multidimensional clustering analysis. A GM is a probabilistic model used to describe the multidimensional distribution of data, performing clustering by assuming the data is a linear combination of several Gaussian distributions. To find the optimal parameters, the GM uses the Expectation-Maximization (EM) algorithm to iteratively optimize the model parameters. In the expectation step, the model calculates the probability that each data point belongs to each Gaussian distribution; in the maximization step, the parameters of the Gaussian distributions, including the mean, variance, and weights, are updated based on the probabilities. Through multiple iterations, the EM algorithm ultimately maximizes the log-likelihood function of the model, yielding the desired result. Individual performance clusters. For The clustering performance of each cluster is evaluated. The silhouette coefficient of each cluster is calculated; the silhouette coefficient is a metric for evaluating clustering quality, combining intra-cluster compactness and inter-cluster separation. Assume a data point is... The average distance within its cluster is The average distance between it and the nearest cluster is Then the silhouette coefficient of the data point Represented as:
[0104] ;
[0105] in, The value of is between [-1, 1]. A larger value indicates that the data point is more closely clustered with other points in its cluster and more separated from other clusters. The overall silhouette coefficient of the clustering result is measured by calculating the average silhouette coefficient of all data points. By calculating the silhouette coefficient of each cluster and selecting the cluster with the largest silhouette coefficient as the optimal clustering scheme, the final performance clustering result is obtained, ensuring the rationality and quality of the clustering result. Based on the performance clustering result, the silhouette coefficient of each data point is calculated relative to the average silhouette coefficient of all data points. The average distance of the nearest neighbors, and with this Each of their neighbors The average distance to nearest neighbors is compared to obtain the local anomaly factor for each data point. The local anomaly factor measures the degree of anomalousness of a data point within a local region and can effectively identify outliers in clusters. Assume data points... of Nearest neighbor set is Then data points With The average distance to nearest neighbors is expressed as:
[0106] ;
[0107] in, Representing data points its neighbors The distance between them is calculated. By calculating the local anomaly factor for each data point, those data points with a high degree of anomaly are identified. A threshold is applied to the local anomaly factors, selecting data points with anomaly factors greater than a preset threshold as candidate performance boundary points, thus obtaining a preliminary set of performance boundary points. These candidate performance boundary points are located at the edge of the clusters, representing the extreme states of system performance, and are helpful for further analysis of the system's robustness and boundary performance. After obtaining the preliminary performance boundary point set, the neighbor boundary degree of each boundary point is calculated. The neighbor boundary degree is defined as the distance between the neighbor boundary points. The proportion of nearest neighbors that are boundary points. Assume the boundary points are... Its nearest neighbor set is The number of boundary points is Then the neighbor boundary degree is expressed as:
[0108] ;
[0109] in, Represents boundary points The neighbor boundary degree is calculated. By calculating the neighbor boundary degree of each boundary point, the boundary characteristics of the boundary point in its local region are quantified, resulting in a neighbor boundary degree matrix. Density clustering is performed on the neighbor boundary degree matrix to aggregate nearby boundary points with similar neighbor boundary degrees into continuous boundary segments, thus obtaining the performance boundary profile. Density clustering (e.g., DBSCAN) is a density-based clustering method that can aggregate dense boundary points into clusters while eliminating isolated noise points. Through this aggregation, a clear performance boundary profile is formed to describe the boundary range of AI SOC performance under different conditions. Based on the performance boundary profile and performance clustering results, the mean, standard deviation, and boundary features of the performance indicators of each performance cluster are calculated to comprehensively evaluate the performance status of the AI SOC module. For example, suppose a cluster contains Data points, performance metrics are Then the mean and standard deviation of the cluster are respectively:
[0110] ;
[0111] in, This represents the average of the performance metrics. The standard deviation reflects the centrality and dispersion of the cluster. Boundary characteristics of the cluster are determined based on the boundary profile, such as the distribution density of boundary points and the boundary range, thus providing a detailed description of the system's performance limits.
[0112] In one specific embodiment, the process of performing step 106 may specifically include the following steps:
[0113] The comprehensive performance evaluation results are decomposed, and the performance indicators, clustering information and boundary features of each module of the AI SOC are extracted to obtain the performance evaluation feature set;
[0114] Based on the performance evaluation feature set, a decision tree model is constructed, with performance indicators as features and clustering and boundary information as target variables, and performance classification rules are obtained through training.
[0115] Extract rules from the performance classification rules, transform the decision path into IF-THEN form test rules, and obtain a preliminary set of optimization strategies.
[0116] Based on the initial optimized policy set, a reinforcement learning environment is designed, with the test policy as the action space, the performance index as the state space, and the test effect as the reward function, to obtain the reinforcement learning model.
[0117] The reinforcement learning model is trained using a deep Q-network algorithm. The test strategy is optimized through multiple rounds of iteration to obtain an optimized test strategy set. The optimized test strategy set is then cross-validated, and the generalization performance of each test strategy is evaluated using historical test data to obtain a strategy scoring matrix.
[0118] The optimal test strategy combination is obtained by optimizing the test strategy combination based on the strategy scoring matrix and generating new strategy combinations through crossover and mutation operations.
[0119] The optimal test strategy combination is integrated with the first test strategy, and the test case generation rules, resource allocation scheme and execution order are adjusted to output the second test strategy.
[0120] Specifically, the comprehensive performance evaluation results are decomposed to extract performance metrics, clustering information, and boundary features of each module in the AI SOC, forming a performance evaluation feature set. This set includes data such as processing speed, resource utilization, and power consumption for each module. Clustering information describes the performance and distribution characteristics of different modules under similar features, while boundary features characterize the system's performance limits and abnormal states. By integrating this information into a performance evaluation feature set, subsequent modeling and strategy optimization analysis are facilitated. Based on the obtained performance evaluation feature set, a decision tree model is constructed, using performance metrics as input features and clustering information and boundary features as target variables. The model is then trained to obtain classification rules for system performance. The decision tree model continuously divides the feature space, forming a tree structure where leaf nodes represent different classification results. Assuming a certain metric in the performance feature set is... Therefore, the splitting of a decision tree can be achieved by maximizing information gain. For example, at each split node, the information gain... Calculated using the following formula:
[0121] ;
[0122] in, This represents the information entropy of the parent node. Indicates the first Information entropy of each child node Indicates the first Number of samples in each child node The total number of samples is represented by [value]. In this way, the decision tree model can effectively extract the performance of each module under different feature conditions, generating a set of rules for performance classification. The performance classification rules are extracted, and the decision paths of the decision tree are transformed into IF-THEN test rules to obtain a preliminary optimization strategy set. IF-THEN rules are intuitive and easy to understand, making subsequent test design more explicit. For example, if the system's memory utilization exceeds a certain threshold and the CPU utilization is within a specific range, a boundary performance test on a certain module is triggered. By progressively transforming the decision paths of the decision tree into explicit IF-THEN conditions, specific test measures and coping strategies can be provided for various scenarios, forming a preliminary optimized test strategy set. Based on the preliminary optimized strategy set, a reinforcement learning environment is designed, using the test strategy as the action space, performance indicators as the state space, and test results as the reward function to establish a reinforcement learning model. The goal of the reinforcement learning model is to continuously optimize the test strategy through continuous exploration and trial and error in the simulated environment, thereby improving test coverage and effectiveness. The action space represents the set of selectable test strategies, and the state space represents the performance indicators of the current AI SOC module, such as processing speed and power consumption. The reward function reflects the test results after each strategy selection, such as the number of new test scenarios covered or the number of potential problems discovered. Assume the current state is... The actions taken are The updated state is The corresponding reward is The goal of reinforcement learning models is to find a strategy that maximizes cumulative reward.
[0123] ;
[0124] in, A state-action value function, describing the state... Take action value, For instant rewards, The discount factor is used to balance current and future rewards. To optimize the reinforcement learning model, a Deep Q-Network (DQN) algorithm is used to train the model. DQN approximates the state-action value function through a deep neural network, enabling the model to handle complex and high-dimensional state spaces. In multiple iterations, DQN continuously adjusts the policy, optimizing the Q-value function based on feedback from each test, gradually improving the effectiveness and coverage of the test policy. After sufficient training, an optimized set of test policies is obtained. Cross-validation is performed on the optimized set of test policies, using historical test data to evaluate the generalization performance of each policy, resulting in a policy score matrix. The purpose of cross-validation is to ensure the applicability and stability of these policies in different scenarios. The score matrix is used to quantify the performance of each policy, such as test coverage and problem detection ability. Based on the policy score matrix, combinatorial optimization of the test policies is performed. New policy combinations are generated through crossover and mutation operations to obtain the optimal test policy combination. Crossover operation involves selecting parts of two high-scoring test policies and combining them to generate a new policy, while mutation operation involves randomly changing certain parts of the policy to explore new possibilities. Through multiple cross-validation and mutation processes, a new set of test strategy combinations is generated. After scoring, the best-performing combination is selected as the optimal test strategy combination. This optimal combination is then integrated with the initial first test strategy, and corresponding adjustments are made to the test case generation rules, resource allocation scheme, and execution order to output the second test strategy. The adjustments to the test case generation rules are to better adapt to the current system performance characteristics, ensuring that test cases cover the critical performance boundaries of each module. For example, specific load test cases are generated under conditions of high memory usage to verify the system's extreme performance. Adjustments to the resource allocation scheme are made to rationally allocate test resources, allowing the test controller to concentrate resources on testing high-risk modules. The adjustments to the execution order prioritize the execution of more important test cases to quickly identify potential problems in the system.
[0125] The above describes the AI SOC modular unit testing method for a set-top box in an embodiment of the present invention. The following describes the AI SOC modular unit testing device for a set-top box in an embodiment of the present invention. Please refer to [link to documentation]. Figure 2 One embodiment of the AI SOC modular unit testing device for set-top boxes in this invention includes:
[0126] Functional partitioning module 201 is used to partition the set-top box AI SOC module based on a preset first test strategy and build a modular test environment.
[0127] Analysis module 202 is used to analyze historical test data based on a modular testing environment and generate test case sets;
[0128] The execution module 203 is used to input the test case set into the multi-test controller, perform parallel testing and real-time interference compensation, and obtain the raw performance data of each module of the AI SOC.
[0129] Extraction module 204 is used to perform multi-scale feature extraction and cross-batch alignment on the raw performance data to obtain a standardized performance index set;
[0130] The identification module 205 is used to perform multidimensional clustering analysis and neighbor-based boundary identification on the standardized performance index set to obtain comprehensive performance evaluation results.
[0131] The output module 206 is used to dynamically optimize the first test strategy based on the comprehensive performance evaluation results and output the second test strategy.
[0132] Through the collaborative efforts of the aforementioned components, and by combining FPGA hardware simulation and software simulation, the functional modules of the AI SOC and its real-world usage environment are accurately simulated, improving the realism and comprehensiveness of the testing. Based on historical test data analysis, test cases are dynamically generated and optimized, increasing test coverage and relevance. Multiple test controllers are used to execute test tasks in parallel, and inter-module interference is compensated in real time, improving testing efficiency and accuracy. Multi-scale feature extraction and cross-batch alignment techniques address the comparability issue of AI SOC performance data from different batches, enhancing the reliability of test results. Multi-dimensional clustering analysis and a neighbor-based boundary degree-based performance boundary identification method are employed to achieve accurate performance evaluation and anomaly detection for the AI SOC. Based on the comprehensive performance evaluation results, reinforcement learning and other algorithms are used to dynamically optimize the testing strategy, further improving testing efficiency and accuracy.
[0133] above Figure 2 The AI SOC modular unit testing device for the set-top box in this embodiment of the invention is described in detail from the perspective of modular functional entities. The AI SOC modular unit testing device for the set-top box in this embodiment of the invention is described in detail from the perspective of hardware processing.
[0134] Figure 3This is a schematic diagram of the structure of a set-top box AI SOC modular unit test device 300 provided in an embodiment of the present invention. The set-top box AI SOC modular unit test device 300 can vary significantly due to different configurations or performance. It may include one or more central processing units (CPUs) 310 (e.g., one or more processors) and a memory 320, and one or more storage media 330 (e.g., one or more mass storage devices) for storing application programs 333 or data 332. The memory 320 and storage media 330 can be temporary or persistent storage. The program stored in the storage media 330 may include one or more modules (not shown in the diagram), each module may include a series of instruction operations on the set-top box AI SOC modular unit test device 300. Furthermore, the processor 310 may be configured to communicate with the storage media 330 and execute a series of instruction operations in the storage media 330 on the set-top box AI SOC modular unit test device 300 to implement the steps of the above-described set-top box AI SOC modular unit test method.
[0135] The set-top box's AI SOC modular unit test equipment 300 may also include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input / output interfaces 360, and / or one or more operating systems 331, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, etc. Those skilled in the art will understand that... Figure 3 The illustrated AI SOC modular unit test equipment structure for set-top boxes does not constitute a limitation on the AI SOC modular unit test equipment for set-top boxes provided by this invention. It may include more or fewer components than illustrated, or combine certain components, or have different component arrangements.
[0136] The present invention also provides a computer-readable storage medium, which can be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium, wherein the computer-readable storage medium stores instructions that, when the instructions are executed on a computer, cause the computer to perform the steps of the AI SOC modular unit test method of the set-top box.
[0137] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0138] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0139] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A modular unit testing method for an AI SOC in a set-top box, characterized in that, The method includes: Based on a preset first testing strategy, the set-top box AI SOC module is functionally partitioned to construct a modular testing environment. Specifically, this includes: performing functional analysis on the set-top box AI SOC based on the preset first testing strategy, dividing it into a video processing unit, an audio processing unit, and an AI inference unit, obtaining the functional partitioning result; based on the functional partitioning result, using an FPGA to construct a hardware simulator to simulate the core computing unit, storage unit, and communication interface of the AI SOC, and configuring the parameters of the hardware simulator to set the clock frequency, storage capacity, and interface bandwidth consistent with the actual AI SOC; based on the hardware simulator, creating a software simulation system to simulate the video decoding, audio processing, and network communication functions of the set-top box operating system, and configuring the software simulation system to establish a test database including high-definition video playback, online streaming media, and game operation; based on the test database, setting up multiple test controllers, using a master-slave architecture to allocate test tasks and manage test resources, and configuring the permissions of the test controllers, so that the master test controller is responsible for global test strategy formulation and resource allocation, and the slave test controllers are responsible for specific module test execution; and integrating the hardware simulator, the software simulation system, and the test controllers to construct a modular testing environment. Based on the modular testing environment, historical test data is analyzed to generate a test case set. Specifically, this includes: cleaning and standardizing the historical test data to obtain a standardized historical test dataset; extracting features and reducing dimensionality based on the standardized historical test dataset to identify feature datasets affecting AI SOC performance; performing multi-dimensional analysis on the feature dataset to classify test scenarios into three categories: normal operation, boundary conditions, and abnormal situations, resulting in test scenario classification results; constructing test case generation rules based on the test scenario classification results, including trigger conditions and data ranges for each type of scenario, to obtain a test case generation template; applying the test case generation template to new test data to dynamically generate a basic test case set adapted to the current AI SOC characteristics; combining and mutating the basic test case set to generate complex test scenarios covering multi-module interactions, resulting in an extended test case set; and deduplicating and merging test cases based on the extended test case set to eliminate redundant and repetitive test content, resulting in a simplified test case set; and prioritizing the simplified test case set to obtain a final test case set. The test case set is input into multiple test controllers to perform parallel testing and real-time interference compensation, obtaining the raw performance data of each module of the AI SOC. Specifically, this includes: decomposing the test case set into tasks, dividing the test cases into different test task groups to obtain a test task allocation scheme; assigning tasks to multiple test controllers based on the test task allocation scheme, assigning test task groups to corresponding test controllers to obtain a test controller task list; starting each test controller in parallel according to the test controller task list, executing multiple test tasks simultaneously to obtain initial parallel test results, and monitoring the initial parallel test results in real time to detect interference between modules and obtain interference intensity data; calculating interference compensation parameters based on the interference intensity data, and performing real-time compensation for interference during the testing process to obtain compensated test data; collecting and storing the compensated test data, recording the performance indicators of each module of the AI SOC under different test scenarios to obtain a first performance dataset; performing data integrity checks on the first performance dataset, marking and supplementing missing or abnormal data points to obtain a second performance dataset; and performing preliminary analysis on the second performance dataset to calculate AI... The processing speed, resource utilization, and power consumption of each module in the SOC are used to obtain the raw performance data of each module in the AISOC. Multi-scale feature extraction and cross-batch alignment are performed on the original performance data to obtain a standardized performance index set. Specifically, this includes: performing seasonal trend decomposition on the original performance data, decomposing each performance index sequence into a trend term, a seasonal term, and a residual term, where the trend term reflects long-term changes, the seasonal term represents periodic fluctuations, and the residual term represents short-term fluctuations, resulting in a decomposed performance dataset; based on the decomposed performance dataset, feature extraction is performed on the trend term, seasonal term, and residual term respectively, calculating the slope and curvature for the trend term, extracting the period and amplitude for the seasonal term, and calculating the variance and kurtosis for the residual term, resulting in a multi-scale feature set containing long-term, periodic, and short-term features; and performing discrete wavelet transform on each time series in the multi-scale feature set. A five-level decomposition was performed using Daubechies wavelet basis functions to extract approximation coefficients and detail coefficients in different frequency domains, resulting in a frequency domain feature set containing low-frequency, mid-frequency, and high-frequency information. Based on this frequency domain feature set, a multi-head attention network was constructed to perform self-attention calculations on features at different scales and in the frequency domain, obtaining an attention weight matrix. This attention weight matrix was then used for weighted feature summation to obtain a fused feature set. Kernel principal component analysis was performed on the fused feature set, selecting radial basis functions as kernel functions. Principal components were obtained by solving the eigenvalue problem, resulting in a dimensionality-reduced feature set. Based on the dimensionality-reduced feature set, the multi-kernel maximum mean difference method was used, selecting linear kernels, polynomial kernels, and Gaussian kernels as basic kernel functions to calculate different batches of AI. The distance matrix of feature distributions between SOCs is used to obtain the batch difference matrix; the batch difference matrix is then used for feature alignment, while minimizing the feature distribution differences between the source and target domains and the classification error, mapping the features of different batches to a common feature space to obtain a batch-aligned feature set; based on the batch-aligned feature set, each feature is standardized, and the mean and standard deviation of each feature are calculated to obtain a standardized performance index set; Multidimensional clustering analysis and neighbor-based boundary identification are performed on the standardized performance index set to obtain a comprehensive performance evaluation result. The neighbor boundary degree refers to the proportion of other boundary points among the k nearest neighbors of a boundary point. A neighbor boundary degree matrix is obtained by statistically analyzing the neighbor boundary degree of each boundary point. Specifically, this includes: performing multidimensional clustering analysis using a Gaussian mixture model based on the standardized performance index set; iteratively optimizing the model parameters using the expectation-maximization algorithm to obtain k performance clusters; calculating the silhouette coefficient of each of the k performance clusters to evaluate the clustering effect; selecting the cluster with the largest silhouette coefficient as the optimal clustering scheme to obtain the performance clustering result; and calculating the average distance between each data point and its k nearest neighbors based on the performance clustering result. The system calculates the local anomaly factor for each data point by comparing it with the average distance from the k nearest neighbors to their respective k nearest neighbors. A threshold screening is then performed on these local anomaly factors, selecting data points with anomaly factors greater than a preset threshold as candidate performance boundary points, thus obtaining a preliminary performance boundary point set. Based on this preliminary performance boundary point set, the neighbor boundary degree of each boundary point is calculated, and the proportion of boundary points among its k nearest neighbors is statistically analyzed to obtain a neighbor boundary degree matrix. Density clustering is then performed on the neighbor boundary degree matrix, aggregating nearby boundary points with similar neighbor boundary degrees into continuous boundary segments, thus obtaining the performance boundary contour. Based on the performance boundary contour and the performance clustering results, the mean, standard deviation, and boundary features of the performance indicators for each performance cluster are calculated. The overall performance status of the AI SOC module is then comprehensively evaluated to obtain a comprehensive performance evaluation result. Based on the comprehensive performance evaluation results, the first testing strategy is dynamically optimized to output a second testing strategy; specifically, this includes: decomposing the comprehensive performance evaluation results and extracting AI. The performance metrics, clustering information, and boundary features of each module of the SOC are used to obtain a performance evaluation feature set. Based on this feature set, a decision tree model is constructed, using performance metrics as features and clustering and boundary information as target variables, to train performance classification rules. Rule extraction is performed on these classification rules, transforming the decision paths into IF-THEN form test rules to obtain a preliminary optimized strategy set. Based on this preliminary optimized strategy set, a reinforcement learning environment is designed, using test strategies as the action space, performance metrics as the state space, and test results as the reward function to obtain a reinforcement learning model. The reinforcement learning model is trained using a deep Q-network algorithm, and the test strategies are iteratively optimized through multiple rounds to obtain an optimized test strategy set. Cross-validation is performed on the optimized test strategy set, and the generalization performance of each test strategy is evaluated using historical test data to obtain a strategy scoring matrix. Based on the strategy scoring matrix, test strategy combination optimization is performed, generating new strategy combinations through crossover and mutation operations to obtain the optimal test strategy combination. The optimal test strategy combination is integrated with the first test strategy, and the test case generation rules, resource allocation scheme, and execution order are adjusted to output a second test strategy.
2. A modular unit testing device for an AI SOC of a set-top box, characterized in that, The apparatus for performing the AI SOC modular unit test method for a set-top box as described in claim 1 includes: The functional partitioning module is used to partition the set-top box AI SOC module based on a preset first test strategy and build a modular test environment. The analysis module is used to analyze historical test data based on the modular testing environment and generate test case sets; The execution module is used to input the test case set into multiple test controllers, perform parallel testing and real-time interference compensation, and obtain the raw performance data of each module of the AI SOC. The extraction module is used to perform multi-scale feature extraction and cross-batch alignment on the original performance data to obtain a standardized performance index set; The identification module is used to perform multidimensional clustering analysis and neighbor-based boundary identification on the standardized performance index set to obtain a comprehensive performance evaluation result. The neighbor boundary degree refers to the proportion of other boundary points in the k nearest neighbors of a boundary point. The neighbor boundary degree matrix is obtained by statistically analyzing the neighbor boundary degree of each boundary point. The output module is used to dynamically optimize the first test strategy based on the comprehensive performance evaluation results and output the second test strategy.
3. A modular unit test device for AI SOC of a set-top box, characterized in that, The set-top box's AI SOC modular unit test equipment includes: a memory and at least one processor, wherein the memory stores instructions; The at least one processor invokes the instructions in the memory to cause the AI SOC modular unit test equipment of the set-top box to execute the AI SOC modular unit test method of the set-top box as described in claim 1.
4. A computer-readable storage medium storing instructions thereon, characterized in that, When the instruction is executed by the processor, it implements the AI SOC modular unit testing method for the set-top box as described in claim 1.
Citation Information
Patent Citations
Intermittent process unequal-length batch data synchronization method based on kernel dynamic time warping
CN113221932A
Chip verification method and system
CN118095163A
Chip packaging test system and method
CN118782487A