An edge intelligent device testing method, device, apparatus and storage medium
By generating and automating algorithm test cases, and monitoring and comparing the status parameters of edge intelligent devices, the problem of low testing efficiency for edge intelligent devices is solved, and efficient testing of multiple algorithms and software functions is achieved.
Patent Information
- Application Number
- CN202211348603.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-31
- Publication Date
- 2026-11-27
- Estimated Expiration
- 2042-10-31
AI Technical Summary
Testing edge intelligent devices is inefficient and labor-intensive, mainly because a lot of time and effort is spent on material preparation and test case design during the test preparation phase, making it difficult to comprehensively and effectively cover the impact of multi-algorithm fusion and software functionality.
By acquiring the current specifications and status information of edge intelligent devices, algorithm test cases are generated and executed automatically. The module status parameters are monitored, and mean processing and critical value comparison are performed to achieve automatic test case generation and execution.
It improves the testing efficiency of edge intelligent devices, reduces the manpower cost of test preparation, and enables comprehensive testing of multi-algorithm fusion and software functions.
Smart Images

Figure CN115712529B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a testing method, apparatus, device, and storage medium for edge intelligent devices. Background Technology
[0002] Edge intelligent devices are devices that deploy deep learning algorithms at the edge to generate data. They typically integrate multiple algorithms, such as facial recognition, smoke detection, lost item detection, people counting, and smoking detection. Edge intelligent devices analyze received external data (such as video stream data) through algorithms, outputting the analysis results, and then use these results to implement specific software functions.
[0003] As a new type of artificial intelligence product, edge intelligent devices differ from traditional software testing in the testing field. On one hand, it requires a focus on the performance metrics of multi-algorithm processing and analysis of data. Because edge intelligent devices incorporate multiple algorithms, compared to traditional single-algorithm testing, algorithm testing for edge intelligent devices not only needs to test the performance metrics of each algorithm but also requires designing test cases to test the impact of multi-algorithm fusion on the final software, metrics, and performance of the edge intelligent device. Simultaneously, algorithm testing in the edge intelligent device testing process requires a large amount of algorithm test material, and the recording and calibration of test material consumes significant manpower. On the other hand, it is also necessary to consider the impact of software functions on edge intelligent devices. Software function testing includes random testing during the execution of regular test cases. However, random testing requires various configuration changes and test case design, often making it difficult to comprehensively and effectively cover all aspects. Currently, the mainstream testing of edge intelligent devices involves pre-designing test cases for different test scenarios and preparing corresponding test materials, and then manually executing the test cases. Because testers currently spend a lot of time and energy on the early test preparation, including test material preparation and test case design, the testing efficiency of edge intelligent devices is low and the labor cost is high. Summary of the Invention
[0004] In view of this, the purpose of this application is to provide a testing method, apparatus, device, and storage medium for edge intelligent devices, which can automatically generate test cases and automatically execute test cases, thereby improving the testing efficiency of edge intelligent devices. The specific solution is as follows:
[0005] In a first aspect, this application discloses a testing method for edge intelligent devices, including:
[0006] Obtain the current specifications and status information of each edge intelligent device;
[0007] Based on the current specification parameters and the current status information, algorithm test cases are generated, and the algorithm test cases are assigned to the corresponding edge smart devices;
[0008] Run various algorithms in the edge intelligent device according to the algorithm test cases, and monitor the status parameters of each module in the edge intelligent device during the operation to obtain status parameter data;
[0009] The state parameter data within a preset time period are averaged to obtain an average calculation result. The average calculation result is then compared with the corresponding critical value of the module to obtain a comparison result, which is used to test various algorithms.
[0010] Optionally, the monitoring of the status parameters of each module in the edge intelligent device during operation to obtain status parameter data includes:
[0011] The status parameters of each module in the edge intelligent device are monitored at preset time intervals during operation to obtain status parameter data.
[0012] Optionally, after monitoring the status parameters of each module in the edge intelligent device during operation and obtaining the status parameter data, the method further includes:
[0013] The status parameter data is saved in the form of a file so that the abnormal module can be located and diagnosed by using the status parameter data and the operation log of the edge intelligent device.
[0014] Optionally, running various algorithms in the edge intelligent device according to the algorithm test cases includes:
[0015] The test materials corresponding to various algorithms in the edge intelligent device are acquired to obtain the initial test materials;
[0016] The initial test materials are fused and / or spliced to obtain the expanded test materials, so that the algorithm test cases can use the expanded test materials to run various algorithms in the edge intelligent device.
[0017] Optionally, after running various algorithms in the edge intelligent device using the expanded test materials, the process further includes:
[0018] The results of the material running for each of the algorithms are statistically analyzed to obtain statistical results, which are then used to verify the accuracy of the algorithm output results for each of the algorithms.
[0019] Optionally, the edge intelligent device testing method further includes:
[0020] All composable functional modules in the software functions of the edge intelligent device are statistically analyzed to obtain multiple target functional modules;
[0021] Software function test cases are generated using multiple target functional modules and based on a targeted combination method, so as to perform random testing of the software function using the software function test cases.
[0022] Optionally, comparing the mean calculation result with the corresponding critical value of the module to obtain a comparison result, so as to use the comparison result to test various algorithms, includes:
[0023] Each algorithm is determined to be normal if the mean calculation result is greater than the corresponding threshold value of the module. If all the mean calculation results are greater than the corresponding threshold value of the module, the algorithm is determined to be normal. If there is a case where the mean calculation result is not greater than the corresponding threshold value of the module, the edge intelligent device is determined to be abnormal.
[0024] Secondly, this application discloses an edge intelligent device testing apparatus, comprising:
[0025] The information acquisition module is used to acquire the current specifications and current status information of each edge intelligent device.
[0026] The algorithm test case generation module is used to generate algorithm test cases based on the current specification parameters and the current status information.
[0027] An algorithm test case allocation module is used to allocate the algorithm test cases to the corresponding edge smart devices;
[0028] The test material execution module is used to run various algorithms in the edge intelligent device according to the algorithm test cases;
[0029] The status parameter monitoring module is used to monitor the status parameters of each module in the edge intelligent device during operation and obtain status parameter data.
[0030] The mean processing module is used to perform mean processing on the state parameter data within a preset time period to obtain the mean calculation result;
[0031] The numerical comparison module is used to compare the mean calculation result with the corresponding critical value of the module to obtain the comparison result;
[0032] The algorithm testing module is used to test various algorithms using the comparison results.
[0033] Thirdly, this application discloses an electronic device, including a processor and a memory; wherein, when the processor executes a computer program stored in the memory, it implements the aforementioned edge intelligent device testing method.
[0034] Fourthly, this application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned edge intelligent device testing method.
[0035] As can be seen, this application first obtains the current specification parameters and current status information of each edge intelligent device, then generates algorithm test cases based on the current specification parameters and current status information, and assigns the algorithm test cases to the corresponding edge intelligent devices. Next, it runs various algorithms in the edge intelligent devices according to the algorithm test cases, and monitors the status parameters of each module in the edge intelligent devices during the operation to obtain status parameter data. Then, it performs average processing on the status parameter data within a preset time period to obtain an average calculation result, and compares the average calculation result with the critical value of the corresponding module to obtain a comparison result, so as to use the comparison result to test various algorithms. When testing various algorithms in edge intelligent devices, this application first uses the current specification parameters and current status information of each edge intelligent device to generate algorithm test cases, then runs various algorithms according to the algorithm test cases, and tests the algorithms by comparing the status parameter data monitored during the algorithm test case operation with the preset critical value. This achieves automatic test case generation and automated test case execution, improving the testing efficiency of edge intelligent devices. Attached Figure Description
[0036] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0037] Figure 1 This is a flowchart of a testing method for edge intelligent devices disclosed in this application;
[0038] Figure 2 This is a specific edge intelligent device system structure diagram disclosed in this application;
[0039] Figure 3 This is a schematic diagram of the initial state of a specific edge intelligent device test case disclosed in this application;
[0040] Figure 4This is a specific video frame fusion diagram disclosed in this application;
[0041] Figure 5 This is a schematic diagram of a CPU state curve under a specific normal state as disclosed in this application;
[0042] Figure 6 This is a schematic diagram of the CPU state curve under a specific abnormal state disclosed in this application;
[0043] Figure 7 This is a flowchart of a testing method for edge intelligent devices disclosed in this application;
[0044] Figure 8 A schematic diagram illustrating the generation of test cases for a specific edge intelligent device disclosed in this application;
[0045] Figure 9 This is a schematic diagram of a specific random testing method for software functions disclosed in this application;
[0046] Figure 10 This is a schematic diagram of the structure of an edge intelligent device testing device disclosed in this application;
[0047] Figure 11 This is a structural diagram of an electronic device disclosed in this application. Detailed Implementation
[0048] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0049] This application discloses a testing method for edge intelligent devices. (See also...) Figure 1 As shown, the method includes:
[0050] Step S11: Obtain the current specification parameters and current status information of each edge smart device.
[0051] In this embodiment, the current specification parameters and current status information of multiple edge intelligent devices are first obtained. The system structure diagram of the edge intelligent devices is shown below. Figure 2As shown, it specifically includes a data input module, an algorithm analysis module, an algorithm result module, and a software function module. Here, Vn represents the nth data stream, An represents the nth type of algorithm mounted on the edge intelligent device, and Dn represents the output result of the nth type of algorithm. It is understood that the number of data streams accessed varies depending on the specifications of the edge intelligent device, such as 4, 8, 16, or 32 streams, and the quantities of Vn, An, and Dn are not necessarily the same.
[0052] Specifically, the processing flow of the four modules in the edge intelligent device is as follows: First, the data input module acquires external input data, such as video stream data from an external camera, and performs encoding and decoding processing on the external input data. Then, the processed data is transmitted to the algorithm analysis module. After receiving the data sent by the data input module, the algorithm analysis module performs algorithm analysis on it. It should be noted that, unlike standalone algorithm analysis, the algorithm in the edge intelligent product can not only perform standalone algorithm analysis on a single data stream, but also run multiple algorithms simultaneously. For example, it can simultaneously perform facial recognition, behavior analysis, and fire emergency analysis on a single video stream. After performing the algorithm analysis, the algorithm analysis module inputs the results of the algorithm analysis to the algorithm result module. Finally, the algorithm result module inputs the results of the algorithm analysis to the software function module for further processing.
[0053] Step S12: Generate algorithm test cases based on the current specification parameters and the current status information, and assign the algorithm test cases to the corresponding edge smart devices.
[0054] In this embodiment, after obtaining the current specification parameters and current status information of each edge intelligent device, corresponding algorithm test cases can be generated based on the aforementioned current specification parameters and current status information. These algorithm test cases are then assigned to the corresponding edge intelligent devices. Specifically, the process of assigning algorithm test cases to the corresponding edge intelligent devices can be implemented through algorithm-related interfaces within the edge intelligent devices to configure the algorithms.
[0055] In one specific implementation, see Figure 3 As shown, Figure 3 This illustrates the initial state of an algorithm test case, specifically running one algorithm for each data stream. It should be noted that when... Figure 3When the quantities of Vn, An, and Dn are not the same, the generated algorithm test cases should be divided into two cases. The first case is when the number of data streams is greater than the number of algorithms. In this case, it should be ensured that each type of algorithm can be run and analyzed in one data stream. The second case is when the number of data streams is less than the number of algorithms. In this case, the number of edge intelligent devices can be expanded so that the sum of the data streams from all edge intelligent devices is greater than the total number of algorithms. This ensures that each algorithm can be tested during the initial algorithm test. It should be noted that when increasing the number of video streams by increasing the number of edge devices, assuming that each edge intelligent device supports Pn data streams and the number of edge intelligent devices is A, it should be ensured that A*Pn > Dn during testing. In this case, A*Pn is... Figure 3 Vn in the text.
[0056] Step S13: Run various algorithms in the edge intelligent device according to the algorithm test cases, and monitor the status parameters of each module in the edge intelligent device during the operation to obtain status parameter data.
[0057] In this embodiment, after the algorithm test cases are assigned to the corresponding edge intelligent devices, various algorithms in the edge intelligent devices can be run according to the algorithm test cases. Then, the status parameters of each module in the edge intelligent devices are acquired during the operation to obtain the corresponding status parameter data. The modules include, but are not limited to, software modules and hardware modules. The hardware modules include, but are not limited to, CPU (Central Processing Unit), I / O (Input / Output) ports, memory, etc. The status parameter data includes, but is not limited to, CPU utilization, I / O percentage, memory percentage, etc.
[0058] It should be noted that, in order to improve the testing efficiency of edge intelligent devices and save manpower costs in preparing test materials, this embodiment expands the single test materials corresponding to various algorithms in the edge intelligent device. Specifically, the step of running various algorithms in the edge intelligent device according to the algorithm test cases may include: acquiring the test materials corresponding to various algorithms in the edge intelligent device to obtain initial test materials; performing material fusion and / or material splicing processing on the initial test materials to obtain the expanded test materials, so that the algorithm test cases can use the expanded test materials to run various algorithms in the edge intelligent device. In a specific implementation, when the test materials corresponding to various algorithms in the edge intelligent device are video stream data, two or more video test materials can be merged into the same frame using video processing methods. For the processing of the labeling information corresponding to each video test material, the labeling information of the video test material can be mapped to the algorithm type to which the video test material belongs before fusion, and then the fused information is collected to form new labeling information. For details, see [link to implementation details]. Figure 4 As shown, m1, m2, m3, and m4 represent test materials for four different algorithms. The annotation information before fusion of these four different algorithms onto the same frame can be represented as: {A1: [[p m p n ],loc]}、{A2:[[p m p n ],loc]}、{A3:[[p m p n ],loc]}、{A4:[[p m p n The annotation information after material fusion can be represented as: [A1: [[p]}, loc]} m p n ],loc+θ],A2:[[p m p n ],loc+θ],A3:[[P m P n ],loc+θ],A4[[p m p nAs can be seen from the fusion, the frame number information in the content annotation information remains unchanged, but the position information of the event changes after the image is scaled and offset. The value of parameter θ is determined by the scaling factor or offset distance of the image during actual content fusion. It should be noted that when fusion of video test materials, only two or more segments are needed. The image size of each segment does not need to be the same during fusion, and within the reasonable range required by the algorithm, the size of each video test material can be weighted before splicing. In another specific implementation, material fusion can be performed by splicing the materials. For example, multiple video test materials can be merged into the same material in sequence through video processing. The algorithm test material is obtained by splicing as described above. The position information of the event does not change, only the frame number information changes. For example, when splicing two video materials, the annotation information before fusion is: {A1:[[p m ,p n ],loc]},{A2:[[p m ,p n If ],loc]}, then the merged annotation information is: [{A1:[[p m ,p n ],loc]}, Among them, parameters This indicates the frame rate of all previous video frames during the stitching of this video clip. After obtaining the expanded test material, the algorithm test cases can use the expanded test material to run various algorithms in the edge intelligent device, that is, begin testing various algorithms.
[0059] Furthermore, after monitoring the status parameters of each module in the edge intelligent device during operation and obtaining the status parameter data, the process may further include: saving the status parameter data in the form of a file, so as to locate and diagnose the abnormal module by using the status parameter data and the operation log of the edge intelligent device. It should be noted that after obtaining the status parameter data, it can be saved in the form of a file, such as a file containing graphs or tables. In this way, when a module in the edge intelligent device malfunctions, the abnormal module can be quickly located and diagnosed by using the status parameter data and the operation log of the edge intelligent device.
[0060] Step S14: Perform mean processing on the state parameter data within a preset time period to obtain the mean calculation result, and compare the mean calculation result with the corresponding critical value of the module to obtain the comparison result, so as to use the comparison result to test various algorithms.
[0061] In this embodiment, after monitoring the state parameters of each module in the edge intelligent device during operation to obtain state parameter data, the state parameter data collected within a preset time period can be further averaged to obtain the corresponding average calculation result. Then, the average calculation result is compared with the corresponding critical value of the module to obtain the corresponding comparison result. Finally, the comparison result is used to test various algorithms. It should be noted that the end time of the algorithm test cases should be based on the time when all expanded test materials have been run.
[0062] For example, when the status parameters of the edge intelligent device are acquired at regular intervals, such as every 10 minutes, the average of the status parameters can be calculated for a preset number of times, such as 20 times, and compared with the preset threshold values of each module in the edge intelligent device, as shown in the following formula:
[0063]
[0064] Where t represents the number of times the device status parameters are continuously acquired, k = n represents the device status parameters acquired in the nth acquisition, and s k S represents the value of the device status parameter obtained in the kth iteration, and S represents the critical value of the status parameter.
[0065] Furthermore, the difference M between the device status parameter values and the corresponding threshold values is obtained. If M < 0, the edge intelligent device is considered to be performing normally; if M >= 0, the performance may be abnormal. For details, see [link to documentation]. Figure 5 and Figure 6 As shown, where, Figure 5 The CPU state curve under normal conditions is shown. Figure 6 The CPU state curve under abnormal conditions is shown. It is understandable that in actual operation, the CPU or memory of an edge intelligent device may exceed its preset threshold at some point. This is normal, but continuously exceeding the threshold may be caused by a problem with the edge intelligent device. The threshold settings can be determined based on actual testing conditions; for example, the threshold for CPU and memory can be set to 70% of its maximum value, and the threshold for I / O ports can be set to 60% of its maximum value.
[0066] Furthermore, after running various algorithms in the edge intelligent device using the expanded test materials, the process further includes: performing statistical analysis on the test results corresponding to each algorithm to obtain statistical results, so as to verify the accuracy of the algorithm output results corresponding to each algorithm based on the statistical results. It is understood that after testing various algorithms, corresponding algorithm analysis results will be generated in the algorithm result module. To verify the accuracy of various algorithms, i.e., to test the algorithm result module, statistical analysis can be performed on the test results first, and then the accuracy of the algorithm output results corresponding to each algorithm can be verified using the statistical results. In one specific implementation, an automated statistical analysis tool can be used to automatically perform statistical analysis on the test results of the expanded test materials and their corresponding annotation information.
[0067] Furthermore, it should be noted that in addition to testing various algorithms in the edge intelligent device, this embodiment can also test the software functions of the edge intelligent device. Specifically, this can include: identifying all composable functional modules in the software functions of the edge intelligent device to obtain multiple target functional modules; generating software function test cases using the multiple target functional modules and based on a targeted combination method, so as to randomly test the software functions using the software function test cases. That is, when testing the software functions of the edge intelligent device, we can first identify all composable functional modules in the software functions of the edge intelligent device to obtain multiple target functional modules, then generate software function test cases using the multiple target functional modules and based on a targeted combination method, and then randomly test the software functions using the software function test cases. Further, when randomly testing the software functions, in order to help discover problems during random testing, we can add a changing weight for random testing in each test process to achieve the directionality of random testing; wherein, the functional modules include, but are not limited to: web modules, human-computer interaction modules, algorithm modules, IO output modules, service integration modules, etc.
[0068] As can be seen, this embodiment first obtains the current specification parameters and current status information of each edge intelligent device, then generates algorithm test cases based on the current specification parameters and current status information, and assigns the algorithm test cases to the corresponding edge intelligent devices. Next, it runs various algorithms in the edge intelligent devices according to the algorithm test cases, and monitors the status parameters of each module in the edge intelligent devices during the operation to obtain status parameter data. Then, it performs average processing on the status parameter data over a preset time period to obtain an average calculation result, and compares the average calculation result with the critical value of the corresponding module to obtain a comparison result, so as to use the comparison result to test various algorithms. In testing various algorithms in edge intelligent devices, this embodiment first uses the current specification parameters and current status information of each edge intelligent device to generate algorithm test cases, then runs various algorithms according to the algorithm test cases, and tests the algorithms by comparing the status parameter data monitored during the algorithm test case operation with the preset critical value. This achieves automatic test case generation and automated test case execution, improving the testing efficiency of edge intelligent devices.
[0069] This application discloses a specific testing method for edge intelligent devices. (See also...) Figure 7 As shown, the method includes:
[0070] Step S21: Obtain the current specification parameters and current status information of each edge smart device.
[0071] Step S22: Generate algorithm test cases based on the current specification parameters and the current status information, and assign the algorithm test cases to the corresponding edge smart devices.
[0072] Step S23: Obtain test materials corresponding to various algorithms in the edge intelligent device to obtain initial test materials.
[0073] Step S24: Perform material fusion and / or material splicing processing on the initial test material to obtain expanded test material, so that the algorithm test cases can use the expanded test material to run various algorithms in the edge intelligent device, and monitor the status parameters of each module in the edge intelligent device during the operation according to a preset time interval to obtain status parameter data.
[0074] In this embodiment, after obtaining the initial test materials corresponding to various algorithms in the edge intelligent device, the initial test materials are first expanded by material fusion and / or material splicing to obtain expanded test materials. Then, the algorithm test cases run various algorithms in the edge intelligent device using the expanded test materials. Then, according to a preset time interval, such as every 10 minutes, the status parameters of each module in the edge intelligent device during the operation are obtained to obtain the corresponding status parameter data.
[0075] It should be noted that since the tester's computer needs to communicate with the test device, i.e. the edge intelligent device, to obtain the state resources of the edge intelligent device, it is necessary to implement communication between different communication protocols. Taking the device communicating via the Telnet protocol as an example, the communication between the tester's computer and the edge intelligent device can be implemented using Python + telnetlib, thereby obtaining state resources such as CPU, memory, and I / O.
[0076] Step S25: Perform statistical analysis on the material running results corresponding to each type of algorithm to obtain statistical results, so as to verify the accuracy of the algorithm output results corresponding to each type of algorithm based on the statistical results.
[0077] Step S26: Perform mean processing on the state parameter data within a preset time period to obtain the mean calculation result, and determine whether the mean calculation result is greater than the critical value of the corresponding module. If all the mean calculation results are greater than the critical value of the corresponding module, it is determined that the algorithms of each type are normal. If there is a case where the mean calculation result is not greater than the critical value of the corresponding module, it is determined that the edge intelligent device is abnormal.
[0078] In this embodiment, after monitoring the state parameters of each module in the edge intelligent device during operation at preset time intervals to obtain state parameter data, the state parameter data within the preset time period can be further averaged to obtain corresponding average calculation results. Then, it is determined whether the average calculation results are greater than the corresponding critical value of the module. If all the above average calculation results are greater than the corresponding critical value of the module, the above algorithms are considered normal. If there is a case where the average calculation results are not greater than the corresponding critical value of the module, the edge intelligent device is considered to be abnormal. For example, if the difference M between the device state parameter value and the corresponding critical value is less than 0, the edge intelligent device is considered to be performing normally. In the next algorithm test, see... Figure 8As shown, a new test case can be generated by randomly selecting an algorithm combination from the remaining algorithms. For example, if the algorithm that was last run in input data V1 is A1, after the A1 algorithm is completed, a new algorithm test case will be generated by randomly selecting an algorithm combination from [A2, ..., An], and the algorithm will continue to run in the next round. If the state parameters continue to run normally during the process, all algorithms will run simultaneously in the last round of testing to test various algorithms. If the difference M between the value of the device state parameter and the corresponding critical value is greater than or equal to 0, the device will still randomly select an algorithm combination from the remaining algorithms to generate a new test case in the next generation of algorithm test cases, and continue to monitor the state parameters during the process. If there are still abnormalities, the algorithm test ends. If no abnormalities are found in the state parameters, the iteration continues until all algorithm combinations are run. After the algorithm test is completed, further localization and diagnosis will be performed based on the combination of abnormal state parameters of the edge intelligent device. If the values of the device status parameters cannot be obtained normally and M cannot be calculated, it can be assumed that the device has restarted, that is, the edge intelligent device may be stuck. In this case, the current algorithm test ends and the edge intelligent device is considered to have a quality problem. At this time, the tester can locate and diagnose the problem based on the status operation curve of the edge intelligent device and the device operation log.
[0079] Step S27: Count all combinable functional modules in the software functions of the edge intelligent device to obtain multiple target functional modules.
[0080] Step S28: Utilize multiple target functional modules and generate software functional test cases based on a targeted combination method, so as to randomly test the software function using the software functional test cases.
[0081] In this embodiment, after identifying all composable functional modules in the software functions of the edge intelligent device and obtaining multiple target functional modules, the composable interfaces in each of the aforementioned functional modules and the fields involved in each of the aforementioned interfaces can be statistically analyzed. For details, see [link to documentation]. Figure 9 As shown, after identifying n functional modules that can be combined into software functions: F1, F2, ..., Fn, the interfaces that each functional module can combine into are then identified, such as identifying n interfaces containing I1, I2, ..., In. Next, the fields involved in each interface are identified, such as identifying n fields containing s1, s2, ..., sn. Further, test scenarios are automatically generated for software testing through permutations and combinations, and then software functional testing is performed within these scenarios for a certain duration. See [link to documentation]. Figure 9 As shown, similar to algorithm testing, after obtaining the list of functional modules [F1, F2, ..., Fn], the number of combinations of functional modules can be determined by the parameter M, where the value of M is generated in the order [1:n]. The total number of possible software test scenarios is: Once the order of functional modules is determined, the execution order of interfaces within a single functional module can be further determined. The execution order of interfaces can be achieved by generating a permutation order using input parameters. Specifically, when generating the interface execution order, the interface list [I1, I2, ..., In] for each functional module is first obtained. Then, a parameter m is set, where m is a range of random numbers. The combination order of the interfaces is then determined through a permutation method. In one specific implementation, when the F1 functional module has n interfaces, the input parameter is m, and m ≤ n, the number of test scenarios generated by the permutation is... The generation of the sort order can be automated through a program.
[0082] Similar to the algorithm testing process, the software functional testing process is divided into three states: The first state is when the device parameters are normal during the execution of the software functional test cases, the random testing still adopts the same test case iterative generation method as the random testing system, and continues to perform random testing of the software functions; the second state is when the test stops when the device status parameters fail to be obtained, which is judged as an abnormal state. At this time, the testers can locate and diagnose the problem based on the device status and the device's own logs; the third state is an abnormal state, i.e., M>0. When generating test cases for subsequent random tests, they will be randomly generated from the existing functional modules and interface sequences, thereby narrowing the scope of random testing.
[0083] Furthermore, if the random test selects a functional module as... Interface combination is In the test scenario, if the state parameter exceeds the critical value, the rule for subsequent random tests regarding functional combination is as follows: the functional module combination remains unchanged, but subsequent tests will involve more interface combinations and changes in execution order under this functional module combination, focusing on verifying the scenario under this functional module combination; when m>1, the subsequent test cases will change as follows: The range of values for the random test combinations decreases by one each time until it becomes... When m=1, the test case execution status is relatively simple, so no further combination is needed. At this time, testers can directly locate the problem by checking the device logs and the execution status records.
[0084] It should be noted that although the number of test cases generated during the above software functional testing is relatively large, the time required for interface testing is relatively small. For example, the time required to run 100 interfaces generally does not exceed 5 minutes. Therefore, when conducting random testing using this solution, there is no need to worry that too many test cases will lead to a longer testing cycle and affect the testing progress.
[0085] For more detailed processing procedures of steps S21, S22, S23, S25, and S27, please refer to the corresponding content disclosed in the foregoing embodiments, which will not be repeated here.
[0086] As can be seen, in this embodiment of the application, when performing multi-algorithm testing on edge intelligent devices, test cases are continuously generated by monitoring the three states generated from the state parameters of the edge intelligent devices. During the test case iteration process, algorithm test items are continuously added and device state information is recorded, which enables traversal of multi-algorithm testing and helps in the localization of problems after discovery. When testing software functions, multiple functional modules and their corresponding interfaces and fields are used to generate software function test cases based on a directional combination method. This allows for the control of random combination parameters when the state is abnormal, narrowing the range of test combinations and giving random testing directionality, which helps in the discovery and localization of problems during random software testing. In addition, this embodiment of the application uses expanded test materials, that is, further expanding the single-algorithm test materials. This saves the manpower cost of preparing test materials and thus improves the testing efficiency of edge intelligent devices.
[0087] Accordingly, this application also discloses an edge intelligent device testing apparatus, see [link to relevant documentation]. Figure 10 As shown, the device includes:
[0088] Information acquisition module 11 is used to acquire the current specification parameters and current status information of each edge intelligent device;
[0089] Algorithm test case generation module 12 is used to generate algorithm test cases based on the current specification parameters and the current status information;
[0090] The algorithm test case allocation module 13 is used to allocate the algorithm test cases to the corresponding edge smart devices;
[0091] The test material execution module 14 is used to run various algorithms in the edge intelligent device according to the algorithm test cases;
[0092] The status parameter monitoring module 15 is used to monitor the status parameters of each module in the edge intelligent device during operation and obtain status parameter data.
[0093] The mean processing module 16 is used to perform mean processing on the state parameter data within a preset time period to obtain the mean calculation result;
[0094] The numerical comparison module 17 is used to compare the mean calculation result with the corresponding critical value of the module to obtain a comparison result;
[0095] The algorithm testing module 18 is used to test various algorithms using the comparison results.
[0096] The specific workflow of each of the above modules can be found in the relevant content disclosed in the foregoing embodiments, and will not be repeated here.
[0097] As can be seen, in this embodiment, the current specification parameters and current status information of each edge intelligent device are first obtained. Then, algorithm test cases are generated based on the current specification parameters and current status information, and the algorithm test cases are assigned to the corresponding edge intelligent devices. Next, various algorithms in the edge intelligent devices are run according to the algorithm test cases, and the status parameters of each module in the edge intelligent devices are monitored during the operation to obtain status parameter data. Then, the status parameter data within a preset time period is averaged to obtain the mean calculation result, and the mean calculation result is compared with the critical value of the corresponding module to obtain the comparison result, so as to use the comparison result to test various algorithms. In this embodiment, when testing various algorithms in edge intelligent devices, algorithm test cases are first generated using the current specification parameters and current status information of each edge intelligent device. Then, various algorithms are run according to the algorithm test cases, and the algorithm is tested by comparing the status parameter data monitored during the algorithm test case operation with the preset critical value. This achieves automatic test case generation and automated test case execution, improving the testing efficiency of edge intelligent devices.
[0098] In some specific embodiments, the status parameter monitoring module 15 may specifically include:
[0099] The status parameter monitoring unit is used to monitor the status parameters of each module in the edge intelligent device during operation at preset time intervals to obtain status parameter data.
[0100] In some specific embodiments, after the state parameter monitoring module 15, it may further include:
[0101] The status parameter data storage unit is used to save the status parameter data in the form of a file, so as to locate and diagnose the abnormal module by using the status parameter data and the operation log of the edge intelligent device.
[0102] In some specific embodiments, the test material running module 14 may specifically include:
[0103] The initial test material acquisition unit is used to acquire test materials corresponding to various algorithms in the edge intelligent device to obtain initial test materials;
[0104] The test material expansion unit is used to perform material fusion and / or material splicing processing on the initial test material to obtain the expanded test material;
[0105] The test material execution unit is used by the algorithm test cases to run various algorithms in the edge intelligent device using the expanded test material.
[0106] In some specific embodiments, after the test material running unit, the system may further include:
[0107] The indicator statistics unit is used to perform indicator statistics on the material running results corresponding to various algorithms, and obtain indicator statistics results;
[0108] The accuracy verification unit is used to verify the accuracy of the algorithm output results corresponding to various algorithms based on the statistical results of the indicators.
[0109] In some specific embodiments, the edge intelligent device testing apparatus may further include:
[0110] The functional module combination statistics module is used to count all combinable functional modules in the software functions of the edge intelligent device to obtain multiple target functional modules.
[0111] The software function test case generation module is used to generate software function test cases by utilizing multiple target function modules and based on a targeted combination method.
[0112] The software function testing module is used to perform random tests on the software functions using the software function test cases.
[0113] In some specific embodiments, the numerical comparison module 17 may specifically include:
[0114] The judgment unit is used to determine whether the mean calculation result is greater than the corresponding critical value of the module.
[0115] In some specific embodiments, the algorithm testing module 18 may specifically include:
[0116] The first determination unit is used to determine that the algorithms of each type are normal if all the mean calculation results are greater than the critical value of the corresponding module.
[0117] The second determination unit is used to determine that the edge intelligent device is abnormal if there is a case where the mean calculation result is not greater than the critical value of the corresponding module.
[0118] Furthermore, embodiments of this application also disclose an electronic device, Figure 11This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.
[0119] Figure 11 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the edge intelligent device testing method disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.
[0120] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.
[0121] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0122] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the edge intelligent device testing method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include a computer program capable of performing other specific tasks.
[0123] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned disclosed edge intelligent device testing method. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.
[0124] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.
[0125] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0126] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.
[0127] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0128] The above provides a detailed description of the edge intelligent device testing method, apparatus, device, and storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A testing method for edge intelligent devices, characterized in that, include: The current specification parameters and current status information of each edge intelligent device are obtained respectively; wherein, the current specification parameters include the number of data streams that the edge intelligent device can access, and the current status information includes information on the currently connected multiple data streams; Based on the current specification parameters and the current status information, algorithm test cases are generated, and the algorithm test cases are assigned to the corresponding edge intelligent devices; wherein, generating algorithm test cases includes determining the mapping relationship between the data stream and various algorithms in the edge intelligent device based on the number of data streams and the currently connected multiple data streams, and generating algorithm test cases for running multiple algorithms on multiple data streams; Run various algorithms in the edge intelligent device according to the algorithm test cases, and monitor the status parameters of each module in the edge intelligent device during the operation to obtain status parameter data; The state parameter data within a preset time period are averaged to obtain an average calculation result. The average calculation result is then compared with the corresponding critical value of the module to obtain a comparison result, which is used to test various algorithms. The step of running various algorithms in the edge intelligent device according to the algorithm test cases includes: acquiring test materials corresponding to various algorithms in the edge intelligent device to obtain initial test materials; performing material fusion and / or material splicing processing on the initial test materials to obtain expanded test materials, so that the algorithm test cases can use the expanded test materials to run various algorithms in the edge intelligent device; when the test materials are video stream data, the step of performing material fusion and / or material splicing processing on the initial test materials to obtain expanded test materials includes: merging two or more video test materials into the same frame using video processing methods to obtain expanded test materials; For the processing of the calibration information corresponding to each video test material, before fusion, the annotation information of the video test material is mapped to the algorithm type to which the video test material belongs, and the expanded test materials after fusion are collected to form new annotation information; The step of comparing the mean calculation result with the corresponding threshold value of the module to obtain a comparison result, so as to use the comparison result to test various algorithms, includes: determining whether the mean calculation result is greater than the corresponding threshold value of the module; if all the mean calculation results are greater than the corresponding threshold value of the module, then various algorithms are determined to be normal; if there is a case where the mean calculation result is not greater than the corresponding threshold value of the module, then the edge intelligent device is determined to be abnormal.
2. The edge intelligent device testing method according to claim 1, characterized in that, The monitoring of the status parameters of each module in the edge intelligent device during operation, to obtain status parameter data, includes: The status parameters of each module in the edge intelligent device are monitored at preset time intervals during operation to obtain status parameter data.
3. The edge intelligent device testing method according to claim 1, characterized in that, After monitoring the status parameters of each module in the edge intelligent device during operation and obtaining the status parameter data, the process further includes: The status parameter data is saved in the form of a file so that the abnormal module can be located and diagnosed by using the status parameter data and the operation log of the edge intelligent device.
4. The edge intelligent device testing method according to claim 1, characterized in that, After running various algorithms in the edge intelligent device using the expanded test materials, the process further includes: The results of the material running for each of the algorithms are statistically analyzed to obtain statistical results, which are then used to verify the accuracy of the algorithm output results for each of the algorithms.
5. An edge intelligent device testing device, characterized in that, include: The information acquisition module is used to acquire the current specification parameters and current status information of each edge intelligent device; wherein, the current specification parameters include the number of data streams that the edge intelligent device can access, and the current status information includes information on the currently connected multiple data streams; The algorithm test case generation module is used to generate algorithm test cases based on the current specification parameters and the current state information; wherein, generating algorithm test cases includes determining the mapping relationship between the data stream and various algorithms in the edge intelligent device based on the number of data streams and the currently connected multiple data streams, and generating algorithm test cases for running multiple algorithms on multiple data streams; An algorithm test case allocation module is used to allocate the algorithm test cases to the corresponding edge smart devices; The test material execution module is used to run various algorithms in the edge intelligent device according to the algorithm test cases; The status parameter monitoring module is used to monitor the status parameters of each module in the edge intelligent device during operation and obtain status parameter data. The mean processing module is used to perform mean processing on the state parameter data within a preset time period to obtain the mean calculation result; The numerical comparison module is used to compare the mean calculation result with the corresponding critical value of the module to obtain the comparison result; The algorithm testing module is used to test various algorithms using the comparison results; The test material running module is specifically used to acquire test materials corresponding to various algorithms in the edge intelligent device to obtain initial test materials; and to perform material fusion and / or material splicing processing on the initial test materials to obtain expanded test materials, so that the algorithm test cases can use the expanded test materials to run various algorithms in the edge intelligent device; When the test material is video stream data, the test material running module is also used to merge two or more video test materials into the same frame using video processing methods to obtain expanded test materials; for the processing of the calibration information corresponding to each video test material, before fusion, the annotation information of the video test material is mapped to the algorithm type to which the video test material belongs, and the expanded test materials after fusion are collected to form new annotation information; The numerical comparison module is specifically used to determine whether the mean calculation result is greater than the corresponding critical value of the module. The algorithm testing module is specifically used to determine that the algorithm is normal if all the mean calculation results are greater than the corresponding threshold value of the module, and to determine that the edge intelligent device is abnormal if there is a case where the mean calculation result is not greater than the corresponding threshold value of the module.
6. An electronic device, characterized in that, It includes a processor and a memory; wherein, when the processor executes a computer program stored in the memory, it implements the edge intelligent device testing method as described in any one of claims 1 to 4.
7. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein, when the computer programs are executed by a processor, they implement the edge intelligent device testing method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Test method and device, electronic equipment and readable storage medium
CN111338943A
Virtual machine operation and maintenance method, system, device in desktop cloud scene and computer medium
CN112835662A
Chip test case processing method and device, storage medium and electronic equipment
CN114968690A
