Function detection method, device and equipment and computer readable storage medium

By acquiring the controller's electrical signals within the target function time window, determining the function to be detected based on the characteristics of the electrical signals, and matching them with a standard electrical signal template, the problem of insufficient efficiency and accuracy in controller function detection in the prior art is solved, and more efficient and accurate function detection is achieved.

CN120892280APending Publication Date: 2025-11-04ZHEJIANG ZEEKR INTELLIGENT TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510918188.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-03
Publication Date
2025-11-04

AI Technical Summary

Technical Problem

Existing controller function testing methods require different input signals for different functions, which cannot guarantee that the simulated operating environment is consistent with the actual operating environment, resulting in poor testing efficiency and accuracy.

Method used

By acquiring the controller's electrical signals within the target function's time window, the function to be detected is determined based on the electrical signal characteristics. If there is a discrepancy, a standard electrical signal template is determined, and detection is performed based on the electrical signal to be detected and the standard electrical signal template, thus avoiding reliance on analog signal injection and log analysis.

Benefits of technology

It improves the accuracy and efficiency of function testing, avoids the instability and limitations of operating environment simulation, and can truly reflect the execution status of controller software functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120892280A_ABST
    Figure CN120892280A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of signal processing, in particular to a function detection method, device and equipment and a computer readable storage medium. According to the method, the execution condition of the software function of the controller is truly reflected through the electric signal generated in the actual operation process of the controller, the electric signal of the controller in the time window of the target function and the to-be-detected function are mapped, and whether the target function is normally operated or not is determined based on the consistency of the to-be-detected function and the target function. And when the to-be-detected function is inconsistent with the target function, the to-be-detected electric signal is rechecked in combination with the standard electric signal template, and secondary detection is performed on the possibly abnormal target function without depending on analog signal injection and log analysis, so that instability and limitation of running environment simulation are avoided, and the detection efficiency is improved. And the accuracy and the detection efficiency of function detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of signal processing technology, and in particular to a functional detection method, apparatus, device, and computer-readable storage medium. Background Technology

[0002] A controller is an embedded hardware device that uses internal software programs to collect external signals in real time, perform logical operations, and output control commands to drive corresponding components.

[0003] Typically, the functional testing of a controller relies on a specified input signal to simulate the actual operating environment, and the functional testing results are obtained by analyzing the software logs in the controller.

[0004] However, existing functional testing methods require different input signals for different functions, and cannot guarantee that the simulated operating environment is consistent with the actual operating environment of the controller, resulting in poor testing efficiency and accuracy. Summary of the Invention

[0005] To address the aforementioned technical problems, this disclosure provides a functional testing method, apparatus, device, and computer-readable storage medium to improve the accuracy and efficiency of functional testing.

[0006] In a first aspect, embodiments of this disclosure provide a function detection method, including:

[0007] The electrical signal to be detected is obtained based on the electrical signal of the controller within the time window of the target function;

[0008] Based on the characteristics of the electrical signal to be detected, the function to be detected corresponding to the electrical signal to be detected is determined;

[0009] If the function to be detected is inconsistent with the target function, then the standard electrical signal template corresponding to the target function is determined;

[0010] The target function of the controller is detected based on the electrical signal to be detected and the standard electrical signal template.

[0011] In some embodiments, acquiring the electrical signal to be detected based on the electrical signal of the controller within the time window of the target function includes:

[0012] Based on the preset operating logic of the software running on the controller, a time window for at least one candidate function corresponding to the controller is determined;

[0013] Acquire the electrical signal of the controller;

[0014] The electrical signal is windowed according to the time window of the at least one candidate function to obtain the electrical signal in each time window;

[0015] The electrical signal to be detected is determined based on the electrical signal of the target function within the time window of the at least one candidate function.

[0016] In some embodiments, the electrical signal includes at least one type of sub-signal, and determining the electrical signal to be detected based on the electrical signal within a time window of the target function among the at least one candidate function includes:

[0017] Determine at least one target sub-signal type corresponding to the target function;

[0018] Based on the at least one target sub-signal type, at least one target sub-signal is determined from the electrical signals within the time window of the target function;

[0019] The electrical signal to be detected is determined based on the at least one target sub-signal.

[0020] In some embodiments, determining the function to be detected corresponding to the electrical signal to be detected based on its characteristics includes:

[0021] The features of the electrical signal to be detected are input into a pre-trained function mapping model, so that the function mapping model determines the function to be detected corresponding to the electrical signal to be detected from at least one candidate function based on the features of the electrical signal to be detected.

[0022] In some embodiments, the method further includes:

[0023] Based on the characteristics of the anomaly detection signal and the target function corresponding to the anomaly detection signal, the function mapping model is trained to obtain an updated function mapping model; wherein, the anomaly detection signal is the electrical signal to be detected when the function to be detected is inconsistent with the target function, and the target function of the controller is determined to be operating normally according to the standard electrical signal template.

[0024] In some embodiments, after determining the function to be detected corresponding to the electrical signal to be detected based on its characteristics, the method further includes:

[0025] If the function to be detected is consistent with the target function, then the target function of the controller is determined to be operating normally.

[0026] In some embodiments, detecting the target function of the controller based on the electrical signal to be detected and the standard electrical signal template includes:

[0027] If the similarity between the electrical signal to be detected and the standard electrical signal template is greater than a preset similarity threshold, then the target function of the controller is determined to be operating normally; or,

[0028] If the similarity between the electrical signal to be detected and the standard electrical signal template is less than or equal to the preset similarity threshold, then the target function of the controller is determined to be malfunctioning.

[0029] Secondly, embodiments of this disclosure provide a functional testing device, comprising:

[0030] The acquisition module is used to acquire the electrical signal to be detected based on the electrical signal of the controller within the time window of the target function;

[0031] The first determining module is used to determine the function to be detected corresponding to the electrical signal to be detected based on the characteristics of the electrical signal to be detected;

[0032] The second determining module is used to determine the standard electrical signal template corresponding to the target function if the function to be detected is inconsistent with the target function.

[0033] The detection module is used to detect the target function of the controller based on the electrical signal to be detected and the standard electrical signal template.

[0034] Thirdly, embodiments of this disclosure provide an electronic device, including:

[0035] Memory;

[0036] Processor; and

[0037] Computer programs;

[0038] The computer program is stored in the memory and configured to be executed by the processor to implement the method as described in the first aspect.

[0039] Fourthly, embodiments of this disclosure provide a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the method described in the first aspect.

[0040] Fifthly, embodiments of this disclosure also provide a computer program product, which includes a computer program or instructions that, when executed by a processor, implement the functional detection method described above.

[0041] The functional detection method, apparatus, device, and computer-readable storage medium provided in this disclosure reflect the execution status of the controller software function by accurately reflecting the electrical signals generated during the actual operation of the controller. The electrical signals of the controller within the time window of the target function are mapped to the function to be detected. The consistency between the function to be detected and the target function determines whether the target function is operating normally. When the function to be detected and the target function are inconsistent, the electrical signals to be detected are reviewed in conjunction with a standard electrical signal template. The target function that may be abnormal is then tested a second time. This method does not rely on analog signal injection and log analysis, avoids the instability and limitations of the simulated operating environment, and improves the accuracy and efficiency of functional detection. Attached Figure Description

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

[0043] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0044] Figure 1 A flowchart of the functional testing method provided in this embodiment of the disclosure;

[0045] Figure 2 A schematic diagram illustrating an application scenario provided by an embodiment of this disclosure;

[0046] Figure 3 This is a schematic diagram of the structure of the functional testing device provided in the embodiments of this disclosure;

[0047] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0048] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.

[0049] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.

[0050] This disclosure provides a function detection method, which will be described below with reference to specific embodiments.

[0051] Figure 1 A flowchart illustrating a functional testing method provided in this embodiment. This method can be applied to... Figure 2 The application scenario shown includes an electronic device 21 and a controller 22. The electronic device 21 can specifically be a terminal, such as a smartphone, PDA, tablet, desktop computer, laptop, or all-in-one computer. It is understood that the functional detection method provided in this embodiment can also be applied to other scenarios.

[0052] The following is combined with Figure 2 The application scenarios shown are for Figure 1 The functional testing method shown is described below, and the specific steps of this method are as follows:

[0053] S101. Obtain the electrical signal to be detected based on the electrical signal of the controller within the time window of the target function.

[0054] The controller can execute various candidate functions based on the software running in the controller. The target function refers to a specific candidate function to be detected among at least one candidate function, such as motor start-up, sensor calibration, fault diagnosis, etc.

[0055] The time window for a target function is the complete execution cycle of the target function from triggering to completion, and this time window is determined based on the software design document.

[0056] Electrical signals are electrical quantities generated during the operation of the controller, including but not limited to: voltage signals, current signals, frequency signals, timing pulse signals, etc.

[0057] Specifically, the electronic equipment reads the controller's electrical signals in real time through various sensors, such as current transformers, voltage probes, and Hall effect sensors. The electronic equipment supports multiple communication methods and protocols, such as Controller Area Network (CAN), Serial Peripheral Interface (SPI), Inter-Integrated Circuit (I2C), Ethernet, etc., which are not limited here.

[0058] Optionally, high-frequency signals such as pulse-width modulation (PWM) waves and constant pulses can be buffered, and the sampling frequency can be dynamically adjusted according to the functional testing requirements. High-frequency sampling is used during functional verification to retain the original data and ensure the accuracy of functional testing; the sampling frequency is reduced during real-time continuous testing to reduce the computational load.

[0059] S102. Based on the characteristics of the electrical signal to be detected, determine the function to be detected corresponding to the electrical signal to be detected.

[0060] Based on the time-domain characteristics, frequency-domain characteristics, and time-frequency characteristics of the electrical signal to be detected, the function to be detected corresponding to the electrical signal to be detected is determined.

[0061] Among them, the time-domain features of the electrical signal to be detected include the mean, variance, and rise time of the electrical signal; the frequency-domain features include the fast Fourier transform spectrum features and harmonic content features; and the time-frequency domain features include multidimensional features extracted by short-time Fourier transform, wavelet packet decomposition, and other methods.

[0062] Specifically, each function of the controller software corresponds to a different electrical signal characteristic, so the corresponding function to be detected can be deduced based on the characteristics of the electrical signal to be detected. For example, when the software executes the "motor start" function, it corresponds to the rising edge window of the current signal.

[0063] One possible implementation is to input the features of the electrical signal to be detected into a function mapping model, and then output the actual function to be detected corresponding to the electrical signal to be detected from the function mapping model.

[0064] S103. If the function to be tested is inconsistent with the target function, then determine the standard electrical signal template corresponding to the target function.

[0065] Correspondingly, if the function to be tested is consistent with the target function, it is determined that the target function of the controller is operating normally.

[0066] Under normal circumstances, the function to be detected corresponding to the electrical signal to be detected within the time window of the target function should be the target function. Therefore, when the function to be detected is consistent with the target function, it means that the characteristics of the electrical signal to be detected meet the electrical signal characteristics that the target function should have, and the target function of the controller is operating normally.

[0067] When the function to be detected is inconsistent with the target function, it means that the characteristics of the electrical signal to be detected do not conform to the electrical signal characteristics that the target function should have. Within the time window of the target function, the controller may not execute the target function normally.

[0068] The standard electrical signal template characterizes the electrical signal features of the controller when it executes each candidate function normally; that is, each candidate function corresponds to its own standard electrical signal template.

[0069] When the function to be tested is inconsistent with the target function, the standard electrical signal template corresponding to the target function is selected from multiple standard electrical signal templates, and further functional testing is performed in combination with the electrical signal to be tested.

[0070] S104. Based on the electrical signal to be tested and the standard electrical signal template, the target function of the controller is tested.

[0071] Specifically, the similarity between the electrical signal to be detected and the standard electrical signal template is calculated, and the controller's target function is determined to be operating normally based on the similarity level.

[0072] If the similarity between the electrical signal to be detected and the standard electrical signal template is greater than the preset similarity threshold, then the target function of the controller is determined to be operating normally; or, if the similarity between the electrical signal to be detected and the standard electrical signal template is less than or equal to the preset similarity threshold, then the target function of the controller is determined to be operating abnormally.

[0073] Optionally, the standard electrical signal template includes threshold values ​​for key electrical signal characteristics of the target function, and / or the electrical signal waveform of the target function.

[0074] The similarity judgment criteria between the electrical signal to be detected and the standard electrical signal template include the difference between the key electrical signal feature value in the electrical signal to be detected and the threshold value of the key electrical signal feature value in the standard electrical signal template, or whether the key electrical signal feature value in the electrical signal to be detected exceeds the threshold value of the key electrical signal feature value in the standard electrical signal template.

[0075] For example, the difference between the key electrical signal feature value in the electrical signal to be detected and the threshold value of the key electrical signal feature value in the standard electrical signal template is inversely proportional to the similarity between the electrical signal to be detected and the standard electrical signal template.

[0076] For example, when the key electrical signal feature value in the electrical signal to be detected exceeds the threshold of the key electrical signal feature value in the standard electrical signal template, it is directly determined that the similarity between the electrical signal to be detected and the standard electrical signal template is less than or equal to the preset similarity threshold.

[0077] Optionally, electronic devices can use a fast feature extraction algorithm based on time-frequency atomic decomposition to quickly identify abnormal features in electrical signals that exceed the threshold of key electrical signal feature values ​​in the standard electrical signal template, such as using algorithms like S-transform and Hilbert-Huang transform to quickly identify abnormal features.

[0078] When the key electrical signal feature value in the electrical signal to be detected does not exceed the threshold value of the key electrical signal feature value in the standard electrical signal template, the larger the difference between the key electrical signal feature value in the electrical signal to be detected and the threshold value of the key electrical signal feature value in the standard electrical signal template, the smaller the similarity between the electrical signal to be detected and the standard electrical signal template; the smaller the difference between the key electrical signal feature value in the electrical signal to be detected and the threshold value of the key electrical signal feature value in the standard electrical signal template, the larger the similarity between the electrical signal to be detected and the standard electrical signal template.

[0079] And / or, the similarity judgment criteria between the electrical signal to be detected and the standard electrical signal template include the degree of deviation between the waveform of the electrical signal to be detected and the electrical signal waveform of the target function in the standard electrical signal template. Among them, the degree of deviation between the waveforms can be determined by cosine similarity and dynamic time warping (DTW) distance.

[0080] The degree of deviation between the waveform of the electrical signal to be detected and the waveform of the electrical signal of the target function in the standard electrical signal template is inversely proportional to the similarity between the electrical signal to be detected and the standard electrical signal template.

[0081] The greater the deviation between the waveform of the electrical signal to be detected and the electrical signal waveform of the target function in the standard electrical signal template, the smaller the similarity between the electrical signal to be detected and the standard electrical signal template; the smaller the deviation between the waveform of the electrical signal to be detected and the electrical signal waveform of the target function in the standard electrical signal template, the greater the similarity between the electrical signal to be detected and the standard electrical signal template.

[0082] Optionally, when the deviation between the waveform of the electrical signal to be detected and the electrical signal waveform of the target function in the standard electrical signal template exceeds a preset deviation threshold, the similarity between the electrical signal to be detected and the standard electrical signal template is directly determined to be less than or equal to the preset similarity threshold.

[0083] This embodiment of the disclosure obtains the electrical signal to be detected based on the electrical signal of the controller within the time window of the target function; determines the function to be detected corresponding to the electrical signal based on the characteristics of the electrical signal to be detected; if the function to be detected is inconsistent with the target function, a standard electrical signal template corresponding to the target function is determined; the target function of the controller is detected based on the electrical signal to be detected and the standard electrical signal template; the electrical signal generated during the actual operation of the controller truly reflects the execution status of the controller software function, maps the electrical signal of the controller within the time window of the target function to the function to be detected, determines whether the target function is operating normally based on the consistency between the function to be detected and the target function, and reviews the electrical signal to be detected in conjunction with the standard electrical signal template when the function to be detected is inconsistent with the target function, and performs secondary detection on the target function that may be abnormal, without relying on analog signal injection and log analysis, avoiding the instability and limitations of the simulated operating environment, and improving the accuracy and efficiency of function detection.

[0084] Optionally, for target functions that malfunction, various types of abnormal information, such as electrical signal waveforms, electrical signal characteristic values, and software running context information, are recorded when the abnormality occurs. By performing correlation analysis on the abnormal information, the cause of the abnormality can be located, such as software logic errors, hardware interference, etc.

[0085] Optionally, based on abnormal information such as the electrical signal waveform and electrical signal characteristic values ​​at the time of the abnormality, it can be determined whether the abnormality is the first occurrence. If the abnormality is the first occurrence, the cause of the abnormality is located manually, and the corresponding abnormality handling method is given. The location result, abnormality handling method, and abnormal information are stored in the abnormality handling experience database. If the same abnormality is subsequently determined to have occurred based on the abnormality information, the abnormality can be handled and resolved directly based on the abnormality handling method in the abnormality handling experience database. This improves the automation level of controller function abnormality handling and enhances the stability of controller software operation.

[0086] In some embodiments, obtaining the electrical signal to be detected based on the electrical signal of the controller within the time window of the target function includes: determining the time window of at least one candidate function corresponding to the controller based on the preset operating logic of the software running on the controller; obtaining the electrical signal of the controller; dividing the electrical signal into windows according to the time window of at least one candidate function to obtain the electrical signal within each time window; and determining the electrical signal to be detected based on the electrical signal within the time window of the target function among at least one candidate function.

[0087] The preset operating logic of the software running on the controller is based on the software design document. It is the program execution rule determined during the design phase of the software running on the controller, such as state machine flowchart, task scheduling table, interface protocol, etc.

[0088] Based on this preset operating logic, it is possible to determine the function that the controller should execute at each point in time or within each time period starting from the moment the software starts running, that is, the time window of at least one candidate function corresponding to the controller.

[0089] The controller's electrical signal is the electrical signal generated by the controller within a certain period of time after the software starts running. The controller's electrical signal is divided according to the time window of at least one candidate function to obtain the electrical signal in each time window, wherein the electrical signal in each time window corresponds to a candidate function.

[0090] Electrical signals include at least one type of sub-signal, such as current signals, voltage signals, etc.

[0091] Optionally, when acquiring electrical signals, since the signal sources for each type of sub-signal are different, it is necessary to time-align the multiple types of sub-signals to obtain the controller's electrical signal.

[0092] The time alignment methods include hardware clock synchronization or clock synchronization based on software timestamps. For example, a hardware counter can be used to mark the start and / or end times of a function to eliminate time offset of multi-channel signals and ensure timing consistency when performing feature analysis on the electrical signals under test.

[0093] Optionally, the electronic device acquires the controller's electrical signals through a high-frequency sampling circuit and combines the timestamps of the software task scheduling to time-align various types of sub-signals.

[0094] Optionally, noise filtering can be applied to the controller's electrical signals, selecting different filtering algorithms based on different sub-signal types, such as low-pass filtering, high-pass filtering, wavelet denoising, Kalman filtering, etc. For example, moving average filtering can be used for current ripple noise, and wavelet threshold denoising can be used for high-frequency interference.

[0095] Since each candidate function may be associated with different types of sub-signals, the type of sub-signal required for detecting each candidate function may be different. Accordingly, when detecting the target function, at least one target sub-signal that is strongly associated with the target function is extracted from the original electrical signal to obtain the electrical signal to be detected.

[0096] Specifically, at least one target sub-signal type corresponding to the target function is determined; at least one target sub-signal is determined from the electrical signals within the time window of the target function based on at least one target sub-signal type; and the electrical signal to be detected is determined based on at least one target sub-signal.

[0097] After dividing the controller's electrical signal into time windows, the electrical signal within each time window includes multiple types of sub-signals.

[0098] For electrical signals within the time window of the target function, at least one target sub-signal is selected from multiple types of sub-signals based on at least one target sub-signal type corresponding to the target function, wherein at least one target sub-signal type corresponding to the target function corresponds one-to-one with at least one target sub-signal.

[0099] Furthermore, the electrical signal to be detected is synthesized based on at least one target sub-signal.

[0100] This embodiment of the disclosure clarifies the boundaries between functions by dividing the time window according to the software operation logic, and extracts target sub-signals for different functions in a targeted manner, removing invalid signals and reducing the amount of computation for the feature analysis of the electrical signal to be detected, thereby further improving the accuracy and efficiency of function detection.

[0101] Meanwhile, the embodiments of this disclosure combine multiple types of sub-signal features to perform function detection for the target function, avoiding misjudgments caused by a single type of electrical signal, and further improving the accuracy of function detection.

[0102] In some embodiments, determining the function to be detected corresponding to the electrical signal to be detected based on the features of the electrical signal to be detected includes: inputting the features of the electrical signal to be detected into a pre-trained function mapping model, so that the function mapping model determines the function to be detected corresponding to the electrical signal to be detected from at least one candidate function based on the features of the electrical signal to be detected.

[0103] The function mapping model is trained based on annotated controller software design documents. Specifically, the electrical signal characteristics of each candidate function are annotated to clarify the electrical signal characteristics corresponding to different candidate functions. For example, when the software performs a "fault diagnosis" task, the CAN bus sends a fault code message with a specific ID, corresponding to a high-level pulse of the voltage signal.

[0104] Based on the above labeled data, as well as the measured data of the controller electrical signals under offline simulation or normal operating conditions, machine learning algorithms are used to train the model, and finally a trained function mapping model is obtained, so that the trained function mapping model can output the corresponding function ID based on the characteristics of the input electrical signal.

[0105] Machine learning algorithms include, but are not limited to, Support Vector Machine (SVM), Random Forest, and Long Short-Term Memory (LSTM) algorithms.

[0106] Optionally, when the controller software is upgraded or the controller operating conditions change, the function mapping model and the standard electrical signal templates corresponding to each function can be updated through online learning, such as adaptively adjusting the electrical signal feature thresholds and incrementally training the model.

[0107] Furthermore, based on the characteristics of the anomaly detection signal and the target function corresponding to the anomaly detection signal, the function mapping model is trained to obtain an updated function mapping model.

[0108] Among them, the abnormal detection signal is the electrical signal to be detected when the function to be detected is inconsistent with the target function, and the target function of the controller is determined to be operating normally according to the standard electrical signal template.

[0109] During the functional testing process, there may be situations where the function to be tested corresponding to the electrical signal to be tested is inconsistent with the target function, but the similarity between the electrical signal to be tested and the standard electrical signal template is higher than the preset similarity threshold. In this case, it is determined that the target function of the controller is operating normally based on the standard electrical signal template. This may be because the function mapping model has a deviation in the function mapping of the electrical signal to be tested, resulting in the inconsistency between the function to be tested and the target function. Such electrical signals to be tested are called abnormal detection signals.

[0110] The features of the anomaly detection signal and the target function corresponding to the anomaly detection signal are added to the training sample set of the function mapping model. The function mapping model is then retrained or fine-tuned to obtain an updated function mapping model, thereby enhancing the function mapping model's ability to generalize to unknown anomalies.

[0111] This embodiment of the present disclosure determines the function to be detected corresponding to the electrical signal to be detected based on a pre-trained function mapping model, and updates the function mapping model in a timely manner based on the abnormal detection signal, thereby improving the generalization ability of the function mapping model for different operating conditions and different abnormalities, adapting to different operating conditions of the controller, and improving the robustness of function detection.

[0112] Optionally, the threshold values ​​of key electrical signal features in the standard electrical signal template can be updated based on the controller's operating data.

[0113] For example, the threshold value of key electrical signal feature value in the standard electrical signal template of the target function is updated based on the key electrical signal feature value in the electrical signal to be detected when the target function is running normally. For example, the average value of the key electrical signal feature value in the electrical signal to be detected when the target function is running normally multiple times is used, or the threshold value range of key electrical signal feature value is determined by using the key electrical signal feature value in the electrical signal to be detected when the target function is running normally multiple times. This disclosure does not limit this.

[0114] Optionally, when the number of times the target function operates normally reaches a preset threshold, an update of the threshold values ​​of key electrical signal features in the standard electrical signal template is triggered. And / or, when the electrical signal to be detected corresponding to the target function is an abnormal detection signal, an update of the threshold values ​​of key electrical signal features in the standard electrical signal template is triggered.

[0115] This embodiment of the disclosure optimizes the reliability of the standard electrical signal template by adaptively updating the threshold values ​​of key electrical signal features in the standard electrical signal template, reducing missed detections or false alarms during the functional testing process, and further improving the accuracy of functional testing.

[0116] Figure 3 This is a schematic diagram of the structure of a function testing device provided in an embodiment of this disclosure. The function testing device may be an electronic device as described in the above embodiments, or it may be a component or assembly within that electronic device. The function testing device provided in this embodiment can execute the processing flow provided in the function testing method embodiments, such as... Figure 3As shown, the function detection device 30 includes: an acquisition module 31, a first determination module 32, a second determination module 33, and a detection module 34; wherein, the acquisition module 31 is used to acquire the electrical signal to be detected based on the electrical signal of the controller within the time window of the target function; the first determination module 32 is used to determine the function to be detected corresponding to the electrical signal to be detected based on the characteristics of the electrical signal to be detected; the second determination module 33 is used to determine the standard electrical signal template corresponding to the target function if the function to be detected is inconsistent with the target function; the detection module 34 is used to detect the target function of the controller based on the electrical signal to be detected and the standard electrical signal template.

[0117] Optionally, the acquisition module 31 includes a first determining unit, a first acquiring unit, a segmentation unit, and a second determining unit; the first determining unit is used to determine the time window of at least one candidate function corresponding to the controller based on the preset operating logic of the software running on the controller; the first acquiring unit is used to acquire the electrical signal of the controller; the segmentation unit is used to segment the electrical signal according to the time window of the at least one candidate function to obtain the electrical signal in each time window; the second determining unit is used to determine the electrical signal to be detected based on the electrical signal in the time window of the target function among the at least one candidate function.

[0118] Optionally, the second determining unit is specifically used to determine at least one target sub-signal type corresponding to the target function; determine at least one target sub-signal from the electrical signals within the time window of the target function according to the at least one target sub-signal type; and determine the electrical signal to be detected based on the at least one target sub-signal.

[0119] Optionally, the first determining module 32 is used to input the features of the electrical signal to be detected into a pre-trained function mapping model, so that the function mapping model determines the function to be detected corresponding to the electrical signal to be detected from at least one candidate function based on the features of the electrical signal to be detected.

[0120] Optionally, the function detection device further includes an update module, used to train the function mapping model based on the characteristics of the abnormal detection signal and the target function corresponding to the abnormal detection signal, to obtain an updated function mapping model; wherein, the abnormal detection signal is the electrical signal to be detected when the function to be detected is inconsistent with the target function, and the target function of the controller is determined to be operating normally based on the standard electrical signal template.

[0121] Optionally, the first determining module 32 is further configured to determine that the target function of the controller is operating normally if the function to be detected is consistent with the target function.

[0122] Optionally, the detection module 34 is specifically used to determine that the target function of the controller is operating normally if the similarity between the electrical signal to be detected and the standard electrical signal template is greater than a preset similarity threshold; or, if the similarity between the electrical signal to be detected and the standard electrical signal template is less than or equal to the preset similarity threshold, determine that the target function of the controller is operating abnormally.

[0123] Figure 3 The functional testing device shown in the embodiment can be used to execute the technical solution of the above method embodiment. Its implementation principle and technical effect are similar, and will not be repeated here.

[0124] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. The electronic device provided in an embodiment of this disclosure can execute the processing flow provided in the functional detection method embodiment, such as... Figure 4 As shown, the electronic device 40 includes: a memory 41, a processor 42, a computer program, and a communication interface 43; wherein the computer program is stored in the memory 41 and is configured to be executed by the processor 42 using the function detection method described above.

[0125] In addition, this disclosure also provides a computer-readable storage medium having a computer program stored thereon, the computer program being executed by a processor to implement the function detection method described in the above embodiments.

[0126] Furthermore, this disclosure also provides a computer program product, which includes a computer program or instructions that, when executed by a processor, implement the functional detection method described above.

[0127] It should be noted that, in this document, relational terms such as "first" and "second" are used merely 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 description is merely a specific embodiment of this disclosure, enabling those skilled in the art to understand or implement it. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to the embodiments described herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A functional testing method, characterized in that, The method includes: The electrical signal to be detected is obtained based on the electrical signal of the controller within the time window of the target function; Based on the characteristics of the electrical signal to be detected, the function to be detected corresponding to the electrical signal to be detected is determined; If the function to be detected is inconsistent with the target function, then the standard electrical signal template corresponding to the target function is determined; The target function of the controller is detected based on the electrical signal to be detected and the standard electrical signal template.

2. The method according to claim 1, characterized in that, The step of acquiring the electrical signal to be detected based on the electrical signal of the controller within the time window of the target function includes: Based on the preset operating logic of the software running on the controller, a time window for at least one candidate function corresponding to the controller is determined; Acquire the electrical signal of the controller; The electrical signal is windowed according to the time window of the at least one candidate function to obtain the electrical signal in each time window; The electrical signal to be detected is determined based on the electrical signal of the target function within the time window of the at least one candidate function.

3. The method according to claim 2, characterized in that, The electrical signal includes at least one type of sub-signal, and determining the electrical signal to be detected based on the electrical signal within a time window of the target function among the at least one candidate function includes: Determine at least one target sub-signal type corresponding to the target function; Based on the at least one target sub-signal type, at least one target sub-signal is determined from the electrical signals within the time window of the target function; The electrical signal to be detected is determined based on the at least one target sub-signal.

4. The method according to claim 1, characterized in that, The step of determining the function to be detected corresponding to the electrical signal to be detected based on the characteristics of the electrical signal to be detected includes: The features of the electrical signal to be detected are input into a pre-trained function mapping model, so that the function mapping model determines the function to be detected corresponding to the electrical signal to be detected from at least one candidate function based on the features of the electrical signal to be detected.

5. The method according to claim 4, characterized in that, The method further includes: Based on the characteristics of the anomaly detection signal and the target function corresponding to the anomaly detection signal, the function mapping model is trained to obtain an updated function mapping model; wherein, the anomaly detection signal is the electrical signal to be detected when the function to be detected is inconsistent with the target function, and the target function of the controller is determined to be operating normally according to the standard electrical signal template.

6. The method according to claim 1, characterized in that, After determining the function to be detected corresponding to the electrical signal to be detected based on its characteristics, the method further includes: If the function to be detected is consistent with the target function, then the target function of the controller is determined to be operating normally.

7. The method according to claim 1, characterized in that, The step of detecting the target function of the controller based on the electrical signal to be detected and the standard electrical signal template includes: If the similarity between the electrical signal to be detected and the standard electrical signal template is greater than a preset similarity threshold, then the target function of the controller is determined to be operating normally; or, If the similarity between the electrical signal to be detected and the standard electrical signal template is less than or equal to the preset similarity threshold, then the target function of the controller is determined to be malfunctioning.

8. A functional testing device, characterized in that, include: The acquisition module is used to acquire the electrical signal to be detected based on the electrical signal of the controller within the time window of the target function; The first determining module is used to determine the function to be detected corresponding to the electrical signal to be detected based on the characteristics of the electrical signal to be detected; The second determining module is used to determine the standard electrical signal template corresponding to the target function if the function to be detected is inconsistent with the target function. The detection module is used to detect the target function of the controller based on the electrical signal to be detected and the standard electrical signal template.

9. An electronic device, characterized in that, include: Memory; processor; as well as Computer programs; The computer program is stored in the memory and configured to be executed by the processor to implement the method as described in any one of claims 1-7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-7.