A test sequence generation method

CN122985604APending Publication Date: 2026-10-27GUANGZHOU ZHIYUAN INSTR CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610785674.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-02
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

本申请实施例提供一种测试序列生成方法,能够解决生成测试序列的效率低的技术问题,通过对原始工况数据的解析自动生成相应的测试指令序列,显著提升生成测试序列的效率

Benefits of technology

[0014]本申请实施例通过在生成测试序列时,根据预设的解析策略对原始工况数据进行波形识别与分段处理得到多个波形形态段,根据预设的指令映射规则将多个波形形态段实例化为多个测试指令对象,将多个测试指令对象按照时间顺序进行拼接处理生成第一测试指令序列。采用上述技术手段,可以通过对原始工况数据的解析自动生成相应的测试指令序列,相比于现有人工手动编辑测试指令序列的方式,显著提升了生成测试序列的效率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122985604A_ABST
    Figure CN122985604A_ABST
Patent Text Reader

Abstract

The embodiment of the application discloses a test sequence generation method, comprising: receiving original working condition data, wherein the original working condition data comprises a plurality of data points arranged in time sequence, each data point comprising time information and amplitude information; performing waveform identification and segmentation processing on the original working condition data according to a preset analysis strategy to obtain a plurality of waveform form segments; instantiating the plurality of waveform form segments into a plurality of test instruction objects according to a preset instruction mapping rule; and performing splicing processing on the plurality of test instruction objects in time sequence to generate a first test instruction sequence. The technical scheme provided by the embodiment of the application can solve the technical problem of low efficiency of generating a test sequence, automatically generates a corresponding test instruction sequence through analysis of original working condition data, and significantly improves the efficiency of generating a test sequence.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of testing technology, and in particular to a method for generating test sequences. Background Technology

[0002] In industrial sectors such as power electronics, new energy vehicles, and photovoltaic energy storage, performance testing of power supplies and batteries is a core component in ensuring product reliability, safety, and compliance. Especially with the rapid development of the new energy industry, the complexity of operating conditions and testing requirements for the equipment under test have increased significantly. For example, new energy vehicle power batteries need to simulate dynamic load conditions such as acceleration, deceleration, hill climbing, and braking in real-world driving to verify their charge-discharge performance, cycle life, and thermal stability; photovoltaic inverters need to reproduce complex scenarios such as changes in sunlight intensity throughout the day, cloud cover, and grid fluctuations to test their maximum power point tracking efficiency and grid adaptability; industrial power supplies need to simulate transient impacts and fluctuations from various electrical devices to verify their output stability and anti-interference capabilities. All of these tests rely on executable test sequences, which define the changes in power supply output voltage and current over time.

[0003] The generation of existing test sequences mainly relies on manual editing, which is time-consuming. Therefore, the efficiency of current test sequence generation is relatively low. Summary of the Invention This application provides a test sequence generation method that can solve the technical problem of low efficiency in generating test sequences. By parsing the original working condition data, it automatically generates the corresponding test instruction sequence, which significantly improves the efficiency of generating test sequences.

[0004] In a first aspect, embodiments of this application provide a test sequence generation method, comprising: Receive raw operating condition data, which includes multiple data points arranged in chronological order, and each data point includes time information and amplitude information; Based on the preset analysis strategy, the original working condition data is subjected to waveform recognition and segmentation to obtain multiple waveform morphology segments. According to the preset instruction mapping rules, multiple waveform segments are instantiated into multiple test instruction objects; Multiple test instruction objects are concatenated in chronological order to generate the first test instruction sequence.

[0005] Furthermore, based on a preset analysis strategy, the original operating condition data is subjected to waveform identification and segmentation processing to obtain multiple waveform segments, including: With the preset parsing strategy being the first parsing strategy, the instantaneous slope of each data point in the original working condition data is calculated, and a slope sequence is constructed based on the instantaneous slope. Traverse the slope sequence and segment the original working condition data according to the instantaneous slope and the corresponding amplitude information to obtain multiple basic morphological segments. The basic morphological segments include at least one of the following: steady state segment, exponential segment, ramp segment and step segment. Accordingly, based on the preset instruction mapping rules, multiple waveform segments are instantiated into multiple test instruction objects, including: The corresponding first instruction mapping rule is loaded according to the first parsing strategy; According to the first instruction mapping rule, multiple basic morphological segments are instantiated into multiple corresponding test instruction objects.

[0006] Furthermore, the slope sequence is traversed, and the original working condition data is segmented based on the instantaneous slope and corresponding amplitude information to obtain multiple basic morphological segments, including: Traverse the slope sequence, identify the intervals in which the absolute value of the instantaneous slope of multiple consecutive data points is less than the first preset threshold and the corresponding amplitude fluctuation range is less than the second preset threshold, and determine the original working condition data segment corresponding to the interval as the steady state segment. Traverse the slope sequence, identify the intervals in which the absolute value of the instantaneous slope of multiple consecutive data points shows a monotonically decreasing trend or a monotonically increasing trend and the corresponding amplitude change rule conforms to the exponential function model, and determine the original working condition data segment corresponding to the interval as the exponential segment; Traverse the slope sequence, identify the intervals in which the instantaneous slope of multiple consecutive data points remains unchanged and the slope value is within the permissible fluctuation range, while the corresponding amplitude changes linearly with time, and determine the original working condition data segment corresponding to the interval as the slope segment. Traverse the slope sequence, identify the intervals where the amplitude change between two adjacent data points exceeds the third preset threshold and the duration of the change is less than the fourth preset threshold, and determine the original working condition data segment corresponding to the interval as the step segment.

[0007] Furthermore, based on a preset analysis strategy, the original operating condition data is subjected to feature recognition and segmentation processing to obtain multiple waveform segments, including: When the preset analysis strategy is the second analysis strategy, the original working condition data is matched with a periodic function model, and the matched interval is determined as a periodic shape segment. The periodic function model includes at least one of the sine wave model, triangular wave model, square wave model and exponential oscillation model, and the periodic shape segment includes at least one of the sine wave segment, triangular wave segment, square wave segment and exponential oscillation segment. Accordingly, based on the preset instruction mapping rules, multiple waveform segments are instantiated into multiple test instruction objects, including: The corresponding second instruction mapping rule is loaded according to the second parsing strategy; According to the second instruction mapping rule, the periodic pattern segment is instantiated into the corresponding test instruction object.

[0008] Furthermore, according to the second instruction mapping rule, the periodic pattern segment is instantiated into the corresponding power test instruction object, including: The frequency threshold is determined based on the second analysis strategy; Obtain the fundamental frequency of each morphological segment and compare the fundamental frequency with the frequency threshold; When the fundamental frequency is below the frequency threshold, the periodic morphology segment is instantiated into the corresponding test instruction object according to the second instruction mapping rule; When the fundamental frequency exceeds the frequency threshold, feature parameters are extracted from the periodic morphology segment and a reconstructed waveform segment is generated based on the extracted feature parameters. The reconstructed waveform segment is then instantiated into a corresponding power supply test instruction object according to the second instruction mapping rule. The feature parameters include peak-to-peak value and frequency value. Alternatively, if the fundamental frequency exceeds the frequency threshold, the corresponding periodic morphological segment can be filtered out.

[0009] Furthermore, based on a preset analysis strategy, the original operating condition data is subjected to feature recognition and segmentation processing to obtain multiple waveform segments, including: When the preset parsing strategy is the third parsing strategy, the target test type in the third parsing strategy is obtained, and the corresponding target mapping rule is loaded according to the target test type. The target test type includes battery test type, photovoltaic test type and general power supply test type. The original working condition data is segmented and matched according to the target mapping rules. The matched intervals are determined as the corresponding reduction form segments. Each reduction form segment corresponds to a preset working condition corresponding to the target test type. Accordingly, based on the preset instruction mapping rules, multiple waveform segments are instantiated into multiple test instruction objects, including: The corresponding third instruction mapping rule is loaded according to the third parsing strategy; According to the third instruction mapping rule, the specification mode segment is instantiated into the corresponding test instruction object.

[0010] Furthermore, according to the preset instruction mapping rules, multiple waveform segments are instantiated into multiple test instruction objects, including: According to the preset instruction mapping rules, obtain the instruction template for each waveform segment; The feature data of each waveform segment is obtained and filled into the corresponding field of the corresponding instruction template to generate the corresponding test instruction object.

[0011] Furthermore, after concatenating multiple test instruction objects in chronological order to generate the first test instruction sequence, the process also includes: The interactive interface displays a list of sequence items corresponding to the first test instruction sequence, where each sequence item in the list corresponds one-to-one with a test instruction object. Upon receiving a modification operation on a sequence item in the sequence item list, the first test instruction sequence is modified according to the modification operation to generate the second test instruction sequence. Upon receiving a save operation for a sequence item in the sequence item list, extract the test instruction object corresponding to the sequence item and save the test instruction object as a built-in instruction object.

[0012] Furthermore, upon receiving a modification operation on a sequence item in the sequence item list, the first test instruction sequence is modified according to the modification operation to generate a second test instruction sequence, including: Upon receiving a click operation on the first sequence item in the sequence item list, the first parameter information corresponding to the first sequence item is displayed, including amplitude, frequency, offset, phase, and number of repetitions. Upon receiving a modification operation on the first parameter information, the modified second parameter information is determined based on the modification operation; The second sequence item is generated based on the second parameter information, and the second sequence item replaces the first sequence item in the sequence item list to generate the second test instruction sequence.

[0013] Furthermore, upon receiving a modification operation on a sequence item in the sequence item list, the first test instruction sequence is modified according to the modification operation to generate a second test instruction sequence, including: Display at least one built-in instruction control in the interactive interface, and each built-in instruction control corresponds to a built-in instruction object. Upon receiving the first drag-and-drop operation, the built-in instruction object corresponding to the dragged built-in instruction control is inserted into the corresponding position in the first test instruction sequence to generate the second test instruction sequence. The first drag-and-drop operation is the operation of dragging the corresponding built-in instruction control between the corresponding sequence items in the sequence item list.

[0014] This application embodiment, when generating a test sequence, performs waveform recognition and segmentation processing on the original operating condition data according to a preset parsing strategy to obtain multiple waveform segments. These waveform segments are then instantiated into multiple test instruction objects according to preset instruction mapping rules. Finally, the multiple test instruction objects are concatenated in chronological order to generate a first test instruction sequence. Using this technique, the corresponding test instruction sequence can be automatically generated through the parsing of the original operating condition data, significantly improving the efficiency of test sequence generation compared to existing methods of manually editing test instruction sequences. Attached Figure Description

[0015] Figure 1 This is a flowchart of a test sequence generation method provided in an embodiment of this application; Figure 2 This is a flowchart of another test sequence generation method provided in the embodiments of this application; Figure 3 This is a segmentation diagram of a basic morphological segment provided in this application; Figure 4 This is a flowchart of another test sequence generation method provided in the embodiments of this application; Figure 5 This is a flowchart of another test sequence generation method provided in the embodiments of this application; Figure 6 This is a schematic diagram of the segmentation of a periodic morphological segment provided in this application; Figure 7 This is a flowchart of another test sequence generation method provided in the embodiments of this application; Figure 8 This is a schematic diagram of a specification segment provided in an embodiment of this application; Figure 9 This is a schematic diagram of a waveform segment provided in an embodiment of this application; Figure 10 This is a flowchart of another test sequence generation method provided in the embodiments of this application; Figure 11 This is a first schematic diagram of an interactive interface provided in an embodiment of this application; Figure 12 This is a second schematic diagram of an interactive interface provided in an embodiment of this application; Figure 13 This is a third schematic diagram of an interactive interface provided in an embodiment of this application. Detailed Implementation

[0016] To make the objectives, technical solutions, and advantages of this application clearer, specific embodiments of this application will be described in further detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are merely for explaining this application and not for limiting it. It should also be noted that, for ease of description, only the parts relevant to this application are shown in the drawings, not all of them. Before discussing exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flowcharts. Although the flowcharts describe operations (or steps) as sequential processes, many of these operations can be performed in parallel, concurrently, or simultaneously. Furthermore, the order of the operations can be rearranged. The process can be terminated when its operation is completed, but may also have additional steps not included in the drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.

[0017] With the rapid development of the new energy industry, the complexity of operating conditions and testing requirements for the equipment under test have increased significantly. For example, power batteries for new energy vehicles need to simulate dynamic load conditions such as acceleration, deceleration, hill climbing, and braking in real-world driving to verify their charge-discharge performance, cycle life, and thermal stability; photovoltaic inverters need to reproduce complex scenarios such as changes in sunlight intensity throughout the day, cloud cover, and grid fluctuations to test their maximum power point tracking efficiency and grid adaptability; industrial power supplies need to simulate transient impacts and fluctuations of various electrical devices to verify their output stability and anti-interference capabilities. In testing, real-world operating condition data needs to be played back as the data under test to simulate dynamic response and reliability in real-world environments. Existing technologies typically convert the collected real-world environmental data (such as voltage curves for vehicle driving conditions or curves showing changes in sunlight intensity throughout the day) directly into CSV (Comma-Separated Values) or binary files, and download them as an arbitrary waveform to a programmable power supply for open-loop playback. While this data streaming processing method can reproduce the changing trends of real working conditions, the waveform data is processed only as a whole file, making it difficult to decompose working condition segments or insert specific working conditions or fault simulations. The data is difficult to reuse, which makes it impossible for the test system to identify key events in the waveform data and intervene dynamically, severely restricting the efficiency and flexibility of testing under complex working conditions.

[0018] In testing scenarios, to verify the dynamic response and reliability of the tested object (such as a battery or power supply device) under real-world conditions, engineers need to import real-world operating condition data as the test data source. For example, in the testing scenario of new energy vehicle batteries, engineers need to import real-world vehicle driving condition data, which may last for several hours or longer. Similarly, in the testing scenario of photovoltaic inverters, engineers need to import data on the daily variation of sunlight intensity, which may cover multiple days to several months. After importing the operating condition data, it is usually necessary to convert this data into CSV or binary format files and download them to the programmable power supply for playback. When engineers manually edit test sequences based on the playback operating condition data, they lack the means and methods for analyzing the physical and logical meaning corresponding to actual operating conditions and parsing the test sequence flow. Furthermore, secondary analysis is often required, involving manual intervention to decompose the data and determine the corresponding test instructions. For testing scenarios such as cycle life testing of new energy vehicle batteries and multi-day sunlight condition testing of photovoltaic systems, the test duration is typically several hours, days, or even months, and the corresponding original operating condition data contains hundreds of thousands to millions of sampling points. During manual editing, due to the large volume of operating condition data, engineers need to calibrate, decompose, and analyze the data in conjunction with the test process to convert it into the corresponding test sequence. This process requires a deep understanding of the test data and test procedures, relies heavily on the engineer's testing experience, and is time-consuming and inefficient. Moreover, the waveforms of actual operating conditions are not simply pieced together from standard basic commands, but contain a large number of irregular transient fluctuations, exponential changes, and random noise. During manual editing, either the waveforms are oversimplified, resulting in a large deviation between the test conditions and the real environment, and distorted test results; or a lot of time is spent fitting complex waveforms through multiple short commands. For example, a 10-second real acceleration condition may need to be broken down into hundreds of micro-ramp segments, further increasing the editing workload. Furthermore, when test standards are updated or customer requirements change, requiring adjustments to the parameters of a certain operating condition segment (such as modifying the charging voltage or extending the discharge time) or the insertion of fault simulation commands (such as voltage drops or current surges), manual editing mode requires recalculating the timestamps of all subsequent commands and adjusting the time axis of the entire sequence, which is prone to time misalignment or parameter discontinuity problems. For example, inserting a 10-second fault instruction into a sequence of 1000 instructions requires manually modifying the start and end times of the subsequent 900+ instructions. This entire modification process could take half a day and cannot guarantee 100% accuracy. Therefore, the generation of existing test sequences mainly relies on manual editing, which is time-consuming and relatively inefficient.

[0019] Based on this, the test sequence generation method of this application embodiment is provided. When generating a test sequence, the method involves performing waveform recognition and segmentation processing on the original operating condition data according to a preset parsing strategy to obtain multiple waveform segments. These waveform segments are then instantiated into multiple test instruction objects according to preset instruction mapping rules. Finally, the multiple test instruction objects are concatenated in chronological order to generate a first test instruction sequence. By employing the above technical means, through automated waveform recognition and instruction instantiation mapping, the massive amount of original operating condition data is converted into a corresponding test instruction sequence. Compared to existing methods that output operating condition data as a large arbitrary wave or traditional methods that manually generate test sequences by judging waveform features, calculating parameters, and manually inputting instructions, this embodiment can reconstruct the corresponding test instruction sequence without requiring manual construction of the corresponding test sequence. This significantly improves the automation of operating condition waveform feature analysis and sequence generation, thereby improving the overall efficiency of test sequence generation. Furthermore, since the generated first test instruction sequence is composed of multiple test instruction objects, when modifications are needed, the test sequence object corresponding to a certain segment of the operating condition waveform can be modified, or a new test instruction object (such as a fault instruction object) can be inserted at a specific position in the first test instruction sequence (such as between two test instruction objects). Compared to the traditional method of modifying the entire code, this embodiment can automatically and quickly modify the test instruction sequence based on simple interactive operations, further improving the overall efficiency of generating test sequences. In addition, traditionally, when parsing operating condition data, defining the corresponding test process and waveform instructions requires manual intervention for secondary analysis, decomposing the data and determining the corresponding test instruction objects, which is inefficient and unreliable, affecting the reproducibility of the test process. However, this embodiment uses automated waveform recognition processing, which can quickly and objectively identify and segment waveforms, ensuring that the generated test instruction sequence can accurately reproduce the electrical characteristics of the original operating condition without subsequent manual correction, thereby saving the time of repeated debugging and further improving the overall efficiency of generating test instruction sequences.

[0020] Figure 1 This is a flowchart illustrating a test sequence generation method provided in an embodiment of this application. The test sequence generation method provided in this embodiment can be executed by a test sequence generation device, which can be implemented through software and / or hardware. The test sequence generation device can consist of two or more physical entities, or it can consist of a single physical entity. Generally, the test sequence generation device can be a terminal device, such as a PC (personal computer), interactive whiteboard, tablet computer, or mobile phone.

[0021] The following description uses a PC as the main entity executing the test sequence generation method as an example. (Refer to...) Figure 1The test sequence generation method specifically includes: S11. Receive raw operating condition data, wherein the raw operating condition data includes multiple data points arranged in chronological order, and each data point includes time information and amplitude information.

[0022] In one embodiment, after the test sequence generation process is triggered, the system first reads raw operating condition data from an external file (such as a CSV (Comma-Separated Values) file or a binary DAT (Data) file) or via a network communication interface (such as SCPI (Standard Commands for Programmable Instruments) or LXI (LAN eXtensions for Instrumentation)). The raw operating condition data refers to an unstructured time amplitude sequence acquired through data acquisition devices (such as data loggers, oscilloscopes, or sensors) during actual physical processes. The raw operating condition data characterizes the voltage, current, or power changes of the object under test (such as a battery, photovoltaic array, or motor driver) in a real-world environment. Each data point contains time information (such as milliseconds or seconds relative to the start time) and amplitude information (such as the volt value of voltage or the ampere value of current). For example, taking the testing of new energy vehicle batteries as an example, the system receives a 120-second segment of driving condition voltage data. This driving condition voltage data contains 12,000 data points with a sampling rate of 100Hz. Each data point records a timestamp (seconds) and a voltage value (volts). The system temporarily stores these data points in an array structure in memory, maintaining their original time order to form the original operating condition data. By directly receiving the actually acquired raw waveform data (i.e., the original operating condition data), the system ensures that the subsequently generated test sequences can accurately reproduce the complex electrical behavior of the corresponding physical scene, avoiding information loss caused by manual abstract modeling, thereby improving the accuracy of the subsequently generated test command sequences.

[0023] S12. Based on the preset analysis strategy, the original working condition data is subjected to waveform recognition and segmentation processing to obtain multiple waveform morphology segments.

[0024] After receiving the raw operating condition data in S11, the system acquires a preset parsing strategy and performs waveform recognition and segmentation on the raw operating condition data according to the preset parsing strategy, resulting in multiple waveform morphology segments. The parsing strategy is a pre-configured set of parameter rules, including steady-state judgment thresholds, step change thresholds, industry application types (such as battery testing, photovoltaic testing, or general power supply), and parsing granularity levels. These strategies guide the system on how to identify meaningful segments (i.e., waveform morphology segments) from the raw waveform (i.e., raw operating condition data). A waveform morphology segment refers to a waveform segment with consistent internal characteristics, segmented after feature recognition of a continuous waveform. Depending on the parsing granularity, the waveform morphology segment can be a basic morphology segment (such as a steady-state segment, ramp segment, exponential segment, and step segment), a periodic morphology segment (such as a sine wave segment), or an industry-specific morphology segment (such as a constant current charging segment). For example, the system reads the preset parsing strategy configuration. Assume the current configuration is a steady-state threshold of 0.01V / s, a step threshold of 5V / ms, an industry type of general power supply, and a parsing granularity level of fine (i.e., the first parsing strategy). The system iterates through the data points in the raw operating condition data acquired by S11, calculates the instantaneous slope between adjacent points, and forms a slope sequence. Then, it segments the data based on the instantaneous slope and amplitude information. For example, when the absolute value of the instantaneous slope of multiple consecutive points is less than a first preset threshold (e.g., 0.01V / s) and the amplitude fluctuation is less than a second preset threshold (e.g., 0.05V), the interval is divided into a steady-state segment, and its average voltage and duration are recorded. When the voltage (i.e., amplitude) jump between two adjacent points exceeds a third preset threshold (e.g., 5V) and the time interval is less than a fourth preset threshold (e.g., 1ms), it is marked as a step segment, and the corresponding interval is divided into step segments, recording the voltage values ​​before and after the jump. When the instantaneous slope is constant (e.g., the rate of change is less than 5%) and non-zero, the corresponding interval is divided into a ramp segment, recording the initial voltage, the final voltage, and the instantaneous slope. When the logarithmic linear fit goodness of the instantaneous slope is greater than a preset threshold (e.g., 0.98), the corresponding interval is divided into an exponential segment, recording the time constant and initial value. For residual waveforms that do not meet the above characteristics, the corresponding interval is divided into arbitrary bands. Finally, the system outputs a list of waveform segments arranged in chronological order, for example, steady-state segment (0-5s, 3.3V), ramp segment (5-7s, 3.3V-5.0V), and steady-state segment (7-10s, 5.0V). Alternatively, corresponding segmentation markers can be directly inserted into the original waveform data at the corresponding positions, with each segmentation marker labeled with the corresponding waveform identifier and relevant parameters.

[0025] It should be noted that among the waveform segments obtained by segmenting the original working condition data, there may be multiple waveform segments of the same type. For example, if the segmented waveform segments are 10 basic waveform segments, there are 3 steady-state segments, 2 ramp segments, 2 exponential segments and 3 step segments.

[0026] As described above, by automatically converting massive amounts of raw sampling points (i.e. raw operating condition data) into a small number of waveform segments with clear mathematical characteristics, the dimensionality and data volume of subsequent data processing are significantly reduced. At the same time, feature recognition preserves the key electrical characteristics of the waveform, such as slope and time constant, laying the foundation for efficient generation of instruction objects, thereby improving the accuracy and reliability of the subsequently generated test index sequences.

[0027] S13. According to the preset instruction mapping rules, instantiate multiple waveform segments into multiple test instruction objects.

[0028] After obtaining multiple waveform segments through the aforementioned S12 segmentation, a corresponding preset instruction mapping rule is determined according to a preset parsing strategy. Based on this preset instruction mapping rule, the multiple waveform segments are instantiated into multiple test instruction objects. The instruction mapping rule is a predefined correspondence table or algorithm used to convert each waveform segment into a test instruction object that the device under test (e.g., a power supply device) can execute. A test instruction object is a data structure that encapsulates the instruction type, parameter set, and editable attributes. For example, a hold instruction object includes the target voltage and duration; a ramp instruction object includes the start voltage, end voltage, and duration. Instantiation refers to dynamically creating corresponding instruction object instances based on the specific characteristic parameters of the waveform segment and filling the parameters into the object's attributes. For example, suppose the multiple waveform segments obtained in S12 are a steady-state segment, a step segment, a ramp segment, an exponential segment, and an arbitrary segment. Based on the type of the waveform segment, the corresponding mapping rule is invoked. The steady-state segment is instantiated as a hold command object, whose attribute parameters include the target voltage (i.e., the average voltage of the interval) and duration (i.e., the duration of the interval). The step segment is instantiated as a step command object, whose attribute parameters include the voltage before the jump, the voltage after the jump, and the step time. The ramp segment is instantiated as a ramp command object, whose attribute parameters include the starting voltage, the ending voltage, and the duration (or slope). The exponential segment is instantiated as an exponential command object, whose attribute parameters include the initial value, the final value, the time constant, and the duration. The arbitrary segment is instantiated as an arbitrary wave command object, internally retaining an array of extracted data points. Each test command object, upon creation, also automatically calculates and binds auxiliary metadata (such as peak-to-peak value and RMS value) for subsequent human-computer interaction display. Finally, the system outputs a list of test instruction objects, which has far fewer elements than the original number of data points. For example, 12,000 data points are compressed into 15 test instruction objects.

[0029] As described above, by instantiating waveform morphology segments into test instruction objects, the conversion from waveform description to executable instructions is realized. Each test instruction object is self-contained and parameterized, avoiding redundancy of point-by-point storage. Furthermore, the data structure of the test instruction object can support subsequent editing operations, providing a basis for flexible modification of subsequent test instruction sequences.

[0030] S14. Concatenate multiple test instruction objects in chronological order to generate the first test instruction sequence.

[0031] After obtaining multiple test instruction objects in S13, these objects are concatenated in chronological order to generate a first test instruction sequence. This first test instruction sequence represents the initial test instruction sequence generated based on the original operating condition data. The test instruction sequence is an ordered collection of instruction objects that can be interpreted and executed by the driver of the device under test (e.g., a power supply device), and can also be loaded into a human-machine interface for visualization and editing. For example, the hold instruction objects, step instruction objects, ramp instruction objects, exponential instruction objects, and arbitrary wave instruction objects generated in S13 are added sequentially to a sequence container according to the start time order of their corresponding waveform segments in the original operating condition data. Simultaneously, the absolute start and end times of each test instruction object relative to the sequence start point are calculated to ensure temporal continuity. For instance, the first test instruction object starts at 0ms and lasts for 100ms; the second test instruction object automatically starts at 100ms, and so on. After concatenation, a complete first test instruction sequence is generated. The first test instruction sequence can be saved as an internally formatted file, such as a JSON file or a binary file, or it can be sent directly to the device under test (such as a power supply) for playback testing, or output to a graphical interface for testers to view.

[0032] The above process reconstructs the time logic of the original operating conditions through splicing, generating a directly executable test program (i.e., the first test instruction sequence). Since the first test instruction sequence consists of test instruction objects, users (such as testers) can independently modify, delete, or insert new instruction objects in subsequent steps without reprocessing the entire original waveform (i.e., the original operating condition data), thereby greatly improving the efficiency of test iteration.

[0033] In one embodiment, compared to the traditional method that requires manual observation of waveforms, manual calculation of parameters, and input of instructions one by one, which is time-consuming, this embodiment can automatically extract waveform segments with fewer numbers than the original sampling points from the original operating condition data, instantiate them as test instruction objects, and generate the corresponding first test instruction sequence based on the test instruction objects. This reduces the sequence generation time to within a few seconds to a few minutes. Compared to the traditional method that takes several decimal places or even several days, this embodiment significantly shortens the test instruction sequence generation time and thus significantly improves the efficiency of generating test instruction sequences.

[0034] In one embodiment, the generated first test instruction sequence consists of independent test instruction objects, each encapsulating specific electrical parameters. When it is necessary to modify a certain operating condition, such as adjusting the ramp termination voltage from 10V to 12V, or inserting a fault instruction sequence (such as a voltage drop instruction sequence) at a specific location, the user only needs to directly edit the corresponding test instruction object on the interactive interface. There is no need to reprocess the original waveform and manually find the data points. This local editing mode significantly shortens the test iteration cycle, thereby significantly improving test flexibility.

[0035] In one embodiment, compared to the traditional manual editing process where test results are unreliable due to errors in parameter calculation and timeline, this embodiment performs automatic conversion based on defined mathematical rules and mapping logic, ensuring that the attribute parameters of each test instruction object are strictly consistent with the original waveform characteristics, thereby improving the accuracy and reliability of the test instruction sequence.

[0036] The above-described method aims to generate test sequences by performing waveform recognition and segmentation on the original operating condition data according to a preset parsing strategy to obtain multiple waveform segments. These waveform segments are then instantiated into multiple test instruction objects according to preset instruction mapping rules. Finally, these test instruction objects are concatenated in chronological order to generate the first test instruction sequence. By employing this technique, through automated waveform recognition and instruction instantiation mapping, the massive amount of original operating condition data is transformed into corresponding test instruction sequences. Compared to the traditional method of generating test sequences by manually judging waveform features, calculating parameters, and manually inputting instructions, this embodiment significantly improves the automation of operating condition waveform feature analysis and sequence generation, thereby enhancing the overall efficiency of test sequence generation. Furthermore, since the generated first test instruction sequence is composed of multiple test instruction objects, when modifications are needed, the test sequence object corresponding to a certain segment of the operating condition waveform can be modified, or a new test instruction object (such as a fault instruction object) can be inserted at a specific position in the first test instruction sequence (such as between two test instruction objects). Compared to the traditional method of modifying the entire code, this embodiment can automatically and quickly modify the test instruction sequence based on simple interactive operations, further improving the overall efficiency of generating test sequences. In addition, traditionally, it is necessary to manually judge the waveform characteristics of the operating condition data, such as distinguishing whether a curve is an exponential waveform or a linear waveform. This is not only time-consuming but also prone to errors in instruction generation due to visual fatigue or experience differences, affecting the reliability of test results. However, this embodiment adopts automated waveform recognition processing, which can quickly and objectively perform waveform recognition and segmentation, ensuring that the generated test instruction sequence can accurately reproduce the electrical characteristics of the original operating condition without the need for subsequent manual correction, thereby saving the time of repeated debugging and further improving the overall efficiency of generating test instruction sequences.

[0037] Figure 2 This is a flowchart of another test sequence generation method provided in the embodiments of this application, see below. Figure 2 The test sequence generation method specifically includes: S21. Receive raw operating condition data, wherein the raw operating condition data includes multiple data points arranged in chronological order, and each data point includes time information and amplitude information.

[0038] The specific execution method of this step is the same as that of S11 mentioned above, and will not be repeated here.

[0039] S22. When the preset parsing strategy is the first parsing strategy, calculate the instantaneous slope of each data point in the original working condition data, and construct a slope sequence based on the instantaneous slope.

[0040] After receiving the raw operating condition data in step S21, a preset parsing strategy is obtained. If the preset parsing strategy is the first parsing strategy, the instantaneous slope of each data point in the raw operating condition data is calculated, and a slope sequence is constructed based on the instantaneous slope. The first parsing strategy refers to a preset parsing mode, which can be selected by the user or is the system's default parsing strategy. That is, if the user does not select another parsing strategy, the first parsing strategy is used by default for subsequent parsing processing. The first parsing strategy includes parameters such as a steady-state determination threshold (i.e., a first preset threshold) and a step change threshold (i.e., a second preset threshold). The instantaneous slope is the ratio of the amplitude change to the time change between two adjacent data points, reflecting the instantaneous rate of change of the waveform within that time interval. For example, after obtaining the raw operating condition data, the system reads the preset parsing strategy configuration and determines whether the current parsing strategy configuration uses the first parsing strategy. If so, it iterates through the array of raw operating condition data according to the first parsing strategy, and for each pair of adjacent data points, calculates the instantaneous slope according to the preset slope calculation formula. After calculating the instantaneous slopes of all adjacent data points, all instantaneous slopes are organized into a slope sequence in chronological order. It should be noted that the length of this slope sequence is one less than the number of data points in the original operating condition data. The slope sequence transforms the original amplitude-time relationship into rate of change information, providing a concise and physically meaningful basis for subsequent pattern recognition. Subsequent segmentation based on instantaneous slopes allows for more sensitive detection of subtle waveform changes, such as steady-state, linear, and exponential waveform characteristics, thus ensuring the accuracy of subsequent segmentation.

[0041] S23. Traverse the slope sequence and segment the original working condition data according to the instantaneous slope and the corresponding amplitude information to obtain multiple basic morphological segments. The basic morphological segments include at least one of the following: steady-state segment, exponential segment, ramp segment, and step segment.

[0042] After obtaining the slope sequence in S22, the slope sequence is traversed, and the original operating condition data is segmented based on the instantaneous slope and corresponding amplitude information to obtain multiple basic waveform segments. These basic waveform segments include at least one of the following: steady-state segment, exponential segment, ramp segment, and step segment. Each waveform waveform segment within the basic waveform segments has corresponding trend characteristics. The steady-state segment refers to the interval where the absolute value of the slope is consistently close to zero and the amplitude is essentially constant. The exponential segment refers to the interval where the slope change follows an exponential curve (i.e., linear in the logarithmic domain). The ramp segment refers to the interval where the slope remains constant (i.e., the rate of change is extremely small) and non-zero. The step segment refers to the interval where the amplitude jumps within a very short time. For example, the slope sequence obtained above is traversed from beginning to end, while simultaneously reading the corresponding original amplitude information (such as voltage or current values), and a sliding window mechanism is used for segmentation. Specifically, for the steady-state segment, a steady-state judgment threshold (e.g., 0.01V / s) and a steady-state amplitude tolerance (e.g., 0.05V) can be set. When the absolute values ​​of the instantaneous slopes of multiple consecutive data points (at least 3) are all less than the steady-state threshold, and the difference between the maximum and minimum amplitudes of these points is less than the steady-state amplitude tolerance, the interval is marked as a steady-state segment. Record the start time, end time, average amplitude, and duration of this steady-state segment. For slope segments, a permissible fluctuation range for constant slope can be set (e.g., the rate of change of slope between adjacent instants is less than 5%). When the slope signs of multiple consecutive data points are consistent (i.e., all positive or all negative) and the instantaneous slope values ​​are essentially constant, while the linear fitting residual of the amplitude over time is less than a preset threshold, it is determined to be a slope segment. Extract the initial amplitude, final amplitude, average slope, and duration of this slope segment. For exponential segments, the natural logarithm of the amplitudes in the candidate interval can be taken. If the amplitude changes linearly with time in the logarithmic domain (e.g., the linear correlation coefficient is greater than 0.98), and the absolute value of the original instantaneous slope is monotonic (e.g., increasing or decreasing), it is determined to be an exponential segment. Extract the time constant τ, initial amplitude, and final value of this exponential segment through exponential fitting. For step segments, the amplitude difference between two adjacent data points can be detected. If the amplitude difference exceeds the step change threshold (e.g., 5V) and the time interval between the two data points is less than the step time window (e.g., 1.5 times the sampling period), then a step segment is identified. The amplitude before the step change, the amplitude after the step change, and the time and location of the step change are recorded.

[0043] During the traversal, continuous basic morphological segments are sequentially segmented according to the aforementioned rules, with adjacent segments seamlessly joined. Residual intervals that do not satisfy any of the above characteristics can be classified as arbitrary bands. Finally, output a list of basic morphological segments arranged in chronological order, for example: [Steady-state segment (0-5s, 0V), Exponential segment (5-7s, 0V→5V, τ=0.4s), Exponential segment (7-10s, 5V→-5V, τ=0.6s), Exponential segment (10-11s, -5V→0V, τ=0.2s), Ramp segment (11-13s, 0V→5V), Ramp segment (13-17s, 5V→-5V), Ramp segment (17-19s, -5V→0V), Step segment (19s, 0V→5V), Steady-state segment (19-22s, 5V), Step segment (22s, 5V→-5V), Steady-state segment (22-24s, -5V), Exponential segment (24-28s, -5V→5V, τ=0.8s)].

[0044] Figure 3 This is a segmentation diagram of a basic morphological segment provided in this application, for reference. Figure 3 By calculating the instantaneous slope of each data point in the original operating condition data, and constructing a slope sequence based on the instantaneous slope, the original operating condition data is segmented according to the instantaneous slope and the corresponding amplitude information, resulting in the following segments: steady state (0-5s, 0V), exponential segment (5-7s, 0V→5V, τ=0.4s), exponential segment (7-10s, 5V→-5V, τ=0.6s), and exponential segment (10-11s, -5V→0V). V, τ=0.2s), ramp segment (11-13s, 0V→5V), ramp segment (13-17s, 5V→-5V), ramp segment (17-19s, -5V→0V), step segment (19s, 0V→5V), steady state segment (19-22s, 5V), step segment (22s, 5V→-5V), steady state segment (22-24s, -5V), exponential segment (24-28s, -5V→5V, τ=0.8s).

[0045] As described above, by combining the determination of instantaneous slope and amplitude, the continuous original waveform can be accurately decomposed into basic morphological segments with single mathematical characteristics. Compared with existing manual visual segmentation methods, the segmentation method in this embodiment significantly improves the speed and accuracy of segmentation. Furthermore, the implementation method of this embodiment can process massive amounts of data in batches, further improving the speed and accuracy of segmentation, thereby enhancing the overall speed and accuracy of subsequent test instruction sequence generation. In addition, each basic morphological segment after segmentation can be independently parameterized, providing structured input for the subsequent generation of concise test instruction objects.

[0046] S24. Load the corresponding first instruction mapping rule according to the first parsing strategy.

[0047] After obtaining the basic form segment in S23, the corresponding first instruction mapping rule is loaded according to the first parsing strategy. The first instruction mapping rule is a mapping table used in conjunction with the first parsing strategy, defining the conversion method between the basic form segment (such as a steady-state segment, ramp segment, exponential segment, or step segment) and the test instruction object. For example, a steady-state segment is mapped to a hold instruction object, and a ramp segment is mapped to a ramp instruction object. For instance, based on the currently active parsing strategy type (i.e., the first parsing strategy), the corresponding instruction mapping rule table (i.e., the first instruction mapping rule) is loaded from the configuration file or memory. This instruction mapping rule table exists in the form of key-value pairs or conditional statements, explicitly specifying which type of test instruction object each basic form segment should be instantiated into and how to extract parameters. For example, the steady-state segment is mapped to a hold command object, and the corresponding attribute parameters include the target voltage and duration; the ramp segment is mapped to a ramp command object, and the corresponding attribute parameters include the starting voltage, the ending voltage, and the duration; the exponential segment is mapped to an exponential command object, and the corresponding attribute parameters include the initial value, the final value, the time constant, and the duration; the step segment is mapped to a step command object, and the corresponding attribute parameters include the voltage before the jump, the voltage after the jump, and the step time.

[0048] As described above, by explicitly loading mapping rules, it is possible to flexibly adapt to different parsing granularities or industry requirements. When it is necessary to change the mapping behavior, such as mapping the steady-state segment to a "voltage clamping instruction", only the rule table needs to be replaced without modifying the core algorithm, thereby improving the scalability of test sequence generation.

[0049] S25. According to the first instruction mapping rule, instantiate multiple basic morphological segments into multiple corresponding test instruction objects.

[0050] After loading the corresponding first instruction mapping rule in S24, multiple basic morphological segments are instantiated into multiple corresponding test instruction objects according to the first instruction mapping rule. Instantiation refers to dynamically creating corresponding instruction object instances based on the feature parameters extracted from the basic morphological segments and filling the parameters into the object's attributes. A test instruction object is a data structure that encapsulates the instruction type, parameter set, and editable attributes. Each test instruction object is self-contained, meaning it independently possesses all the information required for execution and does not depend on external data. For example, the list of basic morphological segments obtained in S23 is traversed, and for each basic morphological segment, an instantiation operation is performed according to the first instruction mapping rule loaded in S24. For example, for a steady-state segment, a hold instruction object is created and its attributes are set; for example, the target voltage is set to the average voltage of the segment, and the duration is set to the duration of the segment. For a ramp segment, a ramp instruction object is created and its attributes are set; for example, the starting voltage is set to the starting amplitude of the segment, the ending voltage is set to the ending amplitude of the segment, and the duration is set to the duration of the segment (or the slope value is stored). For exponential segments, an exponential instruction object is created and its properties are set; for example, the initial value is set to the starting amplitude of the segment, the final value to the ending amplitude of the segment, the time constant to the fitted time constant τ, and the duration to the length of the segment. For step segments, a step instruction object is created and its properties are set; for example, the voltage before the jump is set to the amplitude before the step, the voltage after the jump is set to the amplitude after the step, and the step time is the time point when the jump occurs. After each test instruction object is created, auxiliary metadata such as peak-to-peak value, RMS value, and waveform thumbnail pointer are automatically calculated and bound to it to facilitate subsequent human-computer interaction display. Finally, a list of test instruction objects is output, the length of which is equal to the number of basic morphological segments and arbitrary bands (if any), and much smaller than the number of data points in the original operating condition data.

[0051] As described above, by instantiating the basic morphological segment into parameterized test instruction objects, the transformation from waveform description to executable commands is achieved. Each test instruction object is independent and complete, and users (such as testers) can directly understand, modify, or replace any object without needing to concern themselves with the details of the original operating condition data. Furthermore, parameterized storage significantly compresses the data volume. For example, a 2-second ramp segment that originally required 200 sampling points can now be represented by only three parameters of a single test instruction object, significantly reducing storage and transmission overhead.

[0052] S26. Concatenate multiple test instruction objects in chronological order to generate the first test instruction sequence.

[0053] After instantiating multiple basic morphological segments into corresponding test instruction objects in S25, the test instruction objects are concatenated in chronological order to generate the first test instruction sequence. The concatenation process involves storing each test instruction object sequentially into an ordered sequence container according to its chronological order on the original timeline, ensuring temporal continuity and correctness. The first test instruction sequence is the final output corresponding to the first parsing strategy; it is a list composed of multiple test instruction objects arranged in chronological order, which can be directly executed by the device under test (e.g., a power supply device) or loaded into a human-machine interface for editing. For example, the test instruction objects generated in S25 are added sequentially to a sequence container (e.g., an array or list) according to the start time order of their corresponding original waveform segments (i.e., basic morphological segments and arbitrary bands) (i.e., the time order during segmentation in S23). During the addition process, the absolute start and end times of each test instruction object relative to the sequence start point can be calculated, ensuring seamless connection between adjacent test instruction objects. For example, the first test instruction object starts at time 0 and lasts for T1; the second test instruction object automatically starts at T1 and lasts for T2; and so on. After concatenation, a complete first test instruction sequence is generated. The first test instruction sequence can be saved as an internal format file (such as JSON or binary), or it can be directly sent to the device under test (such as a power supply) for playback testing, or output to a graphical interface for testers to view and edit.

[0054] For example, refer to Figure 3 The basic morphological segments obtained by segmenting the original working condition data through the aforementioned embodiments are as follows: steady-state segment, exponential segment, exponential segment, exponential segment, ramp segment, ramp segment, ramp segment, step segment, steady-state segment, step segment, steady-state segment, and exponential segment. Therefore, by instantiating and splicing the basic morphological segments, the test instruction objects of the first test instruction sequence are as follows: hold instruction object 1, exponential instruction object 1, exponential instruction object 2, exponential instruction object 3, ramp instruction object 1, ramp instruction object 2, ramp instruction object 3, step instruction object 1, hold instruction object 2, step instruction object 2, hold instruction object 3, and exponential instruction object 4.

[0055] As described above, the original operating condition's time logic is restored through splicing, generating a first test instruction sequence (i.e., a test program) that can be directly executed. Since each test instruction object in the first test instruction sequence is an independently editable unit, users (such as testers) can modify parameters, delete, or insert new instructions (e.g., insert a fault drop instruction between two instructions) for any test instruction object in subsequent steps without having to reprocess the entire original waveform (i.e., the original operating condition data). Therefore, this embodiment greatly improves the efficiency and flexibility of test iteration through a structured sequence representation.

[0056] In one embodiment, traditional test sequence generation methods require manual observation of waveforms, visual identification of steady-state, ramp, or exponential features, manual calculation of parameters such as slope and time constant, and inputting them one by one into the power control software. For a piece of operating data containing 6000 sampling points (60 seconds), traditional manual processing may take more than 30 minutes. This embodiment, however, can automatically complete segmentation and instantiation within seconds, generating a first test instruction sequence containing only a small number of test instruction objects (no more than 1% of the original data points), improving efficiency by nearly 100 times and significantly shortening the test sequence construction time. Furthermore, in traditional manual editing processes, errors in parameter calculation (such as incorrect slope calculation or time constant fitting deviation) and time axis misalignment (such as overlaps or gaps between instructions) are frequent, leading to unreliable test results or even damage to the device under test. This embodiment, based on defined mathematical rules, performs automatic segmentation and parameter extraction, ensuring that the parameters of all test instruction objects are strictly consistent with the original waveform characteristics, thereby guaranteeing the accuracy and safety of the test sequence and improving the reliability of subsequent tests.

[0057] Figure 4 This is a flowchart of another test sequence generation method provided in the embodiments of this application, referred to... Figure 4 During the segmentation process in S23, the test sequence generation method specifically includes: S231. Traverse the slope sequence, identify the intervals in which the absolute values ​​of the instantaneous slopes of multiple consecutive data points are all less than the first preset threshold and the corresponding amplitude fluctuation range is less than the second preset threshold, and determine the original working condition data segment corresponding to the interval as the steady state segment.

[0058] When performing segmentation processing in S23, the slope sequence can be traversed to identify intervals where the absolute value of the instantaneous slope of multiple consecutive data points is less than a first preset threshold and the corresponding amplitude fluctuation range is less than a second preset threshold. The original operating condition data segment corresponding to the identified interval is then determined as a steady-state segment. A steady-state segment refers to a continuous interval in the waveform where the voltage or current remains constant (or fluctuates very little), corresponding to the hold-up state in power supply testing. The first preset threshold (i.e., the absolute slope threshold) is a threshold used to determine whether the rate of change is sufficiently small, for example, set to 0.01V / s. The second preset threshold (i.e., the amplitude fluctuation range) is a threshold used to determine whether the amplitude is stable, for example, set to a maximum amplitude change not exceeding 0.05V. For example, the slope sequence obtained in S22 can be traversed from beginning to end, while simultaneously reading the corresponding original amplitude information (such as voltage values). For the currently traversed multiple consecutive data points (at least 3), the absolute value of the instantaneous slope corresponding to these data points is calculated. If the absolute value of the instantaneous slope of each data point is less than the first preset threshold (e.g., 0.01V / s), then the slope condition is satisfied. Examine the original amplitudes corresponding to these data points and calculate the difference between the maximum and minimum values, ΔV = V_max - V_min, where V_max is the maximum amplitude, V_min is the minimum amplitude, and ΔV is the difference between the two. If ΔV is less than a second preset threshold (e.g., 0.05V), the amplitude stability condition is met. When both conditions are met, the continuous interval is marked as a candidate interval for a steady-state segment. Based on this candidate interval, expand the window backward, merging adjacent data points that meet the conditions as much as possible to form the largest continuous steady-state interval, which is the final steady-state segment (interval). Record the start time, end time, average amplitude (or median amplitude), and duration of this steady-state segment.

[0059] It should be noted that the specific values ​​of the first preset threshold and the second preset threshold can be set according to the actual situation. The specific values ​​provided in this embodiment are only for explanation.

[0060] As described above, this embodiment uses a dual threshold (i.e., slope and amplitude) for joint determination, which can effectively filter out minor noise interference, accurately identify the true steady-state range, and avoid misjudging fluctuation noise as a steady-state segment, thereby ensuring the reliability of segmentation.

[0061] S232. Traverse the slope sequence and identify the intervals in which the absolute value of the instantaneous slope of multiple consecutive data points shows a monotonically decreasing or monotonically increasing trend and the corresponding amplitude change rule conforms to the exponential function model. Then, determine the original working condition data segment corresponding to the identified interval as the exponential segment.

[0062] When performing segmentation processing in S23, the slope sequence can be traversed to identify intervals where the absolute values ​​of the instantaneous slopes of multiple consecutive data points exhibit a monotonically decreasing or monotonically increasing trend, and the corresponding amplitude changes conform to an exponential function model. The original operating condition data segments corresponding to these intervals are then identified as exponential segments. An exponential segment refers to a continuous interval where the waveform amplitude changes according to an exponential function (such as an RC charging / discharging curve). A monotonically decreasing trend means that the absolute value of the slope continuously decreases (charging) or continuously increases (discharging) throughout the entire interval, without oscillations. For example, the slope sequence can be further traversed, and exponential segment determination can be performed on intervals that have not yet been classified. For instance, a continuous interval can be selected, and its instantaneous absolute slope value can be checked to see if it exhibits a monotonically decreasing trend (if the voltage approaches the final value, the absolute value of the slope gradually decreases) or a monotonically increasing trend (if the voltage moves away from the final value, the absolute value of the slope gradually increases). This can be determined by comparing the magnitude changes of the absolute values ​​of the slopes at adjacent points. An exponential function is then fitted to the original amplitude data within this interval. The natural logarithm can be used, such as ln|v(t)-V_end|, where V_end can be the amplitude at the end of the interval or the final fitted value, and v(t) is the amplitude (i.e., voltage value) corresponding to the traversed time points. If ln|v(t)-V_end| shows a linear relationship with time, it is determined to conform to the exponential model. Then, the linear correlation coefficient R² is calculated. If the correlation coefficient R² is greater than a preset fitting threshold (e.g., 0.98), the interval is confirmed as an exponential segment. The time constant τ (i.e., the reciprocal of the absolute value of the linear regression slope), initial amplitude, final value, and duration are extracted from the fitting results. Data points that continuously meet the conditions are merged into an exponential segment, and the above parameters are recorded.

[0063] As described above, this embodiment, by combining the slope monotonicity test and the exponential goodness-of-fit judgment, can accurately distinguish between exponential segments and ramp segments (the slope of ramp segments is constant rather than monotonically changing), avoiding misjudging linear changes as exponential changes, thereby improving the accuracy of segmentation.

[0064] S233. Traverse the slope sequence, identify the intervals in which the instantaneous slope of multiple consecutive data points remains unchanged and the slope value is within the permissible fluctuation range, while the corresponding amplitude changes linearly with time, and determine the original working condition data segment corresponding to the interval as the slope segment.

[0065] When performing segmentation processing in S23, the slope sequence can be traversed to identify intervals where the sign of the instantaneous slope remains unchanged for multiple consecutive data points, the slope value is within the permissible fluctuation range, and the corresponding amplitude changes linearly with time. The original operating condition data segment corresponding to the identified interval is then designated as a ramp segment. Here, a ramp segment refers to a continuous interval where the waveform amplitude changes linearly with time. A constant slope sign means that all instantaneous slopes are either positive (rising) or negative (falling). Permissible fluctuation range means that the slope is allowed to fluctuate within a certain range (e.g., the rate of change relative to the average slope is less than 5%) to tolerate sampling noise. Linear amplitude change means that the correlation coefficient between the amplitude and time is close to 1 (high linear fit). For example, intervals not yet marked as steady-state or exponential segments can be traversed to perform ramp segment determination. For instance, the sign of all instantaneous slopes within the interval is checked; if all are positive or all are negative, the sign condition is met. The average slope k_avg and standard deviation σ_k within the interval are calculated. If σ_k / |k_avg| is less than the preset fluctuation threshold (e.g., 5%), the slope is considered constant. Linear regression is performed on the amplitude of the corresponding interval, such as using the formula v(t) = a + b × t, where v(t) represents the instantaneous amplitude at time t, which in power supply testing refers to voltage (unit: volts, V) or current (unit: amperes, A). t represents time (unit: seconds, s), a represents the intercept parameter, physically corresponding to the amplitude at the start of the ramp segment (i.e., v(0) at t=0). In the embodiment, this value is recorded as the starting voltage of the ramp segment. b represents the slope parameter, physically corresponding to the rate of change of amplitude over time (unit: V / s or A / s). When b>0, the amplitude increases; when b<0, the amplitude decreases. This value can be directly used to generate the slope parameter in the ramp command object, or used in conjunction with the duration to derive the termination voltage. The linear correlation coefficient R² is calculated based on the amplitude after linear regression. If R² is greater than a preset threshold (e.g., 0.99), the amplitude is confirmed to be linearly changing. Intervals that simultaneously meet all three conditions are marked as ramp segments. Extract and record the initial amplitude, final amplitude, average slope (or directly use the slope b from linear regression), and duration of this ramp segment.

[0066] As described above, this embodiment uses triple verification of slope sign, slope stability, and linear fitting to accurately identify linear change regions, avoid misclassifying approximately linear exponential segments (such as long-time constant exponential segments) as slope segments, and ensure the accuracy of morphological classification.

[0067] S234. Traverse the slope sequence, identify the intervals where the amplitude change between two adjacent data points exceeds the third preset threshold and the duration of the change is less than the fourth preset threshold, and determine the original working condition data segment corresponding to the interval as the step segment.

[0068] When performing segmentation processing in S23, the slope sequence can be traversed to identify intervals where the amplitude change between two adjacent data points exceeds a third preset threshold and the duration of the change is less than a fourth preset threshold. The original operating condition data segment corresponding to the identified interval is then identified as a step segment. A step segment refers to an interval where the waveform amplitude changes abruptly within a very short time. The third preset threshold is the amplitude change threshold, i.e., the amplitude limit for determining a single jump, such as 5V. The fourth preset threshold is the duration threshold, i.e., the maximum allowed time length for a single jump, such as 1.5 times the sampling interval. For example, when traversing the slope sequence, the focus is on detecting abrupt changes between two adjacent data points. For instance, the absolute value ΔV of the amplitude difference between two adjacent points is calculated. If the absolute value ΔV of the amplitude difference is greater than the third preset threshold (e.g., 5V), a step jump is initially considered possible. The time difference Δt between these two points is checked; if the time difference Δt is less than the fourth preset threshold (e.g., 1.5 times the sampling period), then the point is confirmed as a step segment. The step transition typically lasts for an extremely short time (theoretically zero), so it can be considered a zero-width segment. Record the amplitude before the transition, the amplitude after the transition, and the time when the transition occurs.

[0069] In one embodiment, the step segment does not overlap with other segments. When segmenting, the jump point is used as the boundary, and the segments before and after the jump are respectively assigned to the adjacent basic form segments (e.g., before the jump, it belongs to the previous segment, and after the jump, it belongs to the next segment).

[0070] It should be noted that the specific values ​​of the third and fourth preset thresholds can be set according to the actual situation. The specific values ​​of the third and fourth preset thresholds provided in this embodiment are only for explanation.

[0071] As described above, this embodiment can accurately capture instantaneous jump events by limiting both amplitude change and time window, avoiding misjudging rapid ramp segments as step segments. At the same time, the independent identification of step segments enables the final generated test command sequence to accurately reproduce the sudden change behavior of voltage or current, providing a basis for testing requirements such as fault injection.

[0072] In one embodiment, after identifying the aforementioned four basic morphological segments, all identified steady-state segments, exponential segments, ramp segments, and / or step segments are concatenated into a basic morphological segment list in chronological order. Residual intervals that do not satisfy any of the above characteristics are classified as arbitrary bands and processed separately. Subsequently, each basic morphological segment is instantiated into a corresponding test instruction object (i.e., hold instruction, exponential instruction, ramp instruction, and / or step instruction) according to the first instruction mapping rule, and concatenated in chronological order to generate the first test instruction sequence. The specific concatenation process is the same as in the aforementioned embodiment and will not be repeated here. The segmentation processing method provided in this embodiment, through multi-stage and multi-threshold refined traversal judgment, can automatically and accurately extract four basic morphological segments with clear physical meaning from the original waveform, providing a solid data foundation for the subsequent efficient generation of test instruction sequences.

[0073] In one embodiment, traditional segmentation processing requires visual observation of the waveform, manual division of intervals, and calculation of parameters (such as slope and time constant). For long-cycle conditions involving tens of thousands of sampling points, this process can take several hours. In contrast, this embodiment automatically completes segmentation and parameter extraction by traversing the slope sequence and using preset thresholds. The entire recognition process takes only milliseconds to seconds, improving efficiency by hundreds of times and significantly enhancing automation and segmentation efficiency. Furthermore, traditional manual judgment of steady-state segments, ramp segments, exponential segments, or step segments is easily affected by noise interference or visual fatigue, leading to misjudgments. This embodiment uses multiple quantitative indicators (such as slope absolute value threshold, amplitude fluctuation threshold, goodness of fit, or slope monotonicity) to replace subjective experience with objective mathematical criteria, significantly reducing the misclassification rate and ensuring the authenticity of subsequent instruction parameters. Moreover, for the exponential segment, this embodiment directly extracts the time constant through least squares fitting, rather than relying on manual estimation; for the ramp segment, this embodiment extracts the accurate slope through linear regression; these accurate parameters enable the subsequently generated test command sequence to reproduce the electrical characteristics of the original waveform with high fidelity, thereby improving the reliability of the test.

[0074] Figure 5 This is a flowchart of another test sequence generation method provided in the embodiments of this application, see below. Figure 5 The test sequence generation method specifically includes: S31. Receive raw operating condition data, wherein the raw operating condition data includes multiple data points arranged in chronological order, and each data point includes time information and amplitude information.

[0075] The specific execution method of this step is the same as that of S11 mentioned above, and will not be repeated here.

[0076] S32. When the preset analysis strategy is the second analysis strategy, the original working condition data is matched with a periodic function model, and the matched interval is determined as a periodic shape segment. The periodic function model includes at least one of the following: sine wave model, triangular wave model, square wave model and exponential oscillation model. The periodic shape segment includes at least one of the following: sine wave segment, triangular wave segment, square wave segment and exponential oscillation segment.

[0077] After receiving the raw operating condition data in step S31, a preset analysis strategy is obtained. If the preset analysis strategy is the second analysis strategy, the raw operating condition data is matched using a periodic function model. The matched interval is determined as a periodic morphological segment. The periodic function model includes at least one of a sine wave model, a triangular wave model, a square wave model, and an exponential oscillation model. The periodic morphological segment includes at least one of a sine wave segment, a triangular wave segment, a square wave segment, and an exponential oscillation segment. The second analysis strategy refers to a preset analysis mode, which needs to be selected by the user through a selection operation. If the user does not select an analysis strategy, the first analysis strategy is used by default for subsequent analysis processing. If the user selects the second analysis strategy, the execution steps of this embodiment are executed. The second analysis strategy uses periodic function model matching to perform feature recognition and segmentation processing on the raw operating condition data. The periodic function model is a set of predefined mathematical waveform templates, including a sine wave model, a triangular wave model, a square wave model, and an exponential oscillation model. Each periodic function model describes the periodic change of amplitude over time. A periodic waveform segment refers to a continuous interval in the original waveform that conforms to a certain periodic function model. Based on the type of periodic function model being matched, it can be divided into sine wave segments, triangular wave segments, square wave segments, and exponential oscillation segments. Periodic function model matching refers to determining whether a waveform segment conforms to a periodic function model by calculating the similarity between the waveform segment and the waveform template of the periodic function model (such as cross-correlation, spectral analysis, or time-domain error integration).

[0078] For example, a sliding window approach can be used to detect the period of the original waveform (i.e., the original operating condition data). Specifically, the main period of the waveform can be calculated first using the autocorrelation function or peak interval statistics. If there is obvious periodicity (e.g., the second peak of the autocorrelation function exceeds 60% of the first peak), a complete period of waveform data is extracted as a candidate segment. Then, the candidate segments are compared sequentially with four periodic function models. For example, for the sine wave model, the segment spectrum of the candidate segment can be calculated. If the fundamental frequency of the segment spectrum (i.e., the segment spectrum) accounts for more than 90% of the total energy and there are no significant harmonics, it is determined to be a sine wave. For the triangular wave model, it can be detected whether the rise time and fall time of the candidate segment waveform are approximately equal and the absolute value of the slope is constant, and whether the time-domain waveform exhibits linear rise and linear fall. For the square wave model, it can be detected whether the high-level and low-level durations of the candidate segment waveform and the steepness of the edges (rise or fall time much shorter than the period) are detected. For the exponential oscillation model, it can be detected whether the waveform of the candidate segment is an exponentially decaying or increasing sinusoidal oscillation (e.g., the response of an RLC circuit), which can be determined by fitting the envelope. In the aforementioned process of comparing candidate segments sequentially with four periodic function models, the matching degree can be quantified using the normalized cross-correlation coefficient or the reciprocal of the sum of squared errors. If the normalized cross-correlation coefficient is greater than a preset threshold (e.g., 0.9), a successful match is determined. Then, starting from the starting position of a successful match, the scan continues backward to identify whether subsequent periods have the same model type and similar parameters (e.g., frequency change greater than 5%, amplitude change less than 10%). Multiple consecutive periods are merged into a single periodic morphological segment. If only a single period matches (and subsequent periods do not repeat), it is still marked as a periodic morphological segment, but it belongs to a single state. For each periodic morphological segment, the following characteristics are recorded: waveform type (e.g., sine, triangular, square, or exponential oscillation), fundamental frequency f, peak-to-peak amplitude A_pp, and repetition count N. Additionally, for exponential oscillation segments, the envelope time constant τ_env needs to be extracted. The identified intervals are then labeled as the corresponding periodic morphological segments, such as sine, triangular, square, and exponential oscillation segments, and added to the waveform morphological segment list in chronological order. For intervals that do not match any periodic function model, the system retains them for subsequent processing as basic morphological segments.

[0079] In one embodiment, the periodic waveform segment may also contain a steady-state segment. For waveform intervals that fail to match any periodic function model (i.e., "non-periodic intervals"), it can be determined whether a steady-state segment exists within them. Specifically, the amplitude sequence of the waveform interval (i.e., the "non-periodic interval") is traversed, and the difference ΔV between the maximum and minimum amplitude values ​​within a local sliding window (e.g., a window width of 0.5 seconds) is calculated. If ΔV is less than a preset steady-state fluctuation threshold (e.g., 0.1V), and there is no obvious upward / downward trend within the window (which can be determined by the absolute value of the linear regression slope being less than a certain threshold), then the center point of the window is marked as a steady-state candidate point. Continuous and overlapping steady-state candidate points are merged into a steady-state segment. The start time, end time, average amplitude, and duration of the steady-state segment are recorded. It should be noted that the aforementioned steady-state segment judgment strategy can be configured in the second analysis strategy, or it can be downgraded to the first analysis strategy, making a judgment based on the steady-state segment judgment strategy in the first analysis strategy. If there is no steady-state segment (i.e., it is always changing) within a certain non-periodic interval, the first analytical strategy can be used to determine whether the interval belongs to other basic form segments. If the first analytical strategy determines that the corresponding interval does not belong to any basic form segment, the interval is marked as an arbitrary band.

[0080] In one embodiment, Figure 6 This is a schematic diagram of a segmentation of a periodic morphological segment provided in this application, for reference. Figure 6 By segmenting the data in this embodiment, the periodic waveform segments corresponding to the original operating condition data can be obtained as follows: steady-state segment, sine wave segment, triangular wave segment, square wave segment, exponential segment (determined based on the first analysis strategy when the second analysis strategy cannot resolve the waveform), and square wave segment. For example, for the first sine wave segment (5-11 seconds), the corresponding characteristic parameters are: waveform type is sine wave, fundamental frequency f is 50Hz, peak-to-peak amplitude A_pp = 10V, and repetition count N is 1.

[0081] As described above, this embodiment can automatically identify repetitive structures in waveforms (original operating condition data) by matching periodic function models, and merge multiple cycles into a single waveform shape segment. Compared with the aforementioned basic shape segment, this embodiment can compress a periodic waveform that may have been split into dozens of ramp segments or steady-state segments into a single periodic shape segment, which greatly reduces the number of subsequent instruction objects and can further reduce data storage and transmission overhead.

[0082] S33. Load the corresponding second instruction mapping rule according to the second parsing strategy.

[0083] After the aforementioned S32 identifies a periodic pattern segment, the corresponding second instruction mapping rule is loaded according to the second parsing strategy. The second instruction mapping rule is a mapping table used in conjunction with the second parsing strategy, specifying which type of test instruction object each periodic pattern segment should be instantiated as. For example, a sine wave segment is mapped to a sine wave output instruction, a triangular wave segment to a triangular wave output instruction, a square wave segment to a square wave output instruction, and an exponential oscillation segment to an exponential oscillation instruction. For instance, based on the currently active second parsing strategy, the second instruction mapping rule table is loaded from a configuration file or memory. The second instruction mapping rule table can be defined in key-value pair form; for example, a sine wave segment and a sine wave output instruction form a key-value pair; a triangular wave segment and a triangular wave output instruction form a key-value pair; a square wave segment and a square wave output instruction form a key-value pair; and an exponential oscillation segment and an exponential oscillation instruction (including the decaying envelope) form a key-value pair. Auxiliary mapping parameters are loaded simultaneously with the second instruction mapping rule table, such as whether to treat the repetition count as an independent parameter of the instruction object, and whether to allow mapping a single periodic pattern segment to an arbitrary wave instruction.

[0084] It should be noted that when the second parsing strategy fails to parse the corresponding waveform segment, the corresponding basic segment is determined based on the first parsing strategy, and the corresponding first instruction mapping rule table is loaded. The test instruction object of the corresponding basic segment is then mapped based on the first instruction mapping rule table.

[0085] As described above, this embodiment allows for flexible switching between different parsing strategies by explicitly loading mapping rules to adapt to different testing needs. For example, fine-grained (i.e., the first parsing strategy) can be used when precise waveform details are required, while medium-grained (i.e., the second parsing strategy) can be used when a high compression rate is required.

[0086] S34. According to the second instruction mapping rule, instantiate the periodic pattern segment into the corresponding test instruction object.

[0087] After loading the second instruction mapping rule in S33, the periodic shape segment is instantiated into a corresponding test instruction object according to the second instruction mapping rule. Instantiation refers to filling the attribute of the corresponding test instruction object with the feature parameters extracted from the periodic shape segment (such as frequency, amplitude, and number of repetitions), generating a self-contained instruction object that can be executed by the device under test (such as a power supply). The test instruction object refers to a periodic waveform output instruction object, which contains parameters such as waveform type, frequency, amplitude, number of repetitions, and start phase (optional). For example, all periodic shape segments identified in S32 are traversed, and an instantiation operation is performed on each periodic shape segment. For example, for a sine wave segment, a sine instruction object can be created and its attributes set, such as setting the waveform type to sine wave, the frequency to the fundamental frequency f of the segment, the peak-to-peak amplitude to A_pp, the number of repetitions to the number of repetitions N of the segment (N=1 if it is a single-pass state), and the duration to N / f (automatically calculated). For the triangular band, a triangular instruction object can be created and its properties set. These properties are similar to those described above, but can additionally include symmetry parameters (such as rise time percentage). For the square band, a square wave instruction object can be created and its properties set, including frequency, amplitude, and duty cycle (extracted from the waveform, defaulting to 50%). For the exponential oscillation band, an exponential oscillation instruction object can be created and its properties set as follows: center frequency as oscillation frequency, initial amplitude as envelope start value, decay time constant as τ_env, and number of oscillation periods (or duration). Each test instruction object also automatically binds auxiliary metadata (such as RMS and peak values) for interactive display.

[0088] In one embodiment, if the fundamental frequency of a certain periodic segment is lower than a preset low-frequency modulation threshold (e.g., 1Hz), it can be downgraded to an arbitrary wave command object, retaining the original data points internally to avoid distortion of the parameterized periodic command due to insufficient sampling. This processing can be determined by the low-frequency processing method in the parsing strategy configuration.

[0089] As described above, this embodiment avoids storing massive amounts of data point by point by directly instantiating periodic waveform segments into parameterized periodic waveform instructions (i.e., test instruction objects). For example, a sine wave band containing 1000 cycles may have hundreds of thousands of original data points. After instantiation, it can be represented by only one instruction object (containing 4 to 5 parameters), achieving a compression ratio of tens of thousands of times, thereby significantly reducing the memory usage and transmission time of the test sequence.

[0090] In one embodiment, a frequency threshold is determined according to a second analysis strategy. The frequency threshold is a preset frequency limit value used to distinguish between regular periodic signals and high-frequency ripple components. This frequency threshold can be manually set by the user based on the frequency response characteristics of the object under test or the test requirements, or it can be automatically generated by the system according to the industry application type in the analysis strategy. For example, the default frequency threshold is set to 1kHz in battery testing and 500Hz in photovoltaic testing. A regular periodic signal refers to a periodic waveform with a fundamental frequency not higher than the frequency threshold; this is a useful signal (such as power frequency or MPPT scan frequency). A high-frequency ripple component refers to a periodic waveform with a fundamental frequency higher than the frequency threshold; this is switching noise or parasitic oscillation superimposed on the useful signal, which may interfere with the main operating condition test. The fundamental frequency of each periodic segment is obtained and compared with the frequency threshold. If the fundamental frequency is below the frequency threshold, the periodic segment is instantiated into a corresponding test instruction object according to the second instruction mapping rule. If the fundamental frequency exceeds a frequency threshold, feature parameters are extracted from the periodic waveform segment, and a reconstructed waveform segment is generated based on the extracted feature parameters. The reconstructed waveform segment is then instantiated into a corresponding power supply test instruction object according to the second instruction mapping rule. The feature parameters include peak-to-peak value and frequency value. Alternatively, if the fundamental frequency exceeds a frequency threshold, the corresponding periodic waveform segment is filtered out.

[0091] For example, raw operating condition data is received, and under the second analysis strategy, periodic morphological segments (such as sine wave segments, triangular wave segments, square wave segments, and exponential oscillation segments) are identified through periodic function model matching. Parameters such as the fundamental frequency f, peak-to-peak amplitude A_pp, and repetition count N for each periodic morphological segment are extracted. The specific implementation process is the same as described above and will not be repeated here. Next, the frequency threshold in the second analysis strategy configuration is read. This frequency threshold is stored numerically in Hz (Hertz). For example, the user can set the frequency threshold to f_th=1000Hz in the configuration interface. If the configuration is not explicitly provided, a default value can be used according to the industry application type, such as 500Hz for battery testing, 1kHz for photovoltaic testing, and 2kHz for general power supplies. The read frequency threshold is saved in memory for use in subsequent steps. Then, all the previously identified periodic morphological segments are traversed, and the following operations are performed on each periodic morphological segment: the fundamental frequency f of the periodic morphological segment is extracted, and the fundamental frequency f is compared with the previously determined frequency threshold f_th. Based on the comparison result, different processing paths are entered. For example, if f is less than or equal to f_th, the periodic morphological segment belongs to a regular periodic signal and is normally instantiated as a test instruction object. The specific instantiation method is the same as in the previous embodiment and will not be repeated here. If f is greater than f_th, the periodic morphological segment belongs to a high-frequency ripple component. According to the high-frequency processing method field in the second parsing strategy configuration, feature parameters are extracted and a reconstructed waveform segment is generated before instantiation or the periodic morphological segment is directly filtered out. Feature parameter extraction refers to extracting only key statistical features, such as peak-to-peak value and fundamental frequency, from the high-frequency ripple component without retaining complete waveform data points. Reconstructing the waveform segment refers to generating a simplified waveform description based on the extracted feature parameters. For example, the waveform description is a constant-amplitude sine wave or a triangular wave, which is used for subsequent instantiation. The reconstructed waveform segment can be a parameterized instruction or a very simple data array. For example, when the high-frequency processing method in the second parsing strategy configuration is set to extract feature parameters, feature parameter extraction, reconstructed waveform segment generation, and instruction object instantiation are performed on periodic morphological segments where f is greater than f_th. During feature parameter extraction, peak-to-peak value V_pp and fundamental frequency f can be calculated from the periodic morphology segment. If needed, DC bias (average value) or duty cycle (for square waves) can also be extracted. When generating the reconstructed waveform segment, a reconstructed waveform segment can be created based on the extracted feature parameters. This reconstructed waveform segment is not a direct copy of the original data, but rather an ideal waveform synthesized based on the parameters. For example, if the original ripple is an approximate sine wave, it is reconstructed as an ideal sine wave; if it is a sawtooth ripple, it is reconstructed as a triangular wave. The length (i.e., duration) of the reconstructed waveform segment is the same as the original periodic morphology segment. When instantiating the instruction object, the reconstructed waveform segment can be instantiated as a test instruction object according to the second instruction mapping rule.For example, it can be instantiated as a ripple feature instruction object, which does not contain point-by-point data, but only carries V_pp, f, and duration. This ripple feature instruction object is added to the test instruction sequence in chronological order. When the high-frequency processing mode in the second parsing strategy configuration is set to filtering, periodic morphological segments with f greater than f_th are skipped directly; that is, no instruction object is created, and no waveform information is retained. The time span of this periodic morphological segment in the original operating condition data is still recorded, but the corresponding time interval in the sequence will have no instruction output; that is, the power supply maintains the final output value of the previous instruction or outputs zero during this period.

[0092] In one embodiment, for operating conditions containing high-frequency ripple (such as switching power supply output), the traditional method requires storing each oscillation cycle point by point, resulting in a huge amount of data to be stored. However, this embodiment automatically identifies high-frequency components by using a frequency threshold and extracts only characteristic parameters such as peak-to-peak value and frequency. This compresses the ripple, which may originally require thousands of data points, into a single instruction object, achieving a compression ratio of over a thousand times. If filtering is selected, noise data is completely removed, making the sequence more concise. This achieves adaptive compression of high-frequency noise, thereby reducing the amount of data processing and improving the overall efficiency of test sequence generation.

[0093] S35. Concatenate multiple test instruction objects in chronological order to generate the first test instruction sequence.

[0094] After obtaining multiple test command correspondences in S34, the multiple test command objects are concatenated in chronological order to generate the first test command sequence. For example, the test command objects corresponding to each periodic shape segment generated in S34 are concatenated sequentially according to their order on the original time axis to obtain the corresponding test command sequence. If there are no intervals in S32 that do not match the periodic function model, meaning the original operating condition data can be segmented into the corresponding periodic shape segments, then the concatenated data yields the corresponding first test command sequence. If there are intervals in S32 that do not match the periodic shape segments, such as random noise, the system's default parsing strategy, i.e., the first parsing strategy, can be invoked to split the corresponding intervals into basic shape segments and instantiate them into corresponding test command objects. These test command objects are then inserted into the corresponding positions in the test command sequence corresponding to the aforementioned periodic shape waveform to obtain the first test command sequence.

[0095] For example, refer to Figure 6The original working condition data is segmented and processed through the aforementioned embodiments to obtain corresponding waveform segments, namely steady-state segment, sine wave segment, triangular wave segment, square wave segment, exponential segment and square wave segment. Therefore, by instantiating and splicing these waveform segments, the test command objects of the first test command sequence are as follows: hold command object 1, sine command object 1, triangular command object 1, square wave command object 1, exponential command object 1 and square wave command object 2.

[0096] As described above, this embodiment compresses hundreds or thousands of cycles into a single instruction by matching periodic function models and parameterizing instruction objects, significantly reducing the data volume. This allows long-cycle tests to be fully loaded within the limited memory of devices (such as power supply equipment), avoiding feature loss caused by segmented import or downsampling. Furthermore, this embodiment can automatically identify the periodicity, calculation frequency, and repetition count in the original operating condition data waveform, and automatically generate corresponding test instruction sequences through autocorrelation, spectrum analysis, and template matching. Compared with traditional manual segment-by-segment analysis, this greatly shortens the processing time and thus significantly improves the overall efficiency of test instruction sequence generation.

[0097] Figure 7 This is a flowchart of another test sequence generation method provided in the embodiments of this application, referred to... Figure 7 The test sequence generation method specifically includes: S41. Receive raw operating condition data, wherein the raw operating condition data includes multiple data points arranged in chronological order, and each data point includes time information and amplitude information.

[0098] The specific execution method of this step is the same as that of S11 mentioned above, and will not be repeated here.

[0099] S42. When the preset parsing strategy is the third parsing strategy, obtain the target test type in the third parsing strategy, and load the corresponding target mapping rule according to the target test type. The target test type includes battery test type, photovoltaic test type and general power supply test type.

[0100] After receiving the raw operating condition data in step S41, a preset parsing strategy is obtained. If the preset parsing strategy is the third parsing strategy, the target test type in the third parsing strategy is obtained. The target test type includes battery test type, photovoltaic test type, and general power supply test type. The third parsing strategy is a preset parsing mode that needs to be selected by the user through a selection operation. If the user does not select a parsing strategy, the first parsing strategy is used by default for subsequent parsing processing. If the user selects the third parsing strategy, the execution steps of this embodiment are executed. The core objective of the third parsing strategy is to directly map the raw waveform data to test procedure segments with physical semantics (i.e., specification morphological segments) according to industry test specifications, rather than decomposing it into purely mathematical basic morphological segments (such as steady-state segments or ramp segments) or periodic morphological segments. The target test type refers to the industry field selected by the user, including battery test type, photovoltaic test type, and general power supply test type. Different test types correspond to different industry specification knowledge bases and mapping rules. For example, after receiving the raw operating condition data in step S41, the parsing strategy configuration is read to determine whether the current strategy is the third parsing strategy. If so, the target test type field is further read. Based on the target test type field, the corresponding target mapping rule is loaded from the local knowledge base or configuration file. The target mapping rule is stored in the form of a decision tree, state machine, or rule table. For example, if the target mapping rule is a battery test type rule, the target mapping rule includes: Constant current charging segment rule: the current is constant (e.g., the absolute value of the slope is less than 0.01A / s) and the voltage continuously increases (the amplitude monotonically increases), and the duration exceeds a preset time (e.g., 5 seconds). Constant voltage charging segment rule: the voltage is constant (e.g., the fluctuation is less than 0.05V) and the current decays exponentially (e.g., the slope conforms to an exponential model), and the duration exceeds a preset time (e.g., 10 seconds). Resting segment rule: both voltage and current are basically constant (e.g., voltage fluctuation is less than 0.05V and current fluctuation is less than 0.01A), and the duration exceeds a preset time (e.g., 10 seconds). Constant current discharging segment rule: the current is constant (negative value) and the voltage continuously decreases (the amplitude monotonically decreases). When the target mapping rule is a photovoltaic test type rule, the target mapping rules include: MPPT scan segment rule: the voltage exhibits periodic triangular or sine wave changes, with the frequency within a preset range (e.g., 0.1~10Hz), and the amplitude variation range exceeds a preset amount of the rated voltage (e.g., 10%). Constant voltage output segment rule: the voltage is constant (e.g., fluctuation less than 1%), and the duration exceeds a preset time (e.g., 1 second). Sudden illumination segment rule: the voltage or current undergoes a step change (e.g., the change value ΔV is greater than 20% of the rated value, and the change time is less than 100ms). If the target test type is a general power supply test type, there is no industry specification mapping, and the first parsing strategy (i.e., the default parsing strategy) is directly used. After loading the target mapping rules, you can prepare to directly segment and match the original waveform (i.e., the original operating condition data).As mentioned above, by loading the corresponding mapping rules according to the target test type, the knowledge of industry experts can be reused, giving the segmented results a direct physical meaning; users do not need to manually define the boundaries of each process, which greatly reduces the professional threshold for test sequence compilation.

[0101] S43. Perform segmented matching on the original working condition data according to the target mapping rules, and determine the matched intervals as the corresponding specification form segments. Each specification form segment corresponds to a preset working condition corresponding to the target test type.

[0102] After loading the target mapping rules in S42, the original operating condition data is segmented and matched according to the target mapping rules. The matched intervals are determined as the corresponding reduction form segments. Each reduction form segment corresponds to a preset operating condition corresponding to the target test type. A reduction form segment refers to a continuous waveform interval that conforms to a certain industry test specification, such as a constant current charging segment or an MPPT scanning segment. Each reduction form segment corresponds to a preset test condition (i.e., a test step defined in the industry standard). Segmented matching refers to scanning the original waveform (i.e., the original operating condition data) segment by segment, extracting local features (such as slope, amplitude range, duration, or trend), and comparing them with the conditions in the target mapping rules. When the complete conditions of a rule are met, the corresponding interval is marked as the reduction form segment. For example, after loading the target mapping rules in S42, the state is first initialized, for example, setting the current analysis window start pointer start=0, and the system state is in the search for reduction segments. Then, feature extraction is performed, for example, starting from the start position, gradually expanding the window, and calculating the statistical features within the window in real time. The statistical features include: average voltage / current values, trends (increasing / decreasing / steady-state), sign and stability of the slope, time constant of the fitting exponent (if applicable), period detection (if applicable), and duration. After feature extraction, rule matching is performed, such as comparing the extracted features with the target mapping rules for the current target test type one by one. For example, for battery testing, the rules for constant current charging, constant voltage charging, resting, and constant current discharging are attempted sequentially. Matching requires simultaneous satisfaction of amplitude, slope, and duration conditions. For example, the constant current charging rule requires an absolute current slope of less than 0.01 A / s, a current value within a preset range (e.g., 0.5~2 A), a monotonically increasing voltage, and a window length greater than 5 seconds. Once a match is successful, the window interval is marked as the corresponding reduction form segment (e.g., constant current charging segment), and its start time, end time, and key parameters (e.g., constant current value and cutoff voltage) are recorded. Then, the sliding window, for example, moves the start to the end of the current matching segment, and continues to scan backward, repeating the aforementioned feature extraction and rule matching until the entire waveform (i.e. all the original operating condition data) is processed.

[0103] In an embodiment, for intervals that cannot match any normalization rule, for example, a segment of random noise or a non-standard shape exists in the waveform, the system records the interval as an unsegmented region. After all normalized segments are identified, a second parsing strategy or a first parsing strategy is invoked for these unsegmented regions in a degraded manner to further split them into periodic pattern segments or basic pattern segments (such as steady-state segments, ramp segments, exponential segments or step segments), which are then instantiated into corresponding test instruction objects according to a second instruction mapping rule or a first instruction mapping rule.

[0104] Figure 8 is a schematic diagram of a normalized pattern segment provided by an embodiment of the present application, with reference to Figure 8 , through the aforementioned allocation and matching, a normalized pattern segment corresponding to a lithium battery test is output as a constant-current charging segment, a standing segment and a constant-current discharging segment. Wherein, the constant-current charging segment: 0-50s, the current is constant at 2A, and the voltage rises linearly from 3.0V to 4.0V. The standing segment: 50-80s, the current is 0A, and the voltage is substantially constant at 4.0V. The constant-current discharging segment: 80-130s, the current is constant at 2A, and the voltage drops linearly from 4.0V to 3.0V.

[0105] Through the aforementioned embodiments, a waveform pattern segment list is finally output, which includes normalized pattern segments and possible periodic pattern segments as well as basic pattern segments (from the degradation processing), arranged in chronological order. Figure 9 is a schematic diagram of a waveform pattern segment provided by an embodiment of the present application, with reference to Figure 9 , through the parsing by the aforementioned third parsing strategy, a charging segment is obtained; for other intervals where no normalized pattern segment is identified, parsing is performed through the second parsing strategy to obtain a sine wave segment, a triangular wave segment and a square wave segment; for intervals where no periodic pattern segment is identified, parsing is performed through the first parsing strategy to obtain a steady-state segment. Therefore, the finally obtained waveform pattern segments are sequentially a steady-state segment, a sine wave segment, a triangular wave segment, a square wave segment, a charging segment and a steady-state segment.

[0106] S44. Load a corresponding third instruction mapping rule according to a third parsing strategy.

[0107] After it is determined in the aforementioned S43 that the segment is a corresponding normalized pattern segment, the corresponding third instruction mapping rule is loaded according to the third parsing strategy. The third instruction mapping rule is an instruction mapping table matched with the target test type, and is used to convert the normalized pattern segment into a power supply test instruction object with industry semantics. For example, according to the current target test type (such as battery test), the corresponding third instruction mapping rule is loaded. The third instruction mapping rule is matched with a target mapping rule, where the target mapping rule is used to identify a normalized waveform segment, and the third instruction mapping rule is used to instantiate the normalized waveform segment into a test instruction object.

[0108] S45. According to the third instruction mapping rule, instantiate the specification mode segment into the corresponding test instruction object.

[0109] After loading the third instruction mapping rule in S44, the reduction form segment is instantiated into a corresponding test instruction object according to the third instruction mapping rule. Instantiation refers to creating a corresponding test instruction object based on the feature parameters extracted from the reduction form segment. Each instruction object is self-contained. For example, the waveform form segment list obtained in S43 (including the reduction form segment and possible basic form segments) is traversed, and each waveform form segment is instantiated. For example, the constant current charging segment is instantiated as a constant current charging command object, with corresponding characteristic parameters including constant current value, cutoff voltage, and duration; the constant voltage charging segment is instantiated as a constant voltage charging command object, with corresponding characteristic parameters including constant voltage value, cutoff current, and duration; the resting segment is instantiated as a resting command object, with corresponding characteristic parameters including resting voltage / current and duration; the constant current discharging segment is instantiated as a constant current discharging command object, with corresponding characteristic parameters including discharging current, cutoff voltage, and duration; the MPPT scan segment is instantiated as an MPPT scan command object, with corresponding characteristic parameters including scan frequency, voltage step size, and start / end voltage; and the constant voltage output segment is instantiated as a constant voltage output command object, with corresponding characteristic parameters including output voltage and duration.

[0110] In one embodiment, taking the constant current charging segment as an example, according to the aforementioned third instruction mapping rule, the constant current value, termination voltage value and duration of the segment are extracted to create a constant current charging instruction object. This constant current charging instruction object can be directly parsed and executed by the battery testing system, or it can be displayed in the human-machine interface, for example, as "constant current charging (2A, 4.2V cutoff)".

[0111] In one embodiment, when a base form segment obtained through degradation exists, it is instantiated into a corresponding test instruction object according to the first instruction mapping rule, such as a hold instruction object or a ramp instruction object. For example, a noise segment that cannot match the specification may be split into multiple step instruction objects and arbitrary wave instruction objects.

[0112] S46. Concatenate multiple test instruction objects in chronological order to generate the first test instruction sequence.

[0113] After instantiating multiple test instruction objects in S45, all test instruction objects are concatenated in chronological order to generate the first test instruction sequence. For example, refer to... Figure 8The original operating condition data is segmented through the aforementioned embodiments to obtain the corresponding waveform segments as follows: constant current charging segment, static segment and constant current discharging segment. Therefore, by instantiating and splicing these waveform segments, the test command objects of the first test command sequence are as follows: constant current charging command object 1, static segment and constant current discharging command object 1.

[0114] In one embodiment, reference is made to Figure 9 By segmenting the original operating condition data through the aforementioned embodiments, the corresponding waveform segments are obtained as steady-state segment, sine wave segment, triangular wave segment, square wave segment, charging segment, and steady-state segment. Therefore, by instantiating and splicing these waveform segments, the test command objects of the first test command sequence are as follows: hold command object 1, sine wave command object 1, triangular wave command object 1, square wave command object 1, charging command object 1, and hold command object 2.

[0115] In one embodiment, when the original waveform (i.e., the original operating condition data) contains intervals that do not conform to any industry specifications (such as abnormal pulses, startup transients, or measurement noise), the system will not forcibly classify it as a specification segment, but will automatically downgrade it to use the second parsing strategy or the first parsing strategy. The downgraded basic segment will be instantiated as a basic instruction object (such as the test instruction object corresponding to the basic segment) and will maintain the same sequence interface as the specification segment. For example, in battery testing, if a sudden voltage spike cannot match any charging, discharging, or resting rules, the system will identify it as a step segment and an arbitrary wave segment, and generate corresponding step instruction objects and arbitrary wave instruction objects. These test instruction objects can also be edited, deleted, or replaced.

[0116] Compared to the traditional method of manually converting industry test specifications into battery instruction sequences, this implementation automatically generates semantic test instruction objects by directly using the charging and discharging characteristics in the waveforms of raw operating condition data. This replaces the manual conversion process, significantly improving the automation and intelligence of test sequence generation, and thus increasing the efficiency of test sequence generation.

[0117] Figure 10 This is a flowchart of another test sequence generation method provided in the embodiments of this application, see below. Figure 10 After generating the first test instruction object in the aforementioned embodiments, the test sequence generation method further includes: S51. Display the sequence item list corresponding to the first test instruction sequence in the interactive interface, wherein each sequence item in the sequence item list corresponds one-to-one with a test instruction object.

[0118] After generating the first test instruction sequence in S14, a list of sequence items corresponding to the first test instruction sequence is displayed in the interactive interface. Each sequence item in the list corresponds one-to-one with a test instruction object. The interactive interface can be understood as a graphical user interface, which may run on host computer software and provide functions such as waveform display, instruction editing, and parameter setting. The sequence item list is a table or tree control arranged in chronological order, with each node (i.e., sequence item) corresponding to a test instruction object. The sequence item list includes columns for instruction type, key parameters (such as voltage, current, and duration), and sequence number. A test instruction object is an independent data structure that encapsulates the instruction type and parameters, such as a hold instruction object, ramp instruction object, sine instruction object, or constant current charging instruction object. For example, after generating the first test instruction sequence in the aforementioned embodiment, the first test instruction sequence is loaded into the interactive interface. The interactive interface first parses the type and parameters of each test instruction object in the first test instruction sequence, and then generates a sequence item list control. This sequence item list control is presented in tabular form.

[0119] In one embodiment, a waveform preview area, typically located at a preset position in the interactive interface, can be used to draw the reconstructed complete waveform in real time based on the current sequence item list. For example, the waveform preview area can be displayed above or below the corresponding sequence item list. The user can select any sequence item by clicking with the mouse; the selected sequence item will be highlighted and marked with a special color in the corresponding time period in the waveform preview area. Alternatively, only the waveform of the selected sequence item can be displayed in the waveform preview area. Figure 11 This is a first schematic diagram of an interactive interface provided in an embodiment of this application, referring to... Figure 11 Taking a first test instruction sequence of 8 sequence items as an example, after generating the first test instruction sequence, the interactive interface 10 displays a list 11 of sequence items corresponding to the first test instruction sequence. The list 11 includes sequence item 1, sequence item 2, sequence item 3, sequence item 4, sequence item 5, sequence item 6, sequence item 7, and sequence item 8. Each sequence item corresponds one-to-one with a test instruction object; for example, sequence item 1 corresponds to a sine instruction object.

[0120] As described above, by presenting the test instruction sequence in the form of a visual sequence item list, users can clearly understand the waveform structure and parameters of the entire test process at a glance, avoiding the difficulty of directly reading the raw data or copying the instructions. The intuitiveness of the sequence item list makes subsequent editing operations simple and efficient.

[0121] S52. Upon receiving a modification operation on a sequence item in the sequence item list, modify the first test instruction sequence according to the modification operation to generate a second test instruction sequence.

[0122] After the sequence item list is displayed in step S51, upon receiving a modification operation on a sequence item in the list, the first test instruction sequence is modified according to the modification operation to generate the second test instruction sequence. The modification operation refers to a user initiating a change command for a sequence item through the interactive interface. Modification operations include modifying the parameters of the instruction object (e.g., changing the voltage value), deleting a sequence item, inserting a new instruction object, copying and pasting a sequence item, and adjusting the order of sequence items. For example, after the sequence item list of the first test instruction sequence is displayed on the interactive interface, the system listens for interactive events related to the sequence item list. When a user clicks or double-clicks a sequence item (or clicks the "Edit" button), a parameter editing dialog box pops up or a parameter editing area is displayed at a preset location on the interactive interface. For example, for a ramp instruction object, a parameter editing dialog box pops up, displaying input boxes for the start voltage, end voltage, and duration. The user changes the end voltage from 5.0V to 5.5V and clicks "OK." The system updates the end voltage attribute of the test instruction object corresponding to the sequence item and recalculates the duration of the waveform segment, generating the corresponding second test instruction sequence. When the system detects that a user has selected one or more sequence items and pressed the Delete key or clicked the "Delete" button, the system removes the test instruction objects corresponding to these sequence items from the sequence container and reassembles the remaining test instruction objects in their original order. Simultaneously, the system automatically adjusts the timeline, shifting the start time of all test instruction objects following the deleted item forward to generate the corresponding second test instruction sequence. When the system detects that a user right-clicks a sequence item and clicks the "Insert After" menu control, a built-in instruction object is selected from the predefined built-in instruction object library, such as a step instruction object or a fault drop instruction object. The system pops up a parameter setting window, where the user enters parameters, such as 5.0V before the jump, 0V after the jump, and step time 0. The system inserts the newly created instruction object at the specified position and automatically recalculates the start time of the affected subsequent instruction objects to generate the corresponding second test instruction sequence. When the system detects that a user adjusts the order by dragging and dropping sequence items... The system verifies the time continuity after adjustment. For example, if a ramp command is moved before the hold command, it is necessary to check whether the voltage connection is reasonable. If it is reasonable, the waveform preview is reordered and updated to generate the corresponding second test command sequence.

[0123] As described above, users only need to locate the corresponding instruction object in the sequence item list, click "edit," and change the parameters for immediate effect. This significantly shortens the editing time of test instruction sequences and greatly improves test iteration efficiency. Furthermore, modifications such as inserting faults and adjusting the order do not require reprocessing the original data, thus enhancing the flexibility of test sequence generation.

[0124] In one embodiment, after displaying the sequence item list in S51, upon receiving a click operation on the first sequence item in the sequence item list, the first parameter information corresponding to the first sequence item is displayed, wherein the first parameter information includes amplitude, frequency, offset, phase, and repetition count; upon receiving a modification operation on the first parameter information, the modified second parameter information is determined based on the modification operation; a second sequence item is generated based on the second parameter information, and the second sequence item replaces the first sequence item in the sequence item list, generating a second test instruction sequence. For example, Figure 12 This is a second schematic diagram of an interactive interface provided in an embodiment of this application, referring to... Figure 12 The interactive interface 10 displays a list 11 of sequence items corresponding to the first test instruction object. When a user clicks or touches a sequence item in the list 11, that sequence item becomes the first sequence item. The first sequence item can be understood as the sequence item before modification. Assume the user clicks sequence item 1. Sequence item 1 in the list 11 is highlighted, and the type and current parameter value of the test instruction object corresponding to sequence item 1 are extracted. A parameter editing panel 12 pops up or is displayed in the interactive interface 1. A waveform preview area 13 is displayed next to the parameter editing panel 12, showing the waveform of sequence item 1, for example, a sine wave. The parameter editing panel 12 displays input boxes corresponding to amplitude, frequency, offset, phase, and repetition count, with the current value pre-filled in each input box. The system listens for input change events in the parameter editing panel 12. When the user modifies any parameter, the system receives the target parameter value input by the user, performs a validity check on the target parameter value, and determines the corresponding target parameter value as a valid value after the check passes. All valid values ​​in the input boxes are collected into a parameter set, called the second parameter information. In one embodiment, after the parameters are modified, the modified waveform segment can be temporarily drawn and displayed in the waveform preview area 13 based on the second parameter information. After obtaining the second parameter information, when the user confirms the modification, for example by clicking the OK control or pressing the Enter key, a new test instruction object is created according to the instruction type of sequence item 1 and the second parameter information. During creation, new parameters such as amplitude, frequency, offset, phase, and repetition count are filled into the object attributes. The position index of the first sequence item (i.e., sequence item 1) is found in the sequence container corresponding to the sequence item list 11, and the original test instruction object is replaced with the newly created test instruction object. The sequence item list 11 is displayed digitally. The updated sequence container content is stored in memory as the second test instruction sequence, and the entire sequence waveform is completely redrawn in the waveform preview area 13.

[0125] As described above, users can access the targeted parameter editing panel with a single click, eliminating the need to memorize the internal names or formats of parameters and significantly lowering the operational threshold. Furthermore, by directly replacing sequence items and automatically maintaining time continuity, the entire process of modifying parameters does not require re-analyzing the original waveform or manually adjusting subsequent instructions. This makes parameter adjustment as simple as editing a table. Especially when it is necessary to quickly test different excitation parameters, users only need to modify the frequency value and observe the waveform preview to generate a new test instruction sequence, greatly improving the efficiency of test parameter optimization.

[0126] S53. Upon receiving a save operation for a sequence item in the sequence item list, extract the test instruction object corresponding to the sequence item and save the test instruction object as a built-in instruction object.

[0127] After the sequence item list is displayed in S51, upon receiving a save operation for a sequence item in the list, the corresponding test instruction object is extracted and saved as a built-in instruction object. The save operation refers to the user saving one or more selected sequence items (i.e., test instruction objects) as a reusable template. This can be triggered via the "Save as Built-in Instruction" option in the right-click menu or the "Add to Library" button in the toolbar. A built-in instruction object is a predefined instruction object template stored in a configuration file or database, which can be directly referenced in other test sequences, avoiding duplicate creation. Built-in instruction objects can contain fixed parameters or be parameterized templates with placeholders. For example, the system provides a built-in instruction library function. When a user wants to save a test instruction object in the current sequence as a reusable template, the following steps are performed: The user selects one or more sequence items. Right-click and select "Save as Built-in Instruction" (or click the "Add to Library" icon in the toolbar). The system pops up a save dialog box, prompting the user to enter the name, category label, and optional descriptive text for the built-in instruction. The system extracts the test instruction object corresponding to the selected sequence item, deeply copies all its parameters (including instruction type, all parameter values, and metadata), and serializes it into an internal format (such as JSON or XML). The system stores this serialized data in a built-in instruction library file and updates the library index in memory. After successful saving, users can quickly call the built-in instruction object in the editing interface of subsequent test instruction sequences using the insert function, without needing to re-enter parameters. Furthermore, the system supports saving the entire sequence item list (or multiple selected sequence items) as a composite built-in instruction (i.e., a "subsequence" or "macro") for reuse in complex tests. In this embodiment, the saving and reuse of built-in instruction objects enables the accumulation and sharing of test knowledge. Users can solidify verified typical operating condition segments into the library, and then directly drag and drop them in subsequent tests, avoiding redundant definitions, significantly improving the efficiency of test sequence compilation, and reducing the risk caused by human error in parameter input.

[0128] In one example, during a modification operation, at least one built-in command control is displayed in the interactive interface, where each built-in command control corresponds to a built-in command object. Upon receiving a first drag-and-drop operation, the built-in command object corresponding to the dragged built-in command control is inserted into the corresponding position in the first test command sequence, generating a second test command sequence. The first drag-and-drop operation involves dragging the corresponding built-in command control between corresponding sequence items in the sequence item list. For example... Figure 13 This is a third schematic diagram of an interactive interface provided in an embodiment of this application, referring to... Figure 13At least one built-in instruction control 14 is displayed at a preset position on the interactive interface 10, such as a fault instruction control 141, a charging instruction control 142, and a discharging instruction control 143. Each built-in instruction control 14 supports mouse or touch drag operations. Furthermore, the system provides search and filtering functions to facilitate users quickly locating the required built-in instructions. When the system detects a user pressing and holding a built-in instruction control 14 with the mouse (or touch), dragging it to the sequence item list 11 area, and releasing it between two existing sequence items (e.g., releasing the mouse or finger), the first drag operation is triggered. The index corresponding to the release position is obtained. Based on the ID of the built-in instruction object corresponding to the dragged built-in instruction control 14, its complete definition is read from the built-in instruction library, and a deep copy is performed (creating an independent new test instruction object to avoid subsequent modifications affecting the original object in the library). If the built-in instruction object is a compound instruction (containing multiple sub-instructions), all sub-instructions are inserted sequentially. The deeply copied instruction object is inserted into the index position of the current first test instruction sequence. The start time of the affected subsequent sequence items is recalculated (because the duration of the inserted instruction object affects the time offset of all subsequent instructions). The display of sequence item list 11 is updated, and the corresponding sequence item is added. The updated test instruction sequence is named the second test instruction sequence and stored in memory. In one embodiment, if the user drags the control to an invalid area (such as a non-sequence item list area), the system does not perform any insertion and restores the cursor style.

[0129] As mentioned above, the built-in visual command controls eliminate the need for users to memorize complex command parameters or repeatedly input them manually. The commands are directly visible and draggable, significantly lowering the barrier to sequence editing. Furthermore, the categorization and search functions further improve search efficiency. Moreover, the insertion operation makes the assembly process of test command sequences extremely intuitive, significantly improving the efficiency of test command sequence editing. In addition, the cumulative effect of multiple drag-and-drop insertions allows users to quickly build complex test processes, greatly shortening the test accuracy time.

[0130] This application embodiment deconstructs the original operating condition data into a sequence of test instructions that the power supply can execute, eliminating the need for manual writing of test programs and realizing the conversion from data files to test programs, thus significantly improving test efficiency.

[0131] This application provides a test instruction object mapping that transforms millions of original operating condition data into a very small number of test instruction objects and parameters, significantly reducing storage and transmission overhead. At the same time, it fully preserves the electrical characteristics of the waveforms of the original operating condition data, avoids feature loss caused by visualization thinning, and balances data compression and feature preservation, thereby improving the reliability of the generated test instruction sequence.

[0132] The test instruction sequence generated in this embodiment consists of instruction objects with clear physical meaning. Users (such as testers) can directly edit or inject faults into a certain test instruction object, such as the charging stage or acceleration stage, which solves the technical problem of high modification difficulty in the traditional data stream mode. This embodiment provides semantic-level interactive capabilities, which significantly improves test editing efficiency.

[0133] Based on the above embodiments, this application also provides a test sequence generation device, which specifically includes: The data receiving module is used to receive raw operating condition data, which includes multiple data points arranged in chronological order. Each data point includes time information and amplitude information. The parsing module is used to perform waveform recognition and segmentation processing on the original working condition data according to the preset parsing strategy, and obtain multiple waveform morphology segments. The instruction mapping module is used to instantiate multiple waveform segments into multiple test instruction objects according to preset instruction mapping rules. The sequence generation module is used to concatenate multiple test instruction objects in chronological order to generate the first test instruction sequence.

[0134] The test sequence generation apparatus provided in this application embodiment can be used to execute the test sequence generation method provided in the above embodiment, and has corresponding functions and beneficial effects.

[0135] This application provides a test sequence generation device, which includes a processor, a memory, a communication module, an input device, and an output device. The test sequence generation device may have one or more processors, and the test sequence generation device may have one or more memories. The processor, memory, communication module, input device, and output device of the test sequence generation device can be connected via a bus or other means.

[0136] Memory, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the test sequence generation method described in any embodiment of this application. Memory may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a function; the data storage area may store data created based on the use of the device, etc. Furthermore, memory may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some instances, memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the device via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0137] The communication module is used for data transmission.

[0138] The processor executes various functional applications and data processing of the device by running software programs, instructions, and modules stored in memory, thereby realizing the test sequence generation method described above.

[0139] Input devices can be used to receive input numerical or character information, and to generate key signal inputs related to user settings and function control of the device. Output devices may include display devices such as displays.

[0140] The test sequence generation device provided above can be used to execute the test sequence generation method provided in the above embodiments, and has corresponding functions and beneficial effects.

[0141] This application also provides a storage medium for storing computer-executable instructions, which, when executed by a computer processor, are used to perform the aforementioned test sequence generation method.

[0142] Storage medium – any type of memory device or storage device. The term “storage medium” is intended to include: mounting media, such as CD-ROM, floppy disk, or magnetic tape devices; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (e.g., hard disk or optical storage); registers or other similar types of memory elements, etc. Storage medium may also include other types of memory or combinations thereof. Furthermore, storage medium may reside in a first computer system in which the program is executed, or it may reside in a different second computer system connected to the first computer system via a network (such as the Internet). The second computer system can provide program instructions to the first computer for execution. The term “storage medium” can include two or more storage media residing in different locations (e.g., in different computer systems connected via a network). Storage medium may store program instructions (e.g., specifically implemented as a computer program) executable by one or more processors.

[0143] Of course, the computer-executable instructions provided in the embodiments of this application are not limited to the test sequence generation method described above, but can also perform related operations in the test sequence generation method provided in any embodiment of this application.

[0144] The test sequence generation apparatus, storage medium, and test sequence generation device provided in the above embodiments can execute the test sequence generation method provided in any embodiment of this application. For technical details not described in detail in the above embodiments, please refer to the test sequence generation method provided in any embodiment of this application.

[0145] The above description is merely a preferred embodiment and the technical principles employed in this application. This application is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions that can be made by those skilled in the art will not depart from the scope of protection of this application. Therefore, although this application has been described in detail through the above embodiments, this application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of this application, the scope of which is determined by the scope of the claims.

Claims

1. A method for generating test sequences, characterized in that, include: Receive raw operating condition data, which includes multiple data points arranged in chronological order, and each data point includes time information and amplitude information; According to the preset parsing strategy, the original working condition data is subjected to waveform recognition and segmentation processing to obtain multiple waveform morphology segments; According to the preset instruction mapping rules, the multiple waveform segments are instantiated into multiple test instruction objects; The multiple test instruction objects are concatenated in chronological order to generate the first test instruction sequence.

2. The method according to claim 1, characterized in that, The original operating condition data is subjected to waveform recognition and segmentation processing according to a preset parsing strategy to obtain multiple waveform segments, including: When the preset parsing strategy is the first parsing strategy, the instantaneous slope of each data point in the original working condition data is calculated, and a slope sequence is constructed based on the instantaneous slope. Traverse the slope sequence, and segment the original working condition data according to the instantaneous slope and the corresponding amplitude information to obtain multiple basic morphological segments. The basic morphological segments include at least one of steady-state segment, exponential segment, ramp segment and step segment. Accordingly, the step of instantiating the multiple waveform segments into multiple test instruction objects according to the preset instruction mapping rules includes: The first instruction mapping rule is loaded according to the first parsing strategy; According to the first instruction mapping rule, the multiple basic morphological segments are instantiated into multiple corresponding test instruction objects.

3. The method according to claim 2, characterized in that, The process involves traversing the slope sequence and segmenting the original operating condition data based on the instantaneous slope and corresponding amplitude information to obtain multiple basic morphological segments, including: Traverse the slope sequence, identify the intervals in which the absolute value of the instantaneous slope of multiple consecutive data points is less than the first preset threshold and the corresponding amplitude fluctuation range is less than the second preset threshold, and determine the original working condition data segment corresponding to the interval as the steady state segment. Traverse the slope sequence to identify the intervals in which the absolute values ​​of the instantaneous slopes of multiple consecutive data points show a monotonically decreasing or monotonically increasing trend and the corresponding amplitude change rules conform to the exponential function model, and determine the original working condition data segment corresponding to the interval as the exponential segment; Traverse the slope sequence, identify the interval in which the sign of the instantaneous slope of multiple consecutive data points remains unchanged and the slope value is within the permissible fluctuation range, while the corresponding amplitude changes linearly with time, and determine the original working condition data segment corresponding to the interval as the slope segment; Traverse the slope sequence, identify the intervals where the amplitude change between two adjacent data points exceeds a third preset threshold and the duration of the change is less than a fourth preset threshold, and determine the original working condition data segment corresponding to the interval as a step segment.

4. The method according to claim 1, characterized in that, The original operating condition data is subjected to feature recognition and segmentation processing according to a preset parsing strategy to obtain multiple waveform segments, including: When the preset analysis strategy is the second analysis strategy, the original working condition data is matched with a periodic function model, and the matched interval is determined as a periodic shape segment. The periodic function model includes at least one of the sine wave model, the triangular wave model, the square wave model, and the exponential oscillation model. The periodic shape segment includes at least one of the sine wave segment, the triangular wave segment, the square wave segment, and the exponential oscillation segment. Accordingly, the step of instantiating the multiple waveform segments into multiple test instruction objects according to the preset instruction mapping rules includes: The corresponding second instruction mapping rule is loaded according to the second parsing strategy; According to the second instruction mapping rule, the periodic pattern segment is instantiated into the corresponding test instruction object.

5. The method according to claim 4, characterized in that, The step of instantiating the periodic pattern segment into a corresponding power test instruction object according to the second instruction mapping rule includes: The frequency threshold is determined according to the second parsing strategy; Obtain the fundamental frequency of each periodic morphological segment and compare the fundamental frequency with the frequency threshold. When the fundamental frequency is below the frequency threshold, the periodic morphological segment is instantiated into a corresponding test instruction object according to the second instruction mapping rule; When the fundamental frequency exceeds the frequency threshold, feature parameters are extracted from the periodic morphology segment and a reconstructed waveform segment is generated based on the extracted feature parameters. The reconstructed waveform segment is then instantiated into a corresponding power supply test instruction object according to the second instruction mapping rule. The feature parameters include peak-to-peak value and frequency value. Alternatively, if the fundamental frequency exceeds the frequency threshold, the corresponding periodic morphological segment is filtered out.

6. The method according to claim 1, characterized in that, The original operating condition data is subjected to feature recognition and segmentation processing according to a preset parsing strategy to obtain multiple waveform segments, including: When the preset parsing strategy is the third parsing strategy, the target test type in the third parsing strategy is obtained, and the corresponding target mapping rule is loaded according to the target test type. The target test type includes battery test type, photovoltaic test type and general power supply test type. The original working condition data is segmented and matched according to the target mapping rule, and the matched interval is determined as the corresponding reduction form segment. Each reduction form segment corresponds to a preset working condition corresponding to the target test type. Accordingly, the step of instantiating the multiple waveform segments into multiple test instruction objects according to the preset instruction mapping rules includes: The corresponding third instruction mapping rule is loaded according to the third parsing strategy; According to the third instruction mapping rule, the specification form segment is instantiated into the corresponding test instruction object.

7. The method according to claim 1, characterized in that, The step of instantiating the multiple waveform segments into multiple test instruction objects according to a preset instruction mapping rule includes: According to the preset instruction mapping rules, obtain the instruction template for each waveform segment; The feature data of each waveform segment is obtained and filled into the corresponding field of the corresponding instruction template to generate the corresponding test instruction object.

8. The method according to any one of claims 1-7, characterized in that, After concatenating the multiple test instruction objects in chronological order to generate the first test instruction sequence, the method further includes: The interactive interface displays a list of sequence items corresponding to the first test instruction sequence, and the sequence items in the list correspond one-to-one with the test instruction object. Upon receiving a modification operation on a sequence item in the sequence item list, the first test instruction sequence is modified according to the modification operation to generate a second test instruction sequence. Upon receiving a save operation for a sequence item in the sequence item list, the test instruction object corresponding to the sequence item is extracted and saved as a built-in instruction object.

9. The method according to claim 8, characterized in that, Upon receiving a modification operation on a sequence item in the sequence item list, the step of modifying the first test instruction sequence according to the modification operation to generate a second test instruction sequence includes: Upon receiving a click operation on the first sequence item in the sequence item list, the first parameter information corresponding to the first sequence item is displayed, including amplitude, frequency, offset, phase, and number of repetitions. Upon receiving a modification operation on the first parameter information, the modified second parameter information is determined based on the modification operation; A second sequence item is generated based on the second parameter information, and the second sequence item replaces the first sequence item in the sequence item list to generate the second test instruction sequence.

10. The method according to claim 8, characterized in that, Upon receiving a modification operation on a sequence item in the sequence item list, the step of modifying the first test instruction sequence according to the modification operation to generate a second test instruction sequence includes: At least one built-in instruction control is displayed in the interactive interface, and each built-in instruction control corresponds to a built-in instruction object. Upon receiving the first drag operation, the built-in instruction object corresponding to the dragged built-in instruction control is inserted into the corresponding position in the first test instruction sequence to generate the second test instruction sequence. The first drag operation is the operation of dragging the corresponding built-in instruction control between the corresponding sequence items in the sequence item list.