Method and device for testing AI SOC modular unit of set top box
Through the combination of FPGA hardware simulation and software simulation, to build a test platform that simulates the real -use environment, it solves the problem that the traditional test method is difficult to comprehensively cover the AI SOC function module, realize the efficient and accurate test results, improve the comprehensiveness of the test test And reliability.
Patent Information
- Application Number
- CN202411875509.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-19
- Publication Date
- 2025-01-21
- Estimated Expiration
- 2044-12-19
AI Technical Summary
Traditional AI SOC testing methods are difficult to fully cover various functional modules, especially in terms of performance evaluation under inter-module interaction and boundary conditions. Due to production batch differences and the diversity of use environments, the comparability and reliability of test results are affected. Influence.
Using a combination of FPGA hardware simulation and software simulation, we build a test platform that simulates the real use environment, generate test cases covering various scenarios, implement parallel testing and real-time interference compensation, and conduct multi-dimensional analysis and cross-batch testing of test data. Align and dynamically adjust testing strategies to improve testing efficiency and accuracy.
It improves the authenticity and comprehensiveness of the test, enhances the reliability and comparability of the test results, achieves accurate evaluation and anomaly detection of AI SOC performance, and improves the efficiency and accuracy of the test.
Smart Images

Figure CN119342257A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of SOC modular unit testing, and in particular to a method and device for testing an AI SOC modular unit of a set-top box. Background Art
[0002] With the rapid development of artificial intelligence technology, AI SOCs are increasingly used in smart home devices such as set-top boxes. These AI SOCs usually integrate multiple functional modules such as video processing, audio processing, and AI reasoning, which greatly improves the intelligence level and user experience of set-top boxes. However, the complexity of AI SOCs also brings great challenges to their testing. Traditional testing methods often fail to fully cover the various functional modules of AI SOCs, especially in terms of performance evaluation under inter-module interactions and boundary conditions.
[0003] In addition, due to differences in AI SOC production batches and the diversity of usage environments, there may be significant differences in the performance of AI SOCs in different batches or in different usage scenarios. This difference affects the comparability and reliability of test results, making it difficult to accurately evaluate the true performance and potential problems of AI SOCs. At the same time, with the continuous iteration and upgrading of AI SOC functions, test strategies also need to be adjusted and optimized in a timely manner to adapt to new functional characteristics and performance requirements. Summary of the invention
[0004] The present invention provides a set-top box AI SOC modular unit testing method and device, which can automatically build a test platform that simulates a real usage environment, generate test cases covering various scenarios, realize parallel testing and real-time interference compensation, and perform multi-dimensional analysis and cross-batch alignment of test data. At the same time, it also has adaptive optimization capabilities and can dynamically adjust the test strategy according to the test results to continuously improve the efficiency and accuracy of the test.
[0005] In a first aspect, the present invention provides an AI SOC modular unit testing method for a set-top box, the AI SOC modular unit testing method for a set-top box comprising: Based on the preset first test strategy, the set-top box AI SOC module is functionally divided to build a modular test environment; Perform historical test data analysis based on the modular test environment to generate a test case set; Input the test case set into a multi-test controller, perform parallel testing and real-time interference compensation, and obtain original performance data of each module of the AISOC; Performing multi-scale feature extraction and cross-batch alignment on the original performance data to obtain a standardized performance indicator set; Performing multidimensional cluster analysis on the standardized performance indicator set and identifying performance boundaries based on neighbor boundary degrees to obtain a comprehensive performance evaluation result; Based on the comprehensive performance evaluation result, the first test strategy is dynamically optimized and a second test strategy is output.
[0006] In a second aspect, the present invention provides an AI SOC modular unit testing device for a set-top box, the AI SOC modular unit testing device for a set-top box comprising: A function division module, used for performing function division on the set-top box AI SOC module based on a preset first test strategy to build a modular test environment; An analysis module, used to analyze historical test data based on the modular test environment and generate a test case set; An execution module, used for inputting the test case set into a multi-test controller, performing parallel testing and real-time interference compensation, and obtaining original performance data of each module of the AI SOC; An extraction module, used for performing multi-scale feature extraction and cross-batch alignment on the original performance data to obtain a standardized performance indicator set; An identification module, used for performing multidimensional cluster analysis on the standardized performance indicator set and identifying performance boundaries based on neighbor boundary degrees to obtain a comprehensive performance evaluation result; An output module is used to dynamically optimize the first test strategy based on the comprehensive performance evaluation result and output a second test strategy.
[0007] The third aspect of the present invention provides an AI SOC modular unit testing device for a set-top box, comprising: a memory and at least one processor, wherein the memory stores instructions; the at least one processor calls the instructions in the memory so that the AI SOC modular unit testing device for the set-top box executes the above-mentioned AI SOC modular unit testing method for the set-top box.
[0008] A fourth aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the above-mentioned AI SOC modular unit testing method for a set-top box.
[0009] In the technical solution provided by the present invention, the functional modules and actual usage environment of the AI SOC are accurately simulated by combining FPGA hardware simulation and software simulation, thereby improving the authenticity and comprehensiveness of the test. Based on the analysis of historical test data, test cases are dynamically generated and optimized to improve test coverage and pertinence. Multiple test controllers are used to execute test tasks in parallel, and interference between modules is compensated in real time, thereby improving test efficiency and accuracy. Through multi-scale feature extraction and cross-batch alignment technology, the comparability problem of AI SOC performance data of different batches is solved, and the reliability of test results is enhanced. By adopting multi-dimensional clustering analysis and performance boundary identification methods based on neighbor boundary degree, accurate evaluation and anomaly detection of AI SOC performance are achieved. Based on the comprehensive performance evaluation results, reinforcement learning and other algorithms are used to dynamically optimize the test strategy to improve the efficiency and accuracy of the test.
[0010] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description, claims and drawings.
[0011] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] Figure 1 A schematic diagram of an embodiment of an AI SOC modular unit testing method for a set-top box according to an embodiment of the present invention; Figure 2 A schematic diagram of an embodiment of an AI SOC modular unit testing device for a set-top box according to an embodiment of the present invention; Figure 3 Schematic diagram of an embodiment of an AI SOC modular unit testing device for a set-top box in an embodiment of the present invention. DETAILED DESCRIPTION
[0013] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0014] The terms "including" and "having" and any variations thereof mentioned in the embodiments of the present invention are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device end including a series of steps or units is not limited to the listed steps or units, but may optionally include other steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or device ends.
[0015] To facilitate understanding of this embodiment, firstly, a method for testing the AI SOC modular unit of a set-top box disclosed in an embodiment of the present invention is described in detail. Figure 1 As shown, the method comprises the following steps: 101. Based on the preset first test strategy, the set-top box AI SOC module is functionally divided to build a modular test environment; It is understandable that the execution subject of the present invention may be an AI SOC modular unit test device of a set-top box, or a terminal or a server, which is not limited here. The embodiment of the present invention is described by taking a server as the execution subject as an example.
[0016] Specifically, based on the preset 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 reasoning unit to obtain the functional division results. The video processing unit processes various video data of the set-top box, such as high-definition video playback and video decoding; the audio processing unit involves the acquisition, decoding and synthesis of audio data; and the AI reasoning unit performs AI-related reasoning tasks, such as image recognition or voice control functions. Based on the above functional division results, a hardware simulator is built using FPGA (field programmable gate array). The selection of FPGA has the characteristics of flexible programmability, enabling it to simulate the core computing unit, storage unit and communication interface in the AI SOC. The hardware simulator can achieve system characteristics consistent with the actual AI SOC by configuring the parameters of the FPGA, including clock frequency, storage capacity and interface bandwidth. This configuration is to ensure the authenticity and high fidelity of the test environment, so that the actual performance of the AI SOC can be simulated as much as possible in subsequent tests. The setting of the clock frequency ensures that the hardware simulator is consistent with 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 is created based on the hardware simulator to simulate the main functional modules of the set-top box operating system, including functions such as video decoding, audio processing, and network communication. The software simulation system is designed to supplement the functions of the hardware simulator and simulate the test scenarios in more detail from the system software level. In order to make the test more representative and comprehensive, the software simulation system is configured with scenarios, including the establishment of a test database containing high-definition video playback, online streaming media, and game operation. The test database covers the typical application scenarios encountered by the set-top box in actual use, especially in video playback, online streaming services, and highly interactive game operation, providing a comprehensive and diverse test environment for testing to ensure that the performance of the AI SOC is fully verified in different scenarios. Based on the test database, the test controller is configured. The master-slave architecture is used to allocate test tasks and manage test resources, so that the entire test process can be carried out in an orderly and efficient manner. The existence of multiple test controllers enables the test tasks to be dispersed into different modules, realizing parallelization and fine-grained management. The role of the master test controller is to be responsible for the formulation of global test strategies and the overall allocation of resources, to coordinate the management of various parts in the test environment, and to specify specific test strategies and resource allocation methods for the test of each module. At the same time, the slave test controller focuses on the execution of specific module tests, and completes the specific test tasks of video processing, audio processing, and AI reasoning in strict accordance with the instructions of the master test controller, ensuring the independence of each module test and the accuracy of the test results. The permissions of each test controller are configured to ensure that the master test controller has global management permissions, while the slave test controller is limited to executing tests on specific modules.The hardware simulator, software simulation system and test controller are systematically integrated to build a modular test environment. This allows each component to work closely together in the unit test of the AI SOC. The hardware simulator provides physical hardware functional support for the test, the software simulation system provides a real software running environment, and the master-slave test controller is responsible for the specific execution and management of the test tasks.
[0017] 102. Analyze historical test data based on modular test environment and generate test case sets; Specifically, the historical test data is cleaned and standardized to obtain a standardized historical test data set. Based on the standardized historical test data set, feature extraction and dimensionality reduction are performed to identify the feature data set that affects the performance of the AI SOC. The feature data set is analyzed in multiple dimensions to reasonably classify the test scenarios. The test scenarios are divided into three categories: normal operation, boundary conditions, and abnormal conditions to better cover all operating scenarios faced by the AI SOC. In the normal operation scenario, the purpose of the test is to verify the performance of the system under normal conditions; the boundary condition category focuses on the performance of the AI SOC under extreme operating conditions, such as high load or low power consumption; and the abnormal situation category is used to verify the system's processing capabilities and robustness under unforeseen circumstances such as sudden failures and data anomalies. Through scenario classification, the test scenario classification results are obtained, making the generation of subsequent test cases more hierarchical and targeted. Based on the test scenario classification results, test case generation rules are constructed. The test case generation rules define the trigger conditions and data ranges of various scenarios, that is, under what circumstances and how to generate corresponding test cases. For example, the test cases of normal operation scenarios are mainly based on general input data, while the test cases of boundary condition scenarios impose more extreme data inputs. Through detailed provisions of trigger conditions and data ranges, a test case generation template is formed, which can guide the construction of basic test cases and quickly adjust and generate adaptive test content under new test requirements. The test case generation template is applied to new test data to dynamically generate a basic test case set that adapts to the current AI SOC characteristics. The basic test case set generates test cases with specific goals for different AISOC modules in a templated manner. The basic test case set is combined and mutated to generate complex test scenarios covering multi-module interactions to obtain an extended test case set. Based on the extended test case set, test cases are deduplicated and merged to eliminate redundant and repeated test content to obtain a streamlined test case set. Priority evaluation is performed on the streamlined test case set, and the test is sorted according to the degree of impact and risk of the test on the performance of the AI SOC to obtain a test case set with reasonable priority. 103. Input the test case set into the multi-test controller, perform parallel testing and real-time interference compensation, and obtain the original performance data of each AISOC module; Specifically, the test case set is task-decomposed, and the test cases are divided into different test task groups to form a reasonable test task allocation scheme. Based on the test task allocation scheme, multiple test controllers are task-allocated, and the test task groups are allocated to the corresponding test controllers to obtain the task list of each test controller. Based on the task list of the test controller, each test controller is started in parallel. Through parallel startup, each test controller can execute different test tasks at the same time 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 different modules and obtain interference intensity data. Interference intensity data is key information to describe the mutual influence between modules, which helps to determine which modules have strong interference and need to be adjusted and compensated. Based on the interference intensity data, the interference compensation parameters are calculated to compensate for the interference in the test process in real time. 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 their actual performance. The compensation parameters are applied to the test process to effectively compensate for the existing interference and obtain the compensated test data. The compensated test data is collected and stored, and the performance indicators of each module of the AI SOC in different test scenarios are recorded to obtain the first performance data set. Based on the first performance data set, a data integrity check is performed to verify the accuracy and completeness of the test data. Missing or abnormal data points need to be marked and supplemented when necessary to obtain a second performance data set. Data supplementation uses methods such as interpolation, estimation, or retesting to ensure that the final data set can fully and accurately reflect the true performance of each module. A preliminary analysis is performed on the second performance data set, and the original performance data such as processing speed, resource utilization, and power consumption of each module of the AI SOC are obtained by calculating various performance indicators. 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 the performance bottlenecks or optimization space in the system are discovered.
[0018] 104. Perform multi-scale feature extraction and cross-batch alignment on the original performance data to obtain a standardized performance indicator set; Specifically, the original performance data is decomposed into seasonal trends, and each performance indicator series is decomposed into trend terms, seasonal terms, and residual terms. The trend term is used to reflect long-term changes and capture the overall changes in performance over time. The seasonal term reveals the periodic fluctuations of the data, which are usually due to the influence of external periodic factors, while the residual term is used to represent short-term fluctuations, including random changes that are not explained by trends and periodicity. Through decomposition, a decomposed performance data set is obtained. Based on the decomposed performance data set, feature extraction is performed on each part separately. For the trend term, its slope and curvature are calculated to quantify the direction and amplitude of its change, which helps to capture the trend of long-term performance improvement or decline; for the seasonal term, the cycle and amplitude are extracted to reflect the fluctuation law and fluctuation amplitude of AI SOC in a specific time interval; and for the residual term, the variance and kurtosis are calculated. The variance is used to measure the intensity of short-term fluctuations, while the kurtosis characterizes the frequency of occurrence of spikes and extreme values in the data distribution. Through feature extraction, a multi-scale feature set containing long-term, periodic, and short-term features is obtained. Frequency domain analysis is performed on each time series in the multi-scale feature set. The discrete wavelet transform method is adopted, and the Daubechies wavelet basis function is used to perform five-layer decomposition on each time series to extract the approximate coefficients and detail coefficients in different frequency domains. Through wavelet transform, the time series is decomposed into low-frequency, medium-frequency and high-frequency components to obtain the frequency domain feature set. The low-frequency information usually contains the overall trend characteristics, while the high-frequency information reflects the drastic changes in the short term. Through the extraction of frequency domain features, data analysis can not only focus on the temporal trend, but also reveal the fluctuation characteristics of the data from the perspective of the frequency domain. A multi-head attention network is constructed based on the frequency domain feature set, and self-attention calculation is performed on features of different scales and frequency domains. The multi-head attention network pays attention to different parts of the input features through a multi-head mechanism and calculates the attention weight matrix. The self-attention calculation automatically learns which features are more important in a given scenario, thereby improving the effectiveness of feature representation. By weighted summing the features using the attention weight matrix, a fused feature set is obtained, which enables effective information integration between features of multiple scales and multiple frequency domains, thereby enhancing the expressive power of features. Perform kernel principal component analysis on the fused feature set, select radial basis function as the kernel function, and perform dimensionality reduction by solving the eigenvalue problem to obtain the reduced feature set. Kernel principal component analysis is an effective nonlinear dimensionality reduction method that captures the nonlinear structure hidden in the fused feature set, maps high-dimensional data to low-dimensional space while retaining the most representative features, thereby reducing the dimension of the data and removing redundancy, making subsequent analysis and processing more efficient. Based on the reduced feature set, the multi-kernel maximum mean difference (MK-MMD) method is used, and the linear kernel, polynomial kernel, and Gaussian kernel are selected as the basic kernel functions. The distance matrix of the feature distribution between different batches of AI SOCs is calculated to obtain the batch difference matrix.The MK-MMD method can comprehensively measure the distribution differences of different batches of data in different feature spaces through a combination of multiple kernel functions, provide necessary information for subsequent batch alignment, and identify potential differences between different batches of test data. The batch difference matrix is feature aligned, and the domain-adversarial neural network method is used to minimize the feature distribution differences and classification errors between the source domain and the target domain. Through adversarial training, the features of different batches are mapped to a common feature space, so that the distribution differences between different batches are minimized and alignment between batches is achieved. 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 standardized set of performance indicators. All features are converted to the same scale to eliminate the impact caused by the different dimensions of different features, making subsequent analysis and comparison more fair and accurate.
[0019] 105. Perform multidimensional cluster analysis on the standardized performance indicator set and identify the performance boundary based on the neighbor boundary degree to obtain the comprehensive performance evaluation results; Specifically, based on the standardized performance indicator set, a Gaussian mixture model is used for multidimensional clustering analysis. The Gaussian mixture model is a probabilistic model suitable for capturing the complex distribution characteristics of data, and can achieve clustering by assigning data points to different Gaussian distributions. In order to optimize the parameters of the Gaussian mixture model, the expectation maximization algorithm is used. The expectation maximization algorithm is an iterative optimization method that continuously adjusts the model parameters by alternating between the expectation step and the maximization step to better adapt to the data distribution, and obtains k performance clustering clusters, each of which represents a class of data points with similar performance characteristics. The silhouette coefficient is calculated for the k performance clustering clusters. The silhouette coefficient is an indicator used to evaluate the quality of clustering, which combines the similarity within the cluster and the difference between the clusters. The larger the value, the better the clustering result. The performance clustering result is obtained by calculating the silhouette coefficient of each clustering cluster and selecting the clustering result with the largest silhouette coefficient as the optimal clustering scheme. Based on the performance clustering result, the average distance between each data point and its k nearest neighbors is calculated. In order to measure the local density of data points, the average distance of each data point is compared with the average distance of its k nearest neighbor data points to their respective k nearest neighbors, and the local anomaly factor (LOF) of each data point is calculated. The local anomaly factor reflects the degree of anomaly of a data point compared with the surrounding data points. The larger the value, the higher the degree of anomaly of the data point in the local area. By calculating the local anomaly factor, those anomalies that are significantly different from most data points are identified. These points represent the performance boundary of the AI SOC. For the obtained local anomaly factor, the threshold screening method is used to select data points with anomaly factors greater than the preset threshold as candidate points of the performance boundary, and a preliminary performance boundary point set is obtained. These candidate points are located outside each cluster and represent the limit or abnormality 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 in the k nearest neighbors of the boundary point. By counting the neighbor boundary degree of each boundary point, the neighbor boundary degree matrix is obtained. The neighbor boundary degree reflects the density of the boundary points. The higher the neighbor boundary degree, the stronger the boundary characteristics of the area where the boundary point is located. In this way, the strong and weak characteristics of the boundary points can be effectively distinguished. Based on the neighbor boundary degree matrix, the density clustering method is used to aggregate the adjacent boundary points with similar neighbor boundary degrees into continuous boundary segments to obtain the performance boundary contour. Density clustering is an effective clustering method suitable for processing a set of boundary points with noise. By aggregating boundary points, a clearer and more intuitive performance boundary contour is obtained. Based on the performance boundary contour and performance clustering results, the performance indicators of each performance clustering cluster are comprehensively calculated. The mean, standard deviation and boundary characteristics of the performance indicators of each clustering cluster are calculated to comprehensively evaluate the performance status of each clustering cluster. The mean represents the central characteristics of the clustering cluster, the standard deviation reflects the degree of discreteness of the data within the cluster, and the boundary characteristics describe the extreme performance of the clustering cluster.
[0020] 106. Based on the comprehensive performance evaluation result, dynamically optimize the first test strategy and output a second test strategy.
[0021] Specifically, the comprehensive performance evaluation results are decomposed, and the performance indicators, clustering information and boundary features of each module of AI SOC are extracted to obtain the performance evaluation feature set. The feature information includes the performance and performance boundaries of each module in different scenarios, as well as the feature relationship obtained through cluster analysis, so that the overall performance evaluation can be split into a more fine-grained set of indicators, which is convenient for personalized test strategy design for each module. Based on the performance evaluation feature set, a decision tree model is constructed, and the performance indicators are used as feature inputs, clustering information and boundary features are used as target variables. The model is trained to obtain performance classification rules. The decision tree is an easy-to-interpret and well-performing machine learning model. By continuously dividing the feature space, a tree structure that can be used for classification and prediction is formed. After the training is completed, each leaf node corresponds to a performance category, so that the decision tree model can generate specific classification results for each performance feature point, revealing the key factors and their interactions that affect the performance of each module. The performance classification rules are extracted, and the decision path of the decision tree is converted into a test rule in the form of IF-THEN to form a preliminary optimization strategy set. The IF-THEN rule has a clear logical structure and is easy to understand and implement. For example, when the value of certain features exceeds a certain threshold, the system performance will deteriorate. By converting these conditions into IF-THEN rules, the test strategy can detect these potential problems more specifically. The preliminary optimization strategy set consists of multiple specific test rules, each of which represents a specific test scenario and countermeasures. Based on the preliminary optimization strategy set, a reinforcement learning environment is designed, and the test strategy is used as the action space, the performance indicator is used as the state space, and the test effect is used as the reward function to establish a reinforcement learning model. The main goal of the reinforcement learning model is to optimize the test strategy and improve the coverage and effectiveness of the test through continuous exploration and trial and error in the simulation environment. Reinforcement learning can adaptively adjust the test strategy in order to find the optimal solution, making the test process more efficient and comprehensive. The test strategy as an action space means that different test strategies are selected and implemented in different scenarios, and the state space of the performance indicator reflects the performance of the AI SOC under different strategies. The test effect is used as a reward function to ensure that each strategy selection can maximize the effectiveness of the test. The reinforcement learning model is trained using the Deep Q Network (DQN) algorithm. DQN is a method that combines deep learning and reinforcement learning. By using a neural network to approximate the Q-value function, the model can handle complex and high-dimensional state spaces. During the training process, the test strategy is optimized through multiple rounds of iterations to continuously improve the model's perception and decision-making capabilities of the performance state, and an optimized test strategy set is obtained. The optimized test strategy set is cross-validated, and the generalization performance of each strategy is evaluated using historical test data to obtain a strategy scoring matrix.The cross-validation process ensures the adaptability and reliability of the test strategy in different scenarios. By scoring the performance of each strategy, the optimal strategy is identified and the strategies with poor performance are eliminated. Based on the strategy scoring matrix, the test strategies are combined and optimized, and new strategy combinations are generated through crossover and mutation operations to obtain the optimal test strategy combination. The crossover operation combines two high-scoring test strategy parts to generate a more superior new strategy, while the mutation operation randomly adjusts certain parts of the strategy to increase the diversity of the strategy 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 schemes, and execution order are adjusted accordingly to output the second test strategy.
[0022] In the embodiment of the present invention, the functional modules and the actual use environment of the AI SOC are accurately simulated by combining FPGA hardware simulation and software simulation, thereby improving the authenticity and comprehensiveness of the test. Based on the analysis of historical test data, test cases are dynamically generated and optimized to improve the test coverage and pertinence. Multiple test controllers are used to execute test tasks in parallel, and the interference between modules is compensated in real time, thereby improving the test efficiency and accuracy. Through multi-scale feature extraction and cross-batch alignment technology, the comparability problem of AI SOC performance data of different batches is solved, and the reliability of the test results is enhanced. By adopting multi-dimensional clustering analysis and performance boundary identification methods based on neighbor boundary degree, accurate evaluation and anomaly detection of AI SOC performance are achieved. Based on the comprehensive performance evaluation results, reinforcement learning and other algorithms are used to dynamically optimize the test strategy to improve the efficiency and accuracy of the test.
[0023] In a specific embodiment, the process of executing step 101 may specifically include the following steps: Based on the preset 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 reasoning unit to obtain a functional division result; Based on the functional division results, a hardware simulator is built using FPGA to simulate the core computing unit, storage unit, and communication interface of the AI SoC. The hardware simulator is then parameterized to set the clock frequency, storage capacity, and interface bandwidth consistent with the actual AI SoC. Based on the hardware simulator, a software simulation system is created to simulate the video decoding, audio processing and network communication functions of the set-top box operating system. The software simulation system is configured with scenarios to establish a test database that includes high-definition video playback, online streaming media and game operation. Based on the test database, multiple test controllers are set up, and a master-slave architecture is used to allocate test tasks and manage test resources. The test controllers are also given permissions so that the master test controller is responsible for global test strategy formulation and resource allocation, and the slave test controller is responsible for specific module test execution. Integrate the hardware simulator, software simulation system and test controller to build a modular test environment.
[0024] Specifically, based on the preset 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 reasoning unit to obtain specific functional division results. The video processing unit decodes, renders and displays the video signal received by the set-top box, including decoding of high-definition video streams and multi-frame synchronous display; the audio processing unit is responsible for decoding, equalizing and outputting audio data, so that audio and video can be presented synchronously; the AI reasoning unit is used to process machine learning tasks, such as speech recognition, image recognition and other functions, and to reason and classify inputs through a neural network model. The division method enables subsequent tests to be more targeted, and each module is independently tested and verified to ensure the performance and stability of each module under its predetermined function. Based on the functional division results, a hardware simulator is built using FPGA (field programmable gate array) to simulate the core computing unit, storage unit and communication interface of the AI SOC. In the process of building the hardware simulator, the flexibility and programmability of the FPGA are fully utilized, enabling it to realistically simulate various functional units of the AI SOC. The hardware simulator is designed to be consistent with the parameters of the actual AI SOC, and the FPGA is configured with corresponding parameters to make it consistent with the actual AI SOC in terms of clock frequency, storage capacity, and interface bandwidth. For example, assuming the clock frequency of AISOC is , the storage capacity is , the interface bandwidth is , then configure these parameters on the FPGA to ensure that the hardware simulator can match the real environment in terms of timing and data throughput, and ensure the accuracy and effectiveness of the test results. The clock frequency determines the running speed of the hardware simulator, while the storage capacity and interface bandwidth directly affect the ability to process and transmit data. Create a software simulation system based on the hardware simulator to simulate the functional modules responsible for video decoding, audio processing and network communication in the set-top box operating system. The creation of the software simulation system is to provide a more realistic test environment from the software level, so that the coordination and interaction of different functional modules can be fully verified in the simulation environment. In order to make the test cover more actual application scenarios, the software simulation system is configured with scenarios, and a test database including high-definition video playback, online streaming media and game running is established. The high-definition video playback scenario is used to test the decoding capability and frame synchronization capability of the video processing unit, the online streaming media scenario is used to test the synchronization performance of video and audio when the network bandwidth changes, and the game running scenario is to test the reasoning speed and responsiveness of the Al reasoning unit. For example, for high-definition video playback, assuming the video frame rate is frames per second, each frame size is bytes, you need to ensure that the bandwidth of the hardware simulator meets transmission requirements to ensure the smoothness of video playback. In order to make the test process efficient and have good scalability, multiple test controllers are set up based on the test database, and a master-slave architecture is used to allocate and manage test tasks. In this architecture, the master test controller is responsible for the formulation of global test strategies, the overall allocation of resources, and the management of test tasks, while the slave test controller is responsible for the test execution of specific modules. Configure permissions for the test controllers to ensure that the master test controller has global management and coordination permissions, while the slave test controller can independently complete the test tasks of specific modules, thereby ensuring sufficient modular flexibility while ensuring centralized management of the test process. The master-slave architecture setting can make full use of computing resources and execute tests of different modules in parallel, thereby shortening the execution time of the entire test. For example, suppose there is a system The master test controller divides the total test task set into , and assigned to each slave test controller to realize parallel test process. The hardware simulator, software simulation system and test controller are systematically integrated to build a modular test environment. The purpose of system integration is to enable various modules to work together in a unified test environment to jointly complete the testing and performance evaluation of AI SOC. The hardware simulator provides underlying hardware support to ensure that the data flow is correctly processed at the hardware level, while the software simulation system provides software interfaces and application environment for the hardware simulator, so that the performance of different functional modules in actual application scenarios can be fully tested. In this integrated environment, the test controller interacts with the hardware simulator and software simulation system to perform various test tasks, collect performance data of each module, and analyze and evaluate the performance and stability of the functional modules based on the test results.
[0025] In a specific embodiment, the process of executing step 102 may specifically include the following steps: Perform data cleaning and standardization on historical test data to obtain a standardized historical test data set. Perform feature extraction and dimensionality reduction based on the standardized historical test data set to identify feature data sets that affect AI SOC performance. Perform multi-dimensional analysis on the feature data set, divide the test scenarios into three categories: normal operation, boundary conditions, and abnormal conditions, and obtain the test scenario classification results; Based on the test scenario classification results, build test case generation rules, including the trigger conditions and data ranges of various scenarios, and obtain test case generation templates; Apply the test case generation template to new test data to dynamically generate a basic test case set that adapts to the current AI SOC characteristics, and combine and mutate the basic test case set to generate complex test scenarios covering multi-module interactions to obtain an extended test case set; Based on the extended test case set, test cases are deduplicated and merged to eliminate redundant and repeated test content to obtain a streamlined test case set, and the streamlined test case set is prioritized to obtain a test case set.
[0026] Specifically, the historical test data is cleaned and standardized to obtain a standardized historical test data set. The purpose of data cleaning is to remove noise, missing values, and outliers in the historical test data to ensure the accuracy and completeness of the data. In this process, the missing values are processed using interpolation or mean filling methods. For example, assuming that a test indicator value in the data set is missing, it is recorded as , calculate the mean of its neighboring data by the mean filling method , then As The data is filled with the value of to ensure the continuity and consistency of the data. After data cleaning, the data is standardized to eliminate the deviation caused by different dimensions between different test indicators and ensure that all features are in the same range. Subtract the mean from each feature and divide it by the standard deviation. Suppose a test feature is , and its standardized value is , then there is the formula: ; in, represents the original test eigenvalue, is the mean value of this feature, is the standard deviation of the feature. Through standardization, the data of all features are adjusted to the same scale. Based on the obtained normalized historical test data set, feature extraction and dimensionality reduction are performed to identify the feature data set that affects the performance of AI SOC. In the feature extraction process, methods such as principal component analysis are used to reduce the dimensionality of high-dimensional data to find the most representative features in the data and eliminate redundant information. For example, suppose the original feature set contains multiple features , through principal component analysis dimensionality reduction, we get a low-dimensional feature set ,in , the reduced-dimensional features can better reflect the main performance factors of AISOC, reduce the computational complexity and improve the generalization ability of the model. The feature data set is analyzed in multiple dimensions, and the test scenarios are divided into three categories: normal operation, boundary conditions and abnormal conditions, to obtain the classification results of the test scenarios. Normal operation scenarios refer to the performance of AI SOC under standard working conditions, such as high-definition video decoding capabilities under stable networks and normal temperature environments; boundary conditions refer to the performance of AI SOC under extreme environments, such as high load or low power consumption modes. This test is used to evaluate the system's extreme tolerance; abnormal conditions involve various uncommon or unexpected situations, such as network interruption, exceeding the temperature range, etc. Scenario classification helps to fully cover different working states and ensure that the test can effectively verify the performance of AI SOC under various possible conditions. Based on the classification results of the test scenarios, test case generation rules are constructed, including the trigger conditions and data ranges of various scenarios, to obtain test case generation templates. The formulation of test case generation rules is to ensure that the tests in each scenario are targeted and repeatable. For example, for boundary condition scenarios, the input data of the system is adjusted to the limit value, and a set of use case templates suitable for different test scenarios are generated by setting the input test scenarios. Apply the test case generation template to new test data to dynamically generate a basic test case set that adapts to the current AISOC characteristics. In order to expand the coverage and depth of the test, the basic test case set is combined and mutated to generate complex test scenarios covering multi-module interactions to obtain an extended test case set. For example, the test cases of the video processing unit and the AI reasoning unit are combined to simulate the collaborative work of video analysis and processing in edge computing scenarios, or some input data are randomly mutated to generate unexpected inputs to test the performance of the system when faced with abnormal inputs. Based on the extended test case set, test cases are deduplicated and merged to eliminate redundant and repeated test content to obtain a streamlined test case set. Priority assessment is performed on the streamlined test case set, and test cases are sorted by priority based on the degree of impact of each test scenario on system performance and the size of the risk to obtain the final test case set.
[0027] In a specific embodiment, the process of executing step 103 may specifically include the following steps: Decompose the test case set into different test task groups to obtain a test task allocation plan, and assign tasks to multiple test controllers based on the test task allocation plan, assign the test task groups to corresponding test controllers, and obtain a test controller task list; According to the test controller task list, each test controller is started in parallel, and multiple test tasks are executed at the same time 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; Based on the interference intensity data, the interference compensation parameters are calculated to compensate the interference in the test process in real time to obtain the compensated test data; Collect and store the compensated test data, record the performance indicators of each module of the AI SOC in different test scenarios, and obtain a first performance data set; Based on the first performance data set, a data integrity check is performed, missing or abnormal data points are marked and supplemented, and a second performance data set is obtained; A preliminary analysis is performed on the second performance data set to calculate the processing speed, resource utilization, and power consumption of each module of the AI SOC, and obtain the original performance data of each module of the AI SOC.
[0028] Specifically, the test case set is task-decomposed, and the test cases are divided into different test task groups to obtain a reasonable test task allocation plan. The test case set is reasonably allocated to different test controllers to achieve parallel testing and improve test efficiency. By analyzing the correlation and dependency between test cases, the test case set is split into independent test task groups to ensure that the tasks in each group are executed independently. For example, suppose the test case set Contains multiple test cases , which is divided into ,in , the execution of these test task groups does not depend on each other, so they are executed in parallel. Based on the task allocation scheme, tasks are allocated to multiple test controllers, and each test task group is assigned to the corresponding test controller to form a test controller task list. Assume that there is A test controller, denoted as , each test controller Assigned one or more test task groups , then the test controller task list is expressed as , ensuring that each test controller can independently complete its assigned test tasks. The rationality of task allocation is to ensure load balancing during the test process to avoid overloading or idleness of some controllers, thereby improving the overall test efficiency. Based on the test controller task list, each test controller is started in parallel, and multiple test tasks are executed at the same time to obtain the initial results of parallel testing. The advantage of parallel testing is that it can make full use of hardware resources, shorten the test time, and cover more test scenarios at the same time. In the process of multiple test controllers executing test tasks at the same time, mutual interference will occur between modules, affecting the accuracy of the test results. Therefore, the initial results of the parallel test are monitored in real time, the interference between modules is detected, and the interference intensity data is obtained. Assume that the output signal of a module is , which is disturbed during the parallel testing process and becomes , then the interference strength is expressed by calculating the signal difference: ; in, is the interference intensity, is the total time of the test, and are the original signal and the signal after interference, respectively. By calculating the interference intensity, the interference degree between modules is evaluated, and corresponding measures are taken to compensate. Based on the obtained interference intensity data, the interference compensation parameters are calculated to compensate for the interference in the test process in real time and obtain the compensated test data. The interfered data is restored to a state as close to the real state as possible. Assume that the interference compensation parameters are , then the compensated signal It is expressed as: ; in, is the compensated signal, is the compensation coefficient, which is determined according to the interference intensity and system characteristics. By compensating the test data, the impact of inter-module interference on the test results is minimized, and the accuracy and reliability of the test data are improved. The compensated test data is collected and stored, and the performance indicators of each module of the AI SOC in different test scenarios are recorded to obtain the first performance data set. For example, in the high-definition video playback test scenario, the frame rate, frame loss rate, decoding delay and other indicators of the video processing module are recorded, while in the AI reasoning module test, the reasoning time and accuracy are recorded. Based on the first performance data set, a data integrity check is performed to mark and supplement missing or abnormal data points. Through the data integrity check, the missing or abnormal data points are identified, and interpolation or retesting is used to supplement them. For example, suppose that at a certain point in time, the performance indicator value is missing, recorded as , supplemented by linear interpolation, the supplemented value is: ; in, and is the performance index value at adjacent time points. In this way, a complete and continuous performance data set is obtained. A preliminary analysis is performed on the second performance data set to calculate the processing speed, resource utilization, and power consumption of each module of the AI SOC to obtain the original performance data of each module. The processing speed is calculated by the total time of executing the task. Assuming that a module is in the time interval Processed internally tasks, the processing speed It is expressed as: ; in, For processing speed, is the number of tasks to be processed, The resource utilization is calculated by counting the resource usage of the module during the test, such as CPU usage, memory usage, etc. The power consumption is measured by external power acquisition equipment on the current and voltage of the module under different loads, and the power value is calculated.
[0029] In a specific embodiment, the process of executing step 104 may specifically include the following steps: Perform seasonal trend decomposition on the original performance data, decompose each performance indicator series into trend terms, seasonal terms and residual terms, where the trend terms reflect long-term changes, the seasonal terms represent cyclical fluctuations, and the residual terms represent short-term fluctuations, and obtain the decomposed performance data set; Based on the decomposed performance data set, feature extraction is performed on trend terms, seasonal terms and residual terms respectively. The slope and curvature of the trend term are calculated, the period and amplitude of the seasonal term are extracted, and the variance and kurtosis of the residual term are calculated to obtain a multi-scale feature set containing long-term, periodic and short-term features. Perform discrete wavelet transform on each time series in the multi-scale feature set, use Daubechies wavelet basis function to perform 5-layer decomposition, extract approximate coefficients and detail coefficients in different frequency domains, and obtain a frequency domain feature set containing low-frequency, medium-frequency and high-frequency information; Based on the frequency domain feature set, a multi-head attention network is constructed to perform self-attention calculation on features of different scales and frequency domains to obtain an attention weight matrix, and the attention weight matrix is used to perform weighted summation of features to obtain a fused feature set. Perform kernel principal component analysis on the fused feature set, select radial basis function as the kernel function, obtain the principal components by solving the eigenvalue problem, and obtain the feature set after dimensionality reduction; Based on the feature set after dimensionality reduction, the multi-core maximum mean difference method is used, and the linear kernel, polynomial kernel, and Gaussian kernel are selected as the basic kernel functions to calculate the distance matrix of the feature distribution between different batches of AI SOCs to obtain the batch difference matrix; Perform feature alignment on the batch difference matrix, minimize the feature distribution difference and classification error between the source domain and the target domain, map the features of different batches to a common feature space, and obtain a feature set aligned between batches; 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 standardized performance indicator set.
[0030] Specifically, seasonal trend decomposition is performed on the original performance data, and each performance indicator sequence is decomposed into trend terms, seasonal terms, and residual terms. Use time series analysis tools, such as STL or classic addition or multiplication decomposition models. In the decomposition process, the trend term is used to describe the long-term change trend in the data series, reflecting the overall change of system performance over time; the seasonal term is used to describe periodic fluctuations, indicating the impact of certain periodic factors (such as day and night alternation, weekly fluctuations, etc.) on performance; the residual term represents short-term fluctuations, that is, those random changes that cannot be explained by trend and seasonal factors. Through this decomposition method, the different components in the original performance data are understood to obtain the decomposed performance data set. Based on the decomposed performance data set, feature extraction is performed on the trend term, seasonal term, and residual term to construct a multi-scale feature set. Feature extraction of trend terms includes calculating slope and curvature to describe the speed and shape of long-term performance changes. Assume that the trend term is a function , whose slope is calculated by taking the derivative with respect to time: ; in, represents the slope of the trend term, is the trend item, is time. The positive or negative slope reflects whether the system performance shows an upward or downward trend. The curvature is represented by the second-order derivative. The curvature can describe the degree of bending of the trend term at a certain point, that is, the acceleration or deceleration characteristics of long-term changes. For seasonal terms, feature extraction includes the calculation of cycle and amplitude. The cycle refers to the repetition interval of the seasonal term, such as weekly, monthly, etc.; the amplitude refers to the range of variation of the seasonal term. The larger the amplitude, the more violent the system fluctuations in the cycle. For the residual term, calculate its variance and kurtosis. The variance is used to measure the intensity of short-term fluctuations. Assuming the residual term is , and its variance is expressed as: ; in, is the variance of the residual term, For the The residual value at each time point, is the mean value of the residual term, is the number of data points. Kurtosis is used to describe the peak characteristics of the residual term and reflects the frequency of extreme fluctuations in the data. After completing the feature extraction of the trend term, seasonal term and residual term, a discrete wavelet transform is performed on each time series in the multi-scale feature set to extract information in different frequency domains. The Daubechies wavelet basis function is used to perform a five-layer decomposition on each time series. Through wavelet transform, the time series is decomposed into low-frequency approximate coefficients and high-frequency detail coefficients, and a frequency domain feature set containing low-frequency, medium-frequency and high-frequency information is obtained. The low-frequency component mainly reflects the overall change trend of the time series, while the high-frequency component reflects the short-term fluctuations and abnormal characteristics in the data. Through multi-layer decomposition, information of 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 calculation on features of different scales and frequency domains. The multi-head attention mechanism performs weighted calculations on the input features from multiple angles through different heads to generate an attention weight matrix. The attention weight matrix is used to measure the importance of different features in a given context, which can effectively highlight key features and suppress irrelevant features. Assume the input feature is a matrix , the attention weight matrix is , then the weighted summed fusion feature set is expressed as: ; in, represents the fusion feature set, is the attention weight matrix, is the input feature matrix. Through the multi-head attention network, the features of different scales and frequency domains are fully integrated to obtain a feature representation containing comprehensive information. The fused feature set is subjected to kernel principal component analysis, and the radial basis function is selected as the kernel function. Kernel principal component analysis is a nonlinear dimensionality reduction method that can better capture the intrinsic structure of the data by mapping the data to a high-dimensional space. The radial basis function is a commonly used kernel function, and its form is: ; in, are two eigenvectors and The kernel function value between is the kernel width parameter. By solving the eigenvalue problem, the principal components of the data in the high-dimensional space are obtained, thereby achieving feature dimensionality reduction and obtaining the feature set after dimensionality reduction. Based on the feature set after dimensionality reduction, the multi-core maximum mean difference method is used to select linear kernel, polynomial kernel and Gaussian kernel as the basic kernel function, and calculate the distance matrix of the feature distribution between different batches of AI SOC to obtain the batch difference matrix. The multi-core maximum mean difference method can effectively measure the distribution differences of different batches of data. Assuming that the features of different batches are and , then the batch difference matrix It is represented by the mean difference of the kernel function: ; in, is the batch difference, is the basic kernel function value, and Respectively indicate batches and batch The feature vectors in . The batch difference matrix is feature aligned, and the domain-adversarial neural network method (DANN) is used to map the features of different batches to a common feature space by minimizing the feature distribution difference between the source domain and the target domain while reducing the classification error to obtain a batch-aligned feature set. DANN uses adversarial training to make the features generated by the feature extractor as similar as possible between different batches, thereby achieving batch-independent feature representation. 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 standardized set of performance indicators.
[0031] In a specific embodiment, the process of executing step 105 may specifically include the following steps: Based on the standardized performance indicator set, a Gaussian mixture model is used for multidimensional clustering analysis, and the model parameters are iteratively optimized through the expectation maximization algorithm to obtain k performance clusters. Calculate the silhouette coefficients of the k performance clustering clusters, evaluate the clustering effect, select the clustering result with the largest silhouette coefficient as the optimal clustering solution, and obtain the performance clustering result; 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 between these k nearest neighbors and their respective k nearest neighbors to obtain the local anomaly factor of each data point; Perform threshold screening on local anomaly factors, select data points whose anomaly factors are greater than the preset threshold as candidate performance boundary points, and obtain a preliminary performance boundary point set; 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; Density clustering is performed on the neighbor boundary degree matrix to aggregate adjacent boundary points with similar neighbor boundary degrees into continuous boundary line segments to obtain the performance boundary contour; Based on the performance boundary contour and performance clustering results, the mean, standard deviation and boundary characteristics of the performance indicators of each performance clustering cluster are calculated, the performance status of the AI SOC module is comprehensively evaluated, and the comprehensive performance evaluation results are obtained.
[0032] Specifically, based on a standardized set of performance indicators, a Gaussian mixture model is used to perform multidimensional clustering analysis. The Gaussian mixture model is a probabilistic model used to describe the multidimensional distribution of data. It clusters the data by assuming that the data is a linear combination of several Gaussian distributions. In order to find the best parameters, the Gaussian mixture model uses the expectation maximization 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, and the maximization step updates the parameters of the Gaussian distribution according to the probability, including the mean, variance, and weight. Through multiple iterations, the EM algorithm eventually maximizes the log-likelihood function of the model, and obtains Performance clustering clusters. The clustering effect of the performance clustering clusters is evaluated. The silhouette coefficient of each cluster is calculated. The silhouette coefficient is an indicator for evaluating the quality of clustering, combining the compactness within the cluster and the separation between clusters. Suppose a data point is , the average distance within the cluster is , and its average distance to the nearest cluster is , then the silhouette coefficient of the data point is It is expressed as: ; in, The value range of is between [-1, 1]. The larger the value, the closer the data point is to other points in its cluster and the more separated it is 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 clustering result with the largest silhouette coefficient as the optimal clustering solution, the final performance clustering result is obtained to ensure the rationality and quality of the clustering result. Based on the performance clustering result, the average silhouette coefficient of each data point is calculated. The average distance of the nearest neighbors, and neighbors to their respective The average distance of the nearest neighbors is compared to obtain the local anomaly factor of each data point. The local anomaly factor is used to measure the degree of anomaly of a data point in a local area and can effectively identify anomalies in a cluster. Assume that the data point of The neighbor set is , then the data point With The average distance of the nearest neighbors is expressed as: ; in, Represents data points Its neighbors The distance between them. By calculating the local anomaly factor of each data point, we can get those data points with a high degree of anomaly. We perform threshold screening on the local anomaly factor and select data points with an anomaly factor greater than the preset threshold as performance boundary candidate points to get a preliminary set of performance boundary points. The performance boundary candidate points are located at the edge of the cluster, representing the limit state of system performance, which helps to further analyze the robustness and boundary performance of the system. After getting the preliminary set of performance boundary points, we calculate the neighbor boundary degree of each boundary point. The neighbor boundary degree is defined as The proportion of the nearest neighbors that belong to the boundary points. Assume that the boundary points are , its neighbor set is , where the number of boundary points is , then the neighbor boundary degree is expressed as: ; in, Represents boundary points 's neighbor boundary degree. By calculating the neighbor boundary degree of each boundary point, the boundary characteristics of the boundary point in its local area are quantified to obtain the neighbor boundary degree matrix. The neighbor boundary degree matrix is density clustered to aggregate adjacent boundary points with similar neighbor boundary degrees into continuous boundary segments to obtain the performance boundary contour. Density clustering (such as DBSCAN) is a density-based clustering method that can aggregate dense boundary points into clusters while excluding isolated noise points. Through this aggregation, a clear performance boundary contour is formed to describe the boundary range of AI SOC performance under different conditions. Based on the performance boundary contour and performance clustering results, the mean, standard deviation and boundary characteristics of the performance indicators of each performance clustering cluster are calculated to comprehensively evaluate the performance status of the AI SOC module. For example, suppose a cluster contains data points, the performance index is , then the mean and standard deviation of the cluster are: ; in, is the mean value of the performance index, is the standard deviation, which reflects the central characteristics and discreteness of the cluster. Based on the boundary contour, the boundary characteristics of the cluster are determined, such as the distribution density and boundary range of the boundary points, so as to describe the performance limit of the system in detail.
[0033] In a specific embodiment, the process of executing step 106 may specifically include the following steps: Decompose the comprehensive performance evaluation results, extract the performance indicators, clustering information and boundary features of each module of AI SOC, and obtain the performance evaluation feature set; Based on the performance evaluation feature set, a decision tree model is constructed, with performance indicators as features, clustering and boundary information as target variables, and performance classification rules are obtained through training; Extract the performance classification rules, convert the decision path into the test rules in the form of IF-THEN, and obtain the preliminary optimization strategy set; Based on the preliminary optimization strategy set, a reinforcement learning environment is designed, the test strategy is used as the action space, the performance index is used as the state space, and the test effect is used as the reward function to obtain the reinforcement learning model; Use the deep Q network algorithm to train the reinforcement learning model, optimize the test strategy through multiple rounds of iterations, obtain the optimized test strategy set, and cross-validate the optimized test strategy set. Use historical test data to evaluate the generalization performance of each test strategy and obtain the strategy scoring matrix. Optimize the test strategy combination based on the strategy scoring matrix, generate new strategy combinations through crossover and mutation operations, and obtain the optimal test strategy combination; The optimal test strategy combination is integrated with the first test strategy, the test case generation rules, resource allocation scheme and execution order are adjusted, and the second test strategy is output.
[0034] Specifically, the comprehensive performance evaluation results are decomposed to extract the performance indicators, clustering information and boundary features of each module of the AI SOC to form a performance evaluation feature set, including data such as the processing speed, resource utilization and power consumption of each module. The clustering information describes the performance and distribution characteristics of different modules under similar features, and the boundary features are used to characterize the limits and abnormal states of system performance. By integrating this information into a performance evaluation feature set, it is convenient for subsequent modeling and strategy optimization analysis. Based on the obtained performance evaluation feature set, a decision tree model is constructed, and the performance indicators are used as input features, clustering information and boundary features are used as target variables. Model training is performed to obtain classification rules for system performance. The decision tree model forms a tree structure by continuously dividing the feature space, and its leaf nodes represent different classification results. Suppose an indicator in the performance feature set is , then the decision tree can be split by maximizing the information gain. For example, at each split node, the information gain Calculated by the following formula: ; in, represents the information entropy of the parent node, Indicates The information entropy of child nodes is Indicates The number of samples in the child nodes, is the total number of samples. In this way, the decision tree model can effectively extract the performance of each module under different characteristic conditions and generate a set of rules for performance classification. The performance classification rules are extracted, and the decision path of the decision tree is converted into test rules in the form of IF-THEN to obtain a preliminary optimization strategy set. The IF-THEN rule is intuitive and easy to understand, making the subsequent test design clearer. For example, if the system's memory utilization exceeds a certain threshold and the CPU usage is within a specific range, the boundary performance test of a certain module is triggered. By gradually converting the decision path of the decision tree into clear IF-THEN conditions, specific test measures and response strategies can be provided for each scenario to form a set of preliminary optimized test strategies. Based on the preliminary optimization strategy set, a reinforcement learning environment is designed, with the test strategy as the action space, the performance indicator as the state space, and the test effect as the reward function, so as 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 simulation environment, thereby improving the coverage and effectiveness of the test. 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, power consumption, etc. 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 found. Assume that the current state is The action taken is , the updated status is , the corresponding reward is , the goal of the reinforcement learning model is to find a policy that maximizes the cumulative reward: ; in, is the state-action value function, describing the state Take Action The value of For instant rewards, is a discount factor used to balance current and future rewards. In order to optimize the reinforcement learning model, the deep Q network (DQN) algorithm is used to train the model. DQN uses a deep neural network to approximate the state-action value function, so that the model can handle complex and high-dimensional state spaces. In multiple rounds of iterations, DQN continuously adjusts the strategy, optimizes the Q value function through the feedback of each test, and gradually improves the effectiveness and coverage of the test strategy. After sufficient training, a set of optimized test strategy sets is finally obtained. The optimized test strategy set is cross-validated, and the generalization performance of each strategy is evaluated using historical test data to obtain a strategy scoring matrix. The purpose of cross-validation is to ensure the applicability and stability of these strategies in different scenarios. The scoring matrix is used to quantify the performance of each strategy, such as test coverage and problem discovery ability. Based on the strategy scoring matrix, the combination of test strategies is optimized, and new strategy combinations are generated through crossover and mutation operations to obtain the optimal test strategy combination. The crossover operation refers to selecting some strategies from two high-scoring test strategies and combining them together to generate a new strategy, while the mutation operation randomly changes certain parts of the strategy to explore new possibilities. Through multiple crossovers and mutations, a new set of test strategy combinations is generated. After scoring, the best performing one is selected as the optimal test strategy combination. The optimal test strategy combination is integrated with the initial first test strategy, and the test case generation rules, resource allocation scheme and execution order are adjusted accordingly to output the second test strategy. The test case generation rules are adjusted to better adapt to the current system performance characteristics and ensure that the test cases can cover the key performance boundaries of each module. For example, specific load test cases are generated when the memory usage is high to verify the extreme performance of the system. The resource allocation scheme is adjusted to reasonably allocate test resources so that the test controller can concentrate resources on testing high-risk modules, while the execution order is adjusted to prioritize the execution of test cases with higher importance to discover potential problems in the system as soon as possible.
[0035] The above describes the AI SOC modular unit testing method of the set-top box in the embodiment of the present invention. The following describes the AI SOC modular unit testing device of the set-top box in the embodiment of the present invention. Figure 2 , an embodiment of the AI SOC modular unit testing device of the set-top box in the embodiment of the present invention includes: Functional division module 201, used to perform functional division on the set-top box AI SOC module based on a preset first test strategy to build a modular test environment; An analysis module 202 is used to analyze historical test data based on a modular test environment and generate a test case set; An 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 original performance data of each module of the AI SOC; An extraction module 204 is used to perform multi-scale feature extraction and cross-batch alignment on the original performance data to obtain a standardized performance indicator set; Identification module 205, used to perform multi-dimensional cluster analysis on the standardized performance indicator set and identify the performance boundary based on the neighbor boundary degree to obtain a comprehensive performance evaluation result; The output module 206 is used to dynamically optimize the first test strategy based on the comprehensive performance evaluation result and output the second test strategy.
[0036] Through the collaborative cooperation of the above components, the functional modules and real usage environment of AI SOC are accurately simulated by combining FPGA hardware simulation and software simulation, which improves the authenticity and comprehensiveness of the test. Based on the analysis of historical test data, test cases are dynamically generated and optimized to improve the test coverage and pertinence. Multiple test controllers are used to execute test tasks in parallel and compensate for interference between modules in real time, which improves the test efficiency and accuracy. Through multi-scale feature extraction and cross-batch alignment technology, the comparability problem of AI SOC performance data of different batches is solved, and the reliability of test results is enhanced. Multi-dimensional clustering analysis and performance boundary identification methods based on neighbor boundary degree 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 to improve the efficiency and accuracy of the test.
[0037] above Figure 2 The AI SOC modular unit testing device of the set-top box in the embodiment of the present invention is described in detail from the perspective of modular functional entities. The AI SOC modular unit testing device of the set-top box in the embodiment of the present invention is described in detail from the perspective of hardware processing.
[0038] Figure 3It is a structural schematic diagram of an AI SOC modular unit test device for a set-top box provided by an embodiment of the present invention. The AI SOC modular unit test device 300 of the set-top box may have relatively large differences due to different configurations or performances, and may include one or more processors (central processing units, CPU) 310 (for example, one or more processors) and a memory 320, and one or more storage media 330 (for example, one or more mass storage device terminals) storing application programs 333 or data 332. Among them, the memory 320 and the storage medium 330 can be short-term storage or permanent storage. The program stored in the storage medium 330 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations in the AI SOC modular unit test device 300 of the set-top box. Furthermore, the processor 310 can be configured to communicate with the storage medium 330, and execute a series of instruction operations in the storage medium 330 on the AI SOC modular unit test device 300 of the set-top box to implement the steps of the above-mentioned AI SOC modular unit test method of the set-top box.
[0039] The AI SOC modular unit test device 300 for a set-top box may further include one or more power supplies 340, one or more wired or wireless network interfaces 350, one or more input and output interfaces 360, and / or one or more operating systems 331, such as Windows Serve, Mac OS X, Unix, Linux, FreeBSD, etc. It will be appreciated by those skilled in the art that Figure 3 The AI SOC modular unit test device structure of the set-top box shown does not constitute a limitation of the AI SOC modular unit test device of the set-top box provided by the present invention, and may include more or fewer components than shown in the figure, or a combination of certain components, or a different arrangement of components.
[0040] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the AI SOC modular unit testing method of the set-top box.
[0041] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described systems, systems and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0042] If the integrated unit is implemented in the form of 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 is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.
[0043] As described above, the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features thereof may be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A set-top box AI SOC modular unit testing method, characterized in that: The method comprises: Based on the preset first test strategy, the set-top box AI SOC module is functionally divided to build a modular test environment; Perform historical test data analysis based on the modular test environment to generate a test case set; Input the test case set into a multi-test controller, perform parallel testing and real-time interference compensation, and obtain raw performance data of each module of the AI SOC; Performing multi-scale feature extraction and cross-batch alignment on the original performance data to obtain a standardized performance indicator set; Performing multidimensional cluster analysis on the standardized performance indicator set and identifying performance boundaries based on neighbor boundary degrees to obtain a comprehensive performance evaluation result; Based on the comprehensive performance evaluation result, the first test strategy is dynamically optimized and a second test strategy is output.
2. The AI SOC modular unit testing method of a set-top box according to claim 1, characterized in that: The set-top box AI SOC module is functionally divided based on the preset first test strategy to build a modular test environment, including: Based on the preset 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 reasoning unit to obtain a functional division result; Based on the functional division results, a hardware simulator is constructed using FPGA to simulate the core computing unit, storage unit, and communication interface of the AI SOC, and parameters of the hardware simulator are configured to set a clock frequency, storage capacity, and interface bandwidth consistent with the actual AI SOC; Based on the hardware simulator, a software simulation system is created to simulate the video decoding, audio processing and network communication functions of the set-top box operating system, and the software simulation system is configured with scenarios to establish a test database including high-definition video playback, online streaming media and game operation; 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. The test controllers are given permissions so that the master test controller is responsible for global test strategy formulation and resource allocation, and the slave test controller is responsible for specific module test execution; The hardware simulator, the software simulation system and the test controller are system-integrated to construct a modular test environment.
3. The AI SOC modular unit testing method of a set-top box according to claim 1, characterized in that: The analyzing historical test data based on the modular test environment to generate a test case set includes: Perform data cleaning and standardization on the historical test data to obtain a standardized historical test data set, and perform feature extraction and dimensionality reduction based on the standardized historical test data set to identify feature data sets that affect the performance of the AI SOC; Performing a multi-dimensional analysis on the feature data set, dividing the test scenarios into three categories: normal operation, boundary conditions, and abnormal conditions, and obtaining a test scenario classification result; Based on the test scenario classification results, construct test case generation rules, including trigger conditions and data ranges for various scenarios, to obtain a test case generation template; Applying the test case generation template to new test data, dynamically generating a basic test case set adapted to the current AI SOC characteristics, and combining and mutating the basic test case set to generate a complex test scenario covering multi-module interactions, thereby obtaining an extended test case set; Based on the extended test case set, test case deduplication and merging are performed to eliminate redundant and repeated test content to obtain a streamlined test case set, and the streamlined test case set is evaluated for priority to obtain a test case set.
4. The AI SOC modular unit testing method of a set-top box according to claim 1, characterized in that: The test case set is input into a multi-test controller, parallel testing and real-time interference compensation are performed, and original performance data of each module of the AI SOC is obtained, including: Decomposing the test case set into different test task groups to obtain a test task allocation scheme, and allocating tasks to multiple test controllers based on the test task allocation scheme, allocating the test task groups to corresponding test controllers to obtain a test controller task list; According to the test controller task list, each test controller is started in parallel, and multiple test tasks are executed at the same time to obtain the initial results of the parallel test, and the initial results of the parallel test are monitored in real time to detect the interference between modules and obtain the interference intensity data; Based on the interference intensity data, interference compensation parameters are calculated to compensate for interference during the test in real time to obtain compensated test data; Collecting and storing the compensated test data, recording the performance indicators of each module of the AI SOC in different test scenarios, and obtaining a first performance data set; Based on the first performance data set, a data integrity check is performed, and missing or abnormal data points are marked and supplemented to obtain a second performance data set; A preliminary analysis is performed on the second performance data set to calculate the processing speed, resource utilization, and power consumption of each module of the AI SOC to obtain the original performance data of each module of the AI SOC.
5. The AI SOC modular unit testing method of a set-top box according to claim 1, characterized in that: The multi-scale feature extraction and cross-batch alignment of the original performance data are performed to obtain a standardized performance indicator set, including: Perform seasonal trend decomposition on the original performance data, decomposing each performance indicator series into a trend item, a seasonal item and a residual item, wherein the trend item reflects long-term changes, the seasonal item represents periodic fluctuations, and the residual item represents short-term fluctuations, to obtain a decomposed performance data set; Based on the decomposed performance data set, feature extraction is performed on the trend item, seasonal item and residual item respectively, the slope and curvature of the trend item are calculated, the period and amplitude of the seasonal item are extracted, and the variance and kurtosis of the residual item are calculated to obtain a multi-scale feature set including long-term, periodic and short-term features; Performing discrete wavelet transform on each time series in the multi-scale feature set, performing 5-layer decomposition using Daubechies wavelet basis function, extracting approximate coefficients and detail coefficients in different frequency domains, and obtaining a frequency domain feature set containing low-frequency, medium-frequency and high-frequency information; 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 an attention weight matrix, and feature weighted summation is performed using the attention weight matrix to obtain a fused feature set; Performing kernel principal component analysis on the fused feature set, selecting radial basis function as the kernel function, obtaining principal components by solving the eigenvalue problem, and obtaining a feature set after dimensionality reduction; Based on the feature set after dimensionality reduction, a multi-core maximum mean difference method is used, and a linear kernel, a polynomial kernel, and a Gaussian kernel are selected as basic kernel functions to calculate the distance matrix of the feature distribution between different batches of AI SOCs to obtain a batch difference matrix; Performing feature alignment on the batch difference matrix while minimizing the feature distribution difference and classification error between the source domain and the target domain, mapping features of different batches to a common feature space, and obtaining a feature set aligned between batches; 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 standardized performance indicator set.
6. The AI SOC modular unit testing method of a set-top box according to claim 1, characterized in that: The multidimensional clustering analysis of the standardized performance indicator set and the performance boundary identification based on the neighbor boundary degree are performed to obtain a comprehensive performance evaluation result, including: Based on the standardized performance indicator set, a Gaussian mixture model is used to perform multidimensional cluster analysis, and the model parameters are iteratively optimized by an expectation maximization algorithm to obtain k performance clusters; Calculating the silhouette coefficients of the k performance clustering clusters, evaluating the clustering effect, selecting the clustering result with the largest silhouette coefficient as the optimal clustering solution, and obtaining the performance clustering result; 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 between the k nearest neighbors and their respective k nearest neighbors to obtain the local anomaly factor of each data point; Perform threshold screening on the local abnormal factors, select data points whose abnormal factors are greater than a preset threshold as performance boundary candidate points, and obtain a preliminary performance boundary point set; 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 a neighbor boundary degree matrix; Density clustering is performed on the neighbor boundary degree matrix to aggregate adjacent boundary points with similar neighbor boundary degrees into continuous boundary line segments to obtain a performance boundary contour; Based on the performance boundary profile and the performance clustering result, the performance indicator mean, standard deviation and boundary characteristics of each performance clustering cluster are calculated, the performance status of the AI SOC module is comprehensively evaluated, and a comprehensive performance evaluation result is obtained.
7. The AI SOC modular unit testing method of a set-top box according to claim 6, characterized in that: The dynamically optimizing the first test strategy based on the comprehensive performance evaluation result and outputting the second test strategy includes: Decomposing the comprehensive performance evaluation results, extracting performance indicators, clustering information, and boundary features of each module of the AI SOC, and obtaining a performance evaluation feature set; Based on the performance evaluation feature set, a decision tree model is constructed, the performance index is used as a feature, the clustering and boundary information is used as a target variable, and performance classification rules are obtained through training; Extracting the performance classification rules, converting the decision paths into test rules in the form of IF-THEN, and obtaining a preliminary optimization strategy set; Based on the preliminary optimization strategy set, a reinforcement learning environment is designed, the test strategy is used as the action space, the performance index is used as the state space, and the test effect is used 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 strategy is optimized through multiple rounds of iterations to obtain an optimized test strategy set, and the optimized test strategy set is cross-validated, and the generalization performance of each test strategy is evaluated using historical test data to obtain a strategy scoring matrix; Optimize the test strategy combination based on the strategy scoring matrix, generate new strategy combinations through crossover and mutation operations, and 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.
8. An AI SOC modular unit test device for a set-top box, characterized in that: The device is used to perform the AI SOC modular unit testing method of a set-top box according to any one of claims 1 to 7, comprising: A function division module, used for performing function division on the set-top box AI SOC module based on a preset first test strategy to build a modular test environment; An analysis module, used to analyze historical test data based on the modular test environment and generate a test case set; An execution module, used for inputting the test case set into a multi-test controller, performing parallel testing and real-time interference compensation, and obtaining original performance data of each module of the AI SOC; An extraction module, used for performing multi-scale feature extraction and cross-batch alignment on the original performance data to obtain a standardized performance indicator set; An identification module, used for performing multidimensional cluster analysis on the standardized performance indicator set and identifying performance boundaries based on neighbor boundary degrees to obtain a comprehensive performance evaluation result; An output module is used to dynamically optimize the first test strategy based on the comprehensive performance evaluation result and output a second test strategy.
9. An AI SOC modular unit test device for a set-top box, characterized in that: The AI SOC modular unit test device of the set-top box includes: a memory and at least one processor, wherein the memory stores instructions; The at least one processor calls the instructions in the memory to enable the AI SOC modular unit testing device of the set-top box to execute the AI SOC modular unit testing method of the set-top box according to any one of claims 1-7.
10. A computer-readable storage medium having instructions stored thereon, characterized in that: When the instructions are executed by the processor, the AI SOC modular unit testing method for the set-top box as described in any one of claims 1-7 is implemented.
Citation Information
Patent Citations
Automatic test equipment and method for network TV set-top box
CN101472191A
Intermittent process unequal-length batch data synchronization method based on kernel dynamic time warping
CN113221932A
Chip verification method and system
CN118095163A
Software operation test analysis method and system
CN118503115A
Chip verification method and device, equipment and storage medium
CN118780221A
Cited By
Method and system for generating and rechecking automatic test result of set top box
CN120916009A
A method and system for set-top box automated test result generation and review
CN120916009B
Reliability test method and system for folding screen mobile phone
CN120980162A
A reliability test method and system for a foldable-screen mobile phone
CN120980162B
Fault test method and system based on functional module, medium and equipment
CN121277147A