Charger communication test method and system, storage medium and program product

By continuously collecting the charging machine communication message data, extracting timing feature parameters, and establishing an association model, the problems of inefficiency of traditional testing methods and difficulty in simulating actual scenarios are solved, and more efficient and accurate communication testing is achieved.

CN119484331AActive Publication Date: 2025-02-18CSIC YUANZHOU BEIJINGTECH

Patent Information

Application Number
CN202411654819.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-19
Publication Date
2025-02-18
Estimated Expiration
2044-11-19

AI Technical Summary

Technical Problem

Traditional charging machine communication testing methods are inefficient, prone to test omissions and human errors, and it is difficult to simulate various communication scenarios during the actual charging process, resulting in potential communication problems being discovered during actual operation.

Method used

By continuously collecting the communication message data of the charger, extracting the message timing characteristic parameters, establishing an association model, using the model to accurately reproduce high-probability abnormal scenarios, actively verifying the communication response capabilities of the charger, and discovering potential communication risks.

Benefits of technology

It improves the accuracy and efficiency of the charging machine communication test, can actively discover communication risks, evaluate potential risks, and is more predictive and targeted.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119484331A_ABST
    Figure CN119484331A_ABST
Patent Text Reader

Abstract

The invention discloses a charger communication test method and system, a storage medium and a program product, and the method comprises the steps: obtaining a state parameter of a to-be-tested charger; collecting a communication message of the charger to be tested, and constructing a message time sequence queue; generating a message interval sequence reflecting the time sequence characteristics of the message; calculating a discrete degree coefficient of a message time sequence according to the message interval sequence; recording record data at an abnormal moment when the communication abnormality occurs, and inputting the record data into a preset state transition matrix to obtain a corresponding relationship; calculating probability distribution of communication abnormity under different state parameters to obtain a correlation model; generating a message sequence for testing based on the association model, wherein the time sequence characteristic of the message sequence for testing is the same as the state parameter and the dispersion degree coefficient corresponding to the high-probability abnormal scene of which the probability is greater than a preset probability threshold in the association model; and sending the test message sequence to the to-be-tested charger to detect response data of the to-be-tested charger. And the accuracy and efficiency of the communication test of the charger are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication testing, and in particular to a charger communication testing method, system, storage medium, and program product. Background Art

[0002] Communication testing is a critical step in the commissioning and maintenance of chargers, directly impacting their proper operation. Traditional charger communication testing methods typically rely on manual operations, requiring operators to individually check each data item in the communication protocol. This inefficient testing is also prone to omissions and human error, making it difficult to ensure comprehensiveness and accuracy. Furthermore, manual testing methods struggle to simulate the various communication scenarios encountered during actual charging, leading to potential communication issues being discovered only during actual operation.

[0003] In related technologies, a pre-programmed intelligent controller can be connected to a charger to simulate the electric vehicle's BMS system, sending standard communication messages. The built-in data analysis module then collects and analyzes the charger's response data. This method uses a timed polling method to sequentially verify the charger's communication functions during the handshake, parameter configuration, and charging control phases. The test results are recorded and stored in real time, improving the automation and efficiency of the test.

[0004] However, certain communication anomalies during the charging process may require specific message timing accumulation to be triggered, and this cumulative effect is closely related to factors such as the charger's operating time and temperature changes. Traditional single-message testing methods are difficult to detect communication failures with memory characteristics, reducing the accuracy and efficiency of the test. Summary of the Invention

[0005] The present application provides a charger communication testing method, system, storage medium and program product for improving the accuracy and efficiency of charger communication testing.

[0006] In a first aspect, the present application provides a charger communication test method for obtaining status parameters of a charger to be tested, the status parameters including temperature data, operating time data, and operating current data; Continuously collect communication messages of the charger to be tested within a preset collection period, and construct a message time sequence queue according to the order of reception time; Calculate the time intervals between adjacent messages in the message timing queue and generate a message interval sequence that reflects the message timing characteristics; Calculate the dispersion coefficient of the message timing according to the message interval sequence, and the dispersion coefficient represents the change law of the message sending time interval; When a communication anomaly is determined to have occurred, the discrete degree coefficient, state parameters, and communication anomaly type at the abnormal moment of the communication anomaly are recorded, and the recorded data is input into a preset state transition matrix to obtain a correspondence between the state parameters, discrete degree coefficient, and communication anomaly type. The recorded data is the discrete degree coefficient, state parameters, and communication anomaly type at the abnormal moment. The probability distribution of the communication anomaly occurring under different state parameters is calculated based on the preset state transition matrix to obtain an association model representing the triggering law of the communication anomaly. Generate a test message sequence based on the association model. The time series characteristics of the test message sequence are the same as the state parameters and dispersion coefficient corresponding to the high-probability abnormal scenario with a probability greater than a preset probability threshold in the association model. Send a test message sequence to the charger to be tested to detect the response data of the charger to be tested.

[0007] By adopting the above technical solution, communication message data is continuously collected, message timing characteristic parameters are extracted, and a correlation model is established between charger status parameters, message discreteness, and communication anomalies. This correlation model is then used to accurately reproduce high-probability anomaly scenarios, proactively verifying the charger's communication response capabilities. This enables proactive identification of communication vulnerabilities and assessment of potential risks, providing greater foresight and targetedness. By quantitatively analyzing the correlation between message timing characteristics and anomalies, the scientific nature and effectiveness of charger communication testing are improved. This technical solution improves the accuracy and efficiency of charger communication testing.

[0008] In conjunction with some embodiments of the first aspect, in some embodiments, calculating the dispersion coefficient of the message timing according to the message interval sequence specifically includes: Calculate the standard deviation of each time interval value in the message interval sequence to obtain the time interval fluctuation coefficient; The trend change rate of the message interval sequence is calculated based on the sliding weighted average algorithm. The trend change rate represents the change direction and speed of the message time interval; The time interval fluctuation coefficient and the trend change rate are weighted and fused to obtain the dispersion coefficient that represents the dispersion degree of message time series.

[0009] By adopting the above technical solution, the standard deviation of each time interval value in the message interval sequence is calculated to obtain the fluctuation coefficient, and the sliding weighted average algorithm is used to calculate the trend change rate to characterize the changing direction and speed of the time interval. These two indicators are weightedly fused to obtain the dispersion coefficient, which realizes the multi-dimensional quantitative representation of the discrete characteristics of the message time series. The dispersion coefficient can more comprehensively and accurately reflect the message time series characteristics, providing a reliable feature quantification basis for the subsequent identification and reproduction of abnormal scenarios.

[0010] In conjunction with some embodiments of the first aspect, in some embodiments, calculating the probability distribution of communication anomalies under different state parameters according to a preset state transition matrix specifically includes: Construct a state transition probability matrix, where the matrix elements represent the conditional probability of communication anomaly occurring under a set of state parameters and dispersion coefficients; Calculate the multi-step transition probability of state parameters and dispersion coefficient; Calculate the prior probability of various communication anomalies based on historical anomaly data; Combining multi-step transition probabilities and prior probabilities, the Bayesian formula is used to calculate the probability distribution of communication anomalies under different state parameter combinations.

[0011] By employing the above technical solution, a state transition probability matrix is ​​constructed, with the matrix elements representing the conditional probability of a communication anomaly occurring under given state parameters and dispersion coefficients. Multi-step transition probabilities are then calculated for the state parameters and dispersion coefficients. Prior probabilities for various communication anomalies are also calculated based on historical anomaly data. Finally, the Bayesian formula is used to calculate the probability distribution of communication anomalies under different state parameter combinations, combining the multi-step transition probabilities and prior probabilities. The introduction of the transition probability matrix and Bayesian inference imbues the state transition matrix with probabilistic meaning, enabling quantitative characterization of the conditional dependencies and dynamic evolution of anomaly occurrence. The calculation of multi-step transition probabilities considers the temporal correlation of state transitions, capturing the cumulative effects and path-dependencies of the anomaly triggering process. The use of prior probabilities leverages the statistical patterns of historical anomaly data, improving the reliability of probability estimation. This anomaly analysis method based on probabilistic graphical models mitigates the limitations of traditional rule- and threshold-based methods. It can globally characterize the relationship between state parameters, dispersion, and anomalies, quantify the probability distribution of anomaly risks, and thus improve test coverage and effectiveness.

[0012] In conjunction with some embodiments of the first aspect, in some embodiments, before sending the test message sequence to the charger to be tested, the method further includes: Segment the test message sequence into several test segments with different timing characteristics; Calculate the dispersion coefficient of each test segment; Optimize the timing characteristics of the test clips that do not match the target abnormal scene to obtain optimized test clips; The optimized test fragments are recombined to obtain a complete test sequence.

[0013] By adopting the above technical solution, the test message sequence is segmented and divided into several test segments with different timing characteristics; then the discrete degree coefficient of each test segment is calculated to determine whether it matches the target abnormal scenario; for the unmatched test segments, the timing characteristics are optimized to obtain the optimized test segments; finally, the optimized test segments are recombined to obtain the complete test sequence. The segmentation and timing optimization of the test sequence can further improve the accuracy and effectiveness of the abnormal test. By calculating the discrete degree coefficient in segments, the similarity between the test segment and the target abnormal scenario can be evaluated at a finer granularity, and local atypical feature segments can be identified. The timing characteristics of these segments are optimized to make them as close to the abnormal scenario characteristics as possible while meeting the constraints of the charging protocol. This can reduce the deviation between the test data and the real abnormal data and improve the confidence of the test.

[0014] In conjunction with some embodiments of the first aspect, in some embodiments, optimizing the timing characteristics of a test segment that does not match a target abnormal scenario to obtain an optimized test segment specifically includes: Calculate the deviation between the discrete degree coefficient of the test segment that does not match the target abnormal scene and the preset target value; Constructing an optimization objective function, and through iterative optimization, making the value of the optimization objective function less than a preset threshold while meeting the maximum and minimum time intervals specified in the charging protocol; The optimized time interval sequence is updated to the test segments that do not match the target abnormal scenario.

[0015] By adopting the above technical solution, the deviation between the discrete degree coefficient of the mismatched segment and the target value is calculated, and an optimization objective function is constructed. Under the time interval constraints specified in the charging protocol, an iterative optimization algorithm is used to make the objective function value less than a preset threshold, and the optimized time interval sequence is updated to the mismatched test segment. By introducing the optimization objective function, a quantitative measure of the deviation between the test segment timing characteristics and the abnormal scenario characteristics is established, so that the timing feature optimization problem can be transformed into the problem of solving the extreme value of the objective function. During the iterative optimization process, by dynamically adjusting the time interval sequence, the feature gap between the test segment and the real abnormal data is continuously narrowed, and ultimately the optimized test segment is highly fitted with the abnormal scenario in terms of timing characteristics. The time interval constraints that comply with the charging protocol are imposed during the optimization process, which improves the feasibility and effectiveness of the optimization results. By updating the optimized time interval sequence to the original test segment, the detailed features of the test sequence can be adjusted locally, reducing the overfitting problem that may be caused by global optimization and improving the quality and reliability of the test samples.

[0016] In conjunction with some embodiments of the first aspect, in some embodiments, the optimization objective function is: J=α×|S c -S t |+β×|V c -V t |+γ×|T c -T t | In the function, J is the optimization objective function, α, β and γ are weight coefficients and satisfy α+β+γ=1, S c is the current dispersion coefficient, S t is the target dispersion coefficient, V c is the current volatility coefficient, V t is the target volatility coefficient, T c is the current trend change rate, T t is the target trend change rate.

[0017] By employing the aforementioned technical solution, the objective function measures the deviation in temporal characteristics between the test clip and the abnormal scenario using three metrics: dispersion coefficient, fluctuation coefficient, and trend change rate. These three deviation metrics are then combined into a single scalar optimization objective through a weighted summation. The introduction of multiple feature deviation terms allows for a comprehensive characterization and multi-faceted evaluation of the test clip's temporal characteristics, reducing the potential for biased evaluation using a single metric and improving the accuracy and reliability of temporal feature optimization.

[0018] In conjunction with some embodiments of the first aspect, in some embodiments, after recombining the optimized test segments to obtain a complete test sequence, the method further includes: Construct a digital fingerprint of the complete test sequence and store the digital fingerprint in a preset database. The digital fingerprint includes the timing characteristics and state parameter information of the complete test sequence. Establish a database of mapping relationships between complete test sequences and communication anomalies; When a new communication anomaly is detected, the feature information of the new anomaly scenario is extracted and matched with each digital fingerprint in the mapping relationship database; When it is determined that no corresponding digital fingerprint is matched, a new digital fingerprint corresponding to the new abnormal scenario is stored in a preset database, and a mapping relationship corresponding to the new communication abnormality is stored in a mapping relationship database.

[0019] By employing the above technical solution, a digital fingerprint of the complete test sequence is constructed, condensing key information such as the test sequence's timing characteristics and state parameters into a digital feature vector, forming a refined representation of the test sample. Storing the digital fingerprint in a pre-set feature database enables efficient management and rapid retrieval of test sequences, facilitating subsequent test sequence comparison and reuse. A database mapping complete test sequences to communication anomalies is established, and a correlation model between test samples and anomaly types is constructed. This allows testers to quickly locate and select the corresponding test sequence based on anomaly type, improving the targetedness and efficiency of anomaly testing. The introduction of a digital fingerprint comparison mechanism allows for rapid determination of known anomaly types when a new anomaly is detected by extracting feature information from the new anomaly scenario and matching it with existing digital fingerprints. For unknown anomalies, their features can be extracted to construct a new digital fingerprint and store it in the feature database, continuously enriching and improving the anomaly feature library. This improves testing efficiency, enables continuous accumulation of testing experience for anomaly scenarios, and enhances the intelligence and practicality of the test system.

[0020] In a second aspect, an embodiment of the present application provides a charger communication test system, which includes: one or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to enable the system to execute the method described in the first aspect and any possible implementation of the first aspect.

[0021] In a third aspect, an embodiment of the present application provides a computer-readable storage medium comprising instructions, which, when executed on a system, enables the system to execute the method described in the first aspect and any possible implementation of the first aspect.

[0022] In a fourth aspect, an embodiment of the present application provides a computer program product, characterized in that when the computer program product is run on a system, the system executes the method described in any possible implementation manner in the first aspect.

[0023] One or more technical solutions provided in the embodiments of this application have at least the following technical effects or advantages: 1. This application provides a charger communication testing method that continuously collects communication message data, extracts message timing characteristic parameters, establishes a correlation model between charger status parameters, message discreteness, and communication anomalies, and uses the correlation model to accurately reproduce high-probability anomaly scenarios, actively verifying the charger's communication response capability, and can proactively discover communication hazards and assess potential risks with greater foresight and pertinence. By quantitatively analyzing the correlation between message timing characteristics and anomalies, the scientific nature and effectiveness of charger communication testing are improved. This technical solution improves the accuracy and efficiency of charger communication testing.

[0024] 2. The present application provides a charger communication test method, which segments the test message sequence and divides it into several test segments with different timing characteristics; then calculates the discrete degree coefficient of each test segment to determine whether it matches the target abnormal scenario; for the unmatched test segments, optimizes the timing characteristics to obtain optimized test segments; finally, recombines the optimized test segments to obtain a complete test sequence. The segmentation and timing optimization of the test sequence can further improve the accuracy and effectiveness of the abnormal test. By calculating the discrete degree coefficient in segments, the similarity between the test segment and the target abnormal scenario can be evaluated at a finer granularity, and local atypical feature segments can be identified. The timing characteristics of these segments are optimized to make them as close to the abnormal scenario characteristics as possible while meeting the constraints of the charging protocol, which can reduce the deviation between the test data and the real abnormal data and improve the confidence of the test.

[0025] 3. The present application provides a charger communication test method, which calculates the deviation between the discrete degree coefficient of the mismatched segment and the target value, constructs an optimization objective function, and uses an iterative optimization algorithm to make the objective function value less than a preset threshold under the time interval constraint conditions specified in the charging protocol, and updates the optimized time interval sequence to the mismatched test segment. By introducing the optimization objective function, a quantitative measure of the deviation between the test segment timing characteristics and the abnormal scene characteristics is established, so that the timing feature optimization problem can be transformed into an extreme value solution problem of the objective function. In the iterative optimization process, by dynamically adjusting the time interval sequence, the feature gap between the test segment and the real abnormal data is continuously narrowed, and finally the optimized test segment is highly fitted with the abnormal scene in terms of timing characteristics. The time interval constraints that comply with the charging protocol are imposed during the optimization process, which improves the feasibility and effectiveness of the optimization results. By updating the optimized time interval sequence to the original test segment, the detailed features of the test sequence can be adjusted locally, reducing the overfitting problem that may be caused by global optimization and improving the quality and reliability of the test samples. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1This is a flow chart of a charger communication testing method in an embodiment of the present application.

[0027] Figure 2 This is another flow chart of a charger communication testing method in an embodiment of the present application.

[0028] Figure 3 This is a schematic diagram of the physical device structure of a charger communication test system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0029] The terms used in the following examples of the present application are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the specification and appended claims of this application, the singular expressions "a," "an," "said," "above," "the," and "this" are intended to include plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" used in this application refers to any or all possible combinations comprising one or more of the listed items.

[0030] In the following, the terms "first" and "second" are used for descriptive purposes only and should not be understood to imply or suggest relative importance or implicitly indicate the number of the technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include one or more of the features. In the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.

[0031] The following uses an embodiment and combines Figure 1 , a charger communication test method according to an embodiment of the present application is described: See also Figure 1 , is a flow chart of a charger communication testing method in an embodiment of the present application.

[0032] S101. Acquire status parameters of the charger to be tested, continuously collect communication messages of the charger to be tested within a preset collection period, and construct a message time sequence queue based on the order of reception time. The system obtains the status parameters of the charger under test, including temperature data, operating time data, and operating current data. It continuously collects communication messages from the charger under test within a preset collection period and constructs a message timing queue according to the order of reception time.

[0033] The system acquires the status parameters of the charger under test, including temperature data, operating time data, and operating current data. Temperature data can be collected by temperature sensors installed inside or outside the charger and used to monitor temperature changes in key components of the charger. Operating time data can be obtained by recording the charger's startup time and cumulative operating time and used to evaluate the charger's service life and reliability. Operating current data can be used to detect the charger's output current in real time through a current sampling circuit to determine the charger's load status and operating stability. In addition to the three types of status parameters mentioned above, the system can also obtain other parameters reflecting the charger's operating status, such as output voltage, battery charge, fault codes, etc., to achieve comprehensive monitoring of the charger's status.

[0034] During the preset acquisition cycle, the system continuously collects communication messages from the charger under test. The acquisition cycle can be set based on the characteristics of the charger communication protocol and the test requirements, ensuring that the time resolution of the acquisition meets the accuracy requirements of anomaly detection while also taking into account the efficiency of data storage and processing. The acquisition of communication messages can be achieved by connecting a signal acquisition device in parallel to the charger communication line. This device can convert the communication message into a digital signal and record the reception timestamp to form the original message data stream. In addition, for different types of charger communication interfaces, such as CAN and RS485, the system can select corresponding communication adapters and parsing software to support compatible access and unified management of multiple chargers.

[0035] The system constructs a message timing queue for the collected communication messages in the order of reception time. Specifically, a first-in-first-out (FIFO) data buffer can be created, and the received messages and their timestamps can be pushed into the queue in sequence to form a message sequence arranged in chronological order. In order to facilitate subsequent timing feature analysis, the system can pre-process the message queue, such as filtering invalid messages, correcting time drift, etc., to improve data quality. At the same time, considering that the communication behavior of the charger under different working conditions may be different, the system can also segment the message queue according to the changes in state parameters, generate sub-queues corresponding to specific working conditions, and provide support for fine-grained anomaly detection.

[0036] S102, calculating the time intervals between adjacent messages in the message timing queue, and generating a message interval sequence reflecting the message timing characteristics; The system calculates the time intervals between adjacent messages in a message timing queue and generates a message interval sequence that reflects the message timing characteristics. Specifically, it iterates over each message in the message queue, subtracts its reception timestamp from the timestamp of the previous message, and calculates the time interval between adjacent messages. All interval values ​​are stored in sequence to form a message interval sequence. The message interval sequence intuitively reflects the transmission frequency and time distribution characteristics of communication messages and is an important indicator for evaluating message timing characteristics.

[0037] To fully explore the inherent laws of message timing, the system can perform statistical analysis on the message interval sequence and calculate a series of indicators reflecting the timing characteristics, such as mean, variance, median, etc., to characterize the central tendency and dispersion of the message time distribution. In addition, considering that communication anomalies may cause sudden or gradual changes in message intervals, the system can also use a sliding window method to perform local analysis on the interval sequence, tracking the dynamic changes of the interval in real time and promptly detecting abnormal fluctuations. At the same time, the normal range of message intervals may vary for different types of chargers and communication protocols. The system can set interval thresholds based on historical data or expert experience, mark intervals that exceed the threshold as abnormal, and provide a judgment basis for anomaly detection.

[0038] S103, calculating the dispersion coefficient of the message timing according to the message interval sequence; The dispersion coefficient of the message timing is calculated based on the message interval sequence. The dispersion coefficient represents the variation pattern of the message sending time interval. Specifically, the standard deviation of each time interval value in the message interval sequence is calculated to obtain the time interval fluctuation coefficient. The trend change rate of the message interval sequence is calculated based on the sliding weighted average algorithm. The trend change rate represents the change direction and change speed of the message time interval. The time interval fluctuation coefficient and the trend change rate are weighted and fused to obtain the dispersion coefficient that represents the dispersion degree of message time series.

[0039] The system calculates the standard deviation of each time interval in the message interval sequence to obtain the time interval fluctuation coefficient. The standard deviation is a common indicator of data dispersion. A larger fluctuation coefficient indicates more drastic fluctuations in message intervals and less stable communication. By tracking the changing trend of the fluctuation coefficient, communication quality can be assessed, providing a basis for anomaly warnings.

[0040] The system calculates the trend rate of change of a message interval sequence using a sliding weighted average algorithm. The trend rate indicates the direction and speed of change in the message interval. Specifically, a sliding window of a certain length is selected and a weighted average is taken of the interval values ​​within the window. The weights are adjusted based on the distance from the current moment, resulting in a smoothed interval curve. This curve is then differentiated to determine the trend rate of change. By analyzing the sign and magnitude of the rate of change, it is possible to determine whether the interval is increasing or decreasing, and whether the change is gradual or drastic, thereby inferring whether there is a risk of abnormal communication.

[0041] The system combines the time interval fluctuation coefficient and the trend change rate through a weighted fusion to derive a dispersion coefficient that comprehensively reflects the degree of discreteness in message timing. During this fusion process, the weighting of the two indicators can be dynamically adjusted based on their importance and sensitivity. For example, the weighting of the fluctuation coefficient can be increased when volatility is high, while the weighting of the trend change rate can be increased when changes are rapid. This allows the dispersion coefficient to more accurately reflect the communication status. The system can also set a threshold or reference interval for the dispersion coefficient. When the dispersion coefficient exceeds the normal range, an abnormality alarm is triggered, prompting relevant personnel to diagnose and address the problem.

[0042] S104. When a communication anomaly is determined to have occurred, the discrete degree coefficient, state parameters, and communication anomaly type at the moment the communication anomaly occurs are recorded, and the recorded data is input into a preset state transition matrix to obtain a corresponding relationship between the state parameters, discrete degree coefficient, and communication anomaly type; When the system determines that a communication anomaly has occurred, it records the discrete degree coefficient, state parameters, and communication anomaly type at the abnormal moment when the communication anomaly occurs, and inputs the recorded data into a preset state transition matrix to obtain the corresponding relationship between the state parameters, discrete degree coefficient, and communication anomaly type. The recorded data is the discrete degree coefficient, state parameters, and communication anomaly type at the abnormal moment.

[0043] When the system determines that a communication anomaly has occurred, it records the dispersion coefficient, state parameters, and type of communication anomaly at the moment the communication anomaly occurred. The determination of communication anomalies can be based on preset anomaly detection rules, such as when the message interval exceeds a threshold or when the dispersion coefficient exceeds a control limit. When the anomaly triggering conditions are met, the system automatically marks the moment the anomaly occurs and collects various parameter indicators at that moment. The dispersion coefficient reflects the degree of dispersion of the communication message sequence at the moment of the anomaly, state parameters such as temperature and current reflect the working state of the charger at the moment of the anomaly, and the communication anomaly type describes the manifestation of the anomaly, such as message loss or malformed messages. By recording these three types of key information, the scenario in which the communication anomaly occurs can be fully described, providing data support for analysis of the anomaly mechanism.

[0044] The system inputs recorded abnormal data into a preset state transition matrix and, through table lookup, determines the correspondence between state parameters, discrete coefficients, and communication anomaly types. The state transition matrix is ​​a multidimensional data structure that pre-stores the probability distribution of abnormalities under various state combinations, reflecting the correlation between charger state changes and communication anomalies. By inputting abnormal data for matching, the most likely abnormality type for the current state can be quickly identified, avoiding the time-consuming traversal search and improving the efficiency of anomaly diagnosis. The matching results also verify the validity of the state transition matrix, providing new samples for its dynamic optimization.

[0045] S105. Calculate the probability distribution of communication anomalies under different state parameters according to a preset state transition matrix to obtain an association model representing a triggering rule of the communication anomaly. The system calculates the probability distribution of communication anomalies under different state parameters based on the preset state transition matrix, and obtains an association model that represents the triggering rules of communication anomalies. Specifically, the system constructs a state transition probability matrix, in which the matrix elements represent the conditional probability of communication anomalies under a set of state parameters and dispersion coefficients. Calculate the multi-step transition probability of state parameters and dispersion coefficient; Calculate the prior probability of various communication anomalies based on historical anomaly data; Combining multi-step transition probabilities and prior probabilities, the Bayesian formula is used to calculate the probability distribution of communication anomalies under different state parameter combinations.

[0046] The system constructs a state transition probability matrix. The rows and columns of the matrix correspond to combinations of various charger state parameters and discrete coefficients, respectively. The matrix elements represent the probability of transitioning from one state combination to another. These transition probabilities can be obtained through statistical analysis of large amounts of historical operating data and reflect the general patterns of charger state evolution. During the construction process, the system can employ data mining algorithms, such as association rule mining and temporal pattern mining, to automatically extract state transition patterns from massive amounts of heterogeneous data. This overcomes the limitations of manual summarization and comprehensively reveals the temporal correlations of charger behavior.

[0047] Based on a Markov chain model, the system calculates multi-step transition probabilities for state parameters and dispersion coefficients. Because state transitions are time-dependent, the current state depends not only on the state at the previous moment but also on the sequence of previous states. Multi-step transition probabilities characterize the likelihood of reaching the current state after multiple transitions from the initial state, comprehensively considering the historical trajectory of state evolution. The system employs a dynamic programming algorithm to efficiently solve multi-step transition probabilities by iteratively calculating the power of the state transition matrix, thus avoiding the problem of state space explosion. Furthermore, the system can incorporate a time-varying Markov model to account for the time-varying state transition mechanism itself, dynamically updating the transition probability matrix and improving the adaptability of the prediction.

[0048] Based on historical anomaly data, the system calculates the prior probability of various communication anomalies. Prior probabilities reflect the frequency of occurrence of different anomaly types and serve as crucial prior knowledge for anomaly inference. The system can perform statistical analysis on anomaly logs and alarm records to determine the frequency and proportion of each type of anomaly. It then uses methods such as maximum likelihood estimation to calibrate the probability values, improving the reliability of the prior probabilities.

[0049] S106. Generate a test message sequence based on the association model; The system generates a test message sequence based on the association model. The timing characteristics of the test message sequence are the same as the state parameters and dispersion coefficient corresponding to the high-probability abnormal scenario with a probability greater than a preset probability threshold in the association model.

[0050] The system generates a test message sequence based on the association model. The timing characteristics of the test message sequence are the same as the state parameters and discreteness coefficients corresponding to high-probability abnormal scenarios in the association model with probabilities greater than the preset probability threshold. The association model describes the probabilistic mapping relationship between charger state changes and communication anomalies. The abnormal scenarios with higher probabilities in the model reflect communication problems that are more likely to be triggered by the charger under specific conditions and are the focus of abnormality testing. Therefore, the system prioritizes high-probability abnormal scenarios, extracts their corresponding state parameters and discreteness coefficients, and uses them as reference indicators for generating test messages. By designing message sequences with the same timing characteristics, it constructs the test samples that are most likely to cause anomalies, thereby achieving targeted abnormality testing.

[0051] Test message generation must satisfy constraints on both state parameters and the dispersion coefficient. For state parameters, the system sets the data content of the corresponding fields in the message based on the parameter values ​​in the abnormal scenario, such as temperature and current, to simulate the charger's communication behavior in that state. For the dispersion coefficient, the system controls the time interval distribution of generated messages to ensure that its statistical characteristics are consistent with the dispersion coefficient in the abnormal scenario. For example, by adjusting the frequency and randomness of message transmission, fluctuations and trends that meet the target dispersion are introduced.

[0052] S107: Send a test message sequence to the charger to be tested to detect response data of the charger to be tested.

[0053] The system sends a sequence of test messages to the charger under test and, by monitoring the charger's response data, evaluates its communication performance and anti-interference capabilities in abnormal scenarios. Specifically, the system establishes a connection with the charger using a communication interface and sends test messages to the charger in a predetermined timing pattern, following a generated test message sequence. Simultaneously, the system monitors the charger's response messages in real time, recording key data such as the response time and content for subsequent anomaly analysis.

[0054] During the test message transmission process, the system can implement a series of measures to improve the effectiveness and reliability of the test. For example, the system can select the appropriate communication adapter and transmission method based on the charger's communication protocol and interface type to ensure that the test message is accurately transmitted to the charger. Furthermore, to simulate the complexity of the actual communication environment, the system can also introduce artificial interference factors such as signal attenuation and electromagnetic interference to examine the charger's communication stability under adverse conditions. Furthermore, given that the charger's response may exhibit a certain degree of randomness and delay, the system needs to set a reasonable time tolerance and retry mechanism when determining an abnormal response to avoid false alarms due to occasional factors.

[0055] In the above-mentioned embodiment, communication message data is continuously collected, message timing characteristic parameters are extracted, and a correlation model is established between charger status parameters, message discreteness, and communication anomalies. This correlation model is then used to accurately reproduce high-probability anomaly scenarios, proactively verifying the charger's communication response capabilities. This proactively identifies communication vulnerabilities and assesses potential risks, providing greater foresight and pertinence. By quantitatively analyzing the correlation between message timing characteristics and anomalies, the scientific nature and effectiveness of charger communication testing are enhanced. This technical solution improves the accuracy and efficiency of charger communication testing.

[0056] The above embodiment provides a charger communication test method based on the state transition matrix and the association model. In order to further improve the accuracy and test effect of the test sequence, another charger communication test method is introduced below. After generating the test message sequence, this method improves the test sequence through segment optimization and digital fingerprint feature matching, and establishes a mapping relationship database between abnormal scenarios and test sequences to achieve the accumulation and reuse of test experience. Figure 2 , another charger communication test method in the embodiment of the present application is described: See also Figure 2 , is another flow chart of a charger communication testing method in an embodiment of the present application.

[0057] S201, segmenting the test message sequence into several test segments with different timing characteristics; When the system performs segmented processing on the test message sequence, it can be implemented in a variety of ways. One feasible solution is that the system first pre-processes the test message sequence, including noise removal, normalization and other operations, and then divides it into multiple continuous time windows based on the timestamp information of the message sequence. Next, the system extracts features from the message sequence in each time window to obtain the timing feature vector of the time window. The timing features here can include message sending frequency, message length distribution, message type distribution, etc. Finally, the system merges time windows with similar timing features through clustering algorithms (such as K-means, DBSCAN, etc.) to form several test segments. Each test segment represents the communication behavior pattern of the test message sequence over a period of time.

[0058] Furthermore, the system can leverage deep learning models to automatically learn the temporal features of test message sequences and segment them based on the learned feature representations. For example, the system can use an attention-based sequence-to-sequence model (such as the Transformer) to encode the entire message sequence and then cluster it in the encoded feature space to generate distinct test segments. This approach can adaptively capture complex temporal patterns in message sequences without the need for manual feature design.

[0059] S202, calculating the discrete degree coefficient of each test segment, optimizing the temporal features of the test segments that do not match the target abnormal scene, and obtaining optimized test segments; The system calculates the discrete degree coefficient of each test segment and optimizes the temporal characteristics of the test segments that do not match the target abnormal scene to obtain the optimized test segments. Specifically, the deviation between the discrete degree coefficient of the test segments that do not match the target abnormal scene and the preset target value is calculated; Constructing an optimization objective function, and through iterative optimization, making the value of the optimization objective function less than a preset threshold while meeting the maximum and minimum time intervals specified in the charging protocol; The optimized time interval sequence is updated to the test segments that do not match the target abnormal scenario.

[0060] Among them, the optimization objective function is: J=α×|S c -S t |+β×|V c -V t |+γ×|T c -T t | In the function, J is the optimization objective function, α, β and γ are weight coefficients and satisfy α+β+γ=1, S c is the current dispersion coefficient, S tis the target dispersion coefficient, V c is the current volatility coefficient, V t is the target volatility coefficient, T c is the current trend change rate, T t is the target trend change rate.

[0061] After obtaining the test segments, the system evaluates each segment's match with the target anomaly scenario and optimizes any mismatches. The dispersion coefficient is a key metric used to measure the dispersion of message transmission intervals within the test segment. A higher dispersion indicates a more uneven distribution of message transmission times within the segment, increasing the likelihood of triggering certain anomalies. The system can use statistics such as variance and standard deviation to calculate the dispersion coefficient.

[0062] For test segments whose discreteness coefficient is significantly different from the preset threshold, the system can optimize its timing characteristics to make it closer to the target abnormal scenario. Specifically, the system first needs to establish an optimization objective function, which comprehensively considers multiple factors such as the discreteness, fluctuation, and trend changes of the test segment, and sets the corresponding weight coefficient. Then, guided by the optimization objective function, the system searches for the optimal message sending time interval sequence through iterative optimization algorithms (such as gradient descent, evolutionary algorithms, etc.) within the time interval range allowed by the charging protocol, so that the value of the optimization objective function is lower than the preset threshold. Finally, the system updates the optimized time interval sequence to the original test segment to obtain the optimized test segment.

[0063] S203, recombining the optimized test segments to obtain a complete test sequence; After obtaining the optimized test fragments, the system needs to reassemble them to generate a complete test sequence. The key here is to ensure that the reassembled test sequence is semantically coherent while also maintaining the optimized timing characteristics. To this end, the system can use a heuristic search algorithm to explore the optimal fragment combination.

[0064] Specifically, the system can model the fragment combination problem as a directed acyclic graph (DAG) search problem. Each node in the graph represents a test fragment, and the directed edge represents the order relationship between two fragments. The system's goal is to find a path from the start node to the end node in the graph so that the fragments on the path can be sequentially combined into a complete test sequence with semantic coherence. At the same time, the system also needs to consider the optimized timing characteristics, and try to keep the time intervals between adjacent fragments smoothly transitioned to avoid introducing new anomalies.

[0065] When searching for the optimal path, the system can employ algorithms such as breadth-first search or a search strategy based on reinforcement learning. During the search process, the system evaluates the quality of the current path by designing an evaluation function that comprehensively considers factors such as semantic coherence and temporal smoothness. Furthermore, the system can leverage domain knowledge to guide the search, such as constraining the order of fragment combinations based on the flow rules of the protocol state machine.

[0066] Through intelligent search algorithms, the system ultimately generates one or more high-quality complete test sequences. These sequences are not only semantically coherent but also inherit optimized timing characteristics, effectively covering the target abnormal scenarios. The generated complete test sequences can be used directly for actual charger testing or can be further manually reviewed and adjusted to meet specific testing requirements.

[0067] S204, constructing a digital fingerprint of the complete test sequence and storing the digital fingerprint in a preset database; The system constructs a digital fingerprint of the complete test sequence and stores the digital fingerprint in a preset database. The digital fingerprint contains the timing characteristics and state parameter information of the complete test sequence.

[0068] After generating a complete test sequence, the system also creates a unique digital fingerprint for each test sequence and stores it in a pre-set database for rapid retrieval and comparison. This digital fingerprint is a compact representation of the test sequence that captures key sequence characteristics, such as timing characteristics and state parameters.

[0069] A common method for constructing digital fingerprints is a hash algorithm. The system extracts key characteristic information from a test sequence and then uses a hash function (such as MD5 or SHA-256) to map it to a fixed-length hash value, which serves as the test sequence's digital fingerprint. This hash algorithm ensures that different test sequences are mapped to different digital fingerprints. It also offers good collision resistance, minimizing the possibility of different sequences being mapped to the same fingerprint.

[0070] In addition to hashing algorithms, the system can also employ other fingerprint construction methods, such as the Euclidean distance metric based on feature vectors and the edit distance metric based on sequence patterns. These methods generate digital fingerprints by measuring the similarity between test sequences, which can better reflect the semantic characteristics of the sequences. The system can select the appropriate fingerprint construction method based on specific needs.

[0071] After constructing the digital fingerprint, the system stores it in a pre-set database, mapping it to the corresponding complete test sequence. This storage can be done using a variety of database types, including relational databases (such as MySQL) and NoSQL databases (such as MongoDB). Distributed storage systems (such as HDFS) can also be used to support the storage and management of massive test sequences.

[0072] S205, establishing a mapping relationship database between complete test sequences and communication anomalies; After constructing the digital fingerprint of the complete test sequence, the system also needs to establish a mapping relationship between the test sequence and potential communication anomalies and store this mapping relationship in a dedicated database. This mapping relationship database records information such as the type of anomaly that each test sequence may trigger, the anomaly description, and the anomaly severity, providing a critical basis for subsequent anomaly detection and diagnosis.

[0073] Establishing this mapping requires full utilization of historical test data and expert experience. The system mines and analyzes historical test records to identify the anomalies actually triggered by each test sequence and associates them with the test sequence's digital fingerprint. For newly generated test sequences, the system uses expert experience and heuristics to infer the likely anomaly types and adds them to the mapping. As testing progresses, the system dynamically updates and optimizes the mapping through a feedback mechanism, continuously improving its accuracy and completeness.

[0074] When storing mapping relationships, the system can adopt a relational database table structure, using the test sequence's digital fingerprint as the primary key and attributes such as the anomaly type and description. To support flexible query and analysis, the system can also establish multiple indexes within the database, such as those by anomaly type or severity. Furthermore, for complex anomalies, the system can organize them into an anomaly case library, stored separately from the mapping database, to provide richer diagnostic information.

[0075] After building the mapping database, the system can quickly retrieve relevant test sequences based on newly detected anomalies and analyze the causes and impacts of the anomalies. The mapping database also provides a basis for optimizing test sequences, allowing the system to tailor test sequences to cover more anomaly scenarios. In the long run, the establishment and maintenance of the mapping database can greatly enhance the intelligence level of charger communication testing, enable the accumulation and reuse of test experience, reduce testing costs, and improve testing efficiency.

[0076] S206. When a new communication anomaly is detected, feature information of the new anomaly scenario is extracted, and the feature information is matched with each digital fingerprint in the mapping database; During actual charger operation, the system monitors communication status in real time, recording various raw communication data and logs. When a potential communication anomaly is detected, the system must respond promptly, diagnose the cause, and provide appropriate remedial measures. This is where the system's mapping database comes into play, quickly identifying the test sequence associated with the anomaly and providing a reference for anomaly analysis.

[0077] Specifically, when a new communication anomaly is detected, the system first extracts the characteristic information of the anomaly scenario. These characteristics can include the time the anomaly occurred, its duration, its manifestations (such as message delays and packet loss), and the state parameters at the time of the anomaly (such as voltage and current). The system can automatically extract these characteristics from raw communication data and logs, or experts can manually enter them based on their experience.

[0078] After extracting the characteristic information of the abnormal scenario, the system matches it with each digital fingerprint in the mapping database. The matching process essentially calculates the similarity between the abnormal characteristics and the digital fingerprints to identify the most similar test sequences. This similarity can be calculated using a variety of metrics, such as Euclidean distance, cosine similarity, and KL divergence. Machine learning models can also be used to learn matching functions. During matching, the system also comprehensively considers factors such as the test sequence's trigger probability and the severity of the abnormality to sort and filter candidate sequences.

[0079] S207: If it is determined that no corresponding digital fingerprint is matched, a new digital fingerprint corresponding to the new abnormal scenario is stored in a preset database, and a mapping relationship corresponding to the new communication abnormality is stored in a mapping relationship database.

[0080] During anomaly detection and diagnosis, we may encounter new anomaly scenarios whose characteristics do not match well with existing fingerprints in the mapping database. In such cases, the system needs to be able to identify new anomalies and enter them into the database, continuously accumulating and expanding the anomaly detection knowledge base and improving the system's adaptability and intelligence.

[0081] Specifically, when the system determines that an abnormal scenario cannot be matched to an existing digital fingerprint, it first analyzes and summarizes the abnormal scenario, extracts its key features, and constructs a new digital fingerprint. The process of constructing a new fingerprint is similar to the method mentioned above, and hashing algorithms, feature vectors, and other methods can be used to generate a compact fingerprint representation. When generating a new fingerprint, the system can also refer to expert analysis and opinions, combining human and machine analysis to improve the quality and interpretability of the fingerprint.

[0082] After constructing the new fingerprint, the system stores it in the fingerprint database, managing it alongside the existing fingerprints. During storage, the system records metadata such as the generation time, generation method, and responsible person for the new fingerprint, enabling subsequent traceability and optimization. The system also establishes a mapping relationship between the new fingerprint and the corresponding anomaly scenario and adds this mapping relationship to the mapping relationship database. When adding this mapping relationship, the system can fully leverage expert diagnostic results to record rich semantic information such as anomaly type, cause, and response measures for reference during subsequent anomaly analysis.

[0083] In the above embodiment, the test message sequence is segmented and divided into several test segments with different timing characteristics; then the discrete degree coefficient of each test segment is calculated to determine whether it matches the target abnormal scenario; for the unmatched test segments, the timing characteristics are optimized to obtain the optimized test segments; finally, the optimized test segments are recombined to obtain a complete test sequence. The segmentation and timing optimization of the test sequence can further improve the accuracy and effectiveness of the abnormal test. By calculating the discrete degree coefficient in segments, the similarity between the test segment and the target abnormal scenario can be evaluated at a finer granularity, and local atypical feature segments can be identified. The timing characteristics of these segments are optimized to make them as close to the abnormal scenario characteristics as possible while meeting the constraints of the charging protocol, which can reduce the deviation between the test data and the real abnormal data and improve the confidence of the test.

[0084] The following describes the system in the embodiment of the present invention from the perspective of hardware processing. Figure 3 , is a schematic diagram of the physical device structure of a charger communication test system provided in an embodiment of the present application.

[0085] It should be noted that Figure 3 The structure of the system shown is only an example and should not limit the functions and scope of use of the embodiments of the present invention.

[0086] like Figure 3As shown, the system includes a central processing unit (CPU) 301, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 302 or the program loaded from the storage part 308 into the random access memory (RAM) 303, such as executing the method in the above embodiment. Various programs and data required for system operation are also stored in the RAM 303. The CPU 301, ROM 302 and RAM 303 are connected to each other via a bus 304. An input / output (I / O) interface 305 is also connected to the bus 304.

[0087] The following components are connected to the I / O interface 305: an input section 306 including a camera, an infrared sensor, etc.; an output section 307 including a liquid crystal display (LCD) and a speaker; a storage section 308 including a hard disk; and a communication section 309 including a network interface card such as a LAN (Local Area Network) card or a modem. The communication section 309 performs communication processing via a network such as the Internet. A drive 310 is also connected to the I / O interface 305 as needed. Removable media 311, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed in the drive 310 as needed so that computer programs read therefrom can be installed into the storage section 308 as needed.

[0088] In particular, according to an embodiment of the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present invention includes a computer program product that includes a computer program carried on a computer-readable medium, the computer program including a computer program for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 309 and / or installed from a removable medium 311. When the computer program is executed by the central processing unit (CPU) 301, the various functions defined in the present invention are performed.

[0089] It should be noted that the computer-readable medium shown in the embodiments of the present invention may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a flash memory, an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present invention, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries a computer-readable computer program. Such a propagated data signal may take any of a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof.

[0090] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions and operations of the systems, methods and computer program products according to various embodiments of the present invention. Each box in the flowchart or block diagram can represent a module, program segment, or part of the code, and the above-mentioned module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the boxes can also occur in an order different from that marked in the accompanying drawings. For example, two boxes shown in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of boxes in the block diagram or flowchart, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or can be implemented using a combination of dedicated hardware and computer instructions.

[0091] As another aspect, the present invention further provides a computer-readable storage medium, which may be included in the system described in the above embodiments, or may exist independently and not incorporated into the system. The storage medium carries one or more computer programs, and when executed by a processor of a system, the system implements the methods provided in the above embodiments.

[0092] As described above, the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the above embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the above embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present application.

[0093] As used in the above embodiments, the term “when…” may be interpreted to mean “if…” or “after…” or “in response to determining…” or “in response to detecting…”, depending on the context. Similarly, the phrases “upon determining…” or “if (stated condition or event) is detected” may be interpreted to mean “if determining…” or “in response to determining…” or “upon detecting (stated condition or event)” or “in response to detecting (stated condition or event)”, depending on the context.

[0094] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from one website, computer, server or data center to another website, computer, server or data center via a wired (e.g., coaxial cable, optical fiber, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) method. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrations. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk).

[0095] Those skilled in the art will appreciate that all or part of the process steps in the above-described method embodiments can be implemented by a computer program instructing the relevant hardware. The program can be stored in a computer-readable storage medium, and when executed, the program can include the process steps in the above-described method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

Claims

1. A charger communication test method, characterized in that: include: Acquire state parameters of the charger to be tested, wherein the state parameters include temperature data, operation time data, and operating current data; Continuously collecting communication messages of the charger to be tested within a preset collection period, and constructing a message timing queue for the communication messages in the order of receiving time; Calculating the time intervals between adjacent messages in the message timing queue to generate a message interval sequence reflecting message timing characteristics; Calculating a discrete degree coefficient of a message timing according to the message interval sequence, wherein the discrete degree coefficient represents a change rule of a message sending time interval; When determining that a communication anomaly occurs, recording the discrete degree coefficient, state parameters, and communication anomaly type at the abnormal moment when the communication anomaly occurs, and inputting the recorded data into a preset state transition matrix to obtain a corresponding relationship between the state parameters, the discrete degree coefficient, and the communication anomaly type, wherein the recorded data is the discrete degree coefficient, state parameters, and communication anomaly type at the abnormal moment; Calculating the probability distribution of the communication anomaly under different state parameters according to the preset state transition matrix, and obtaining an association model representing the triggering law of the communication anomaly; Generate a test message sequence based on the association model, wherein the time series characteristics of the test message sequence are the same as the state parameters and the discrete degree coefficient corresponding to the high-probability abnormal scenario with a probability greater than a preset probability threshold in the association model; The test message sequence is sent to the charger to be tested to detect response data of the charger to be tested.

2. The method according to claim 1, characterized in that The calculating of the discrete degree coefficient of the message timing according to the message interval sequence specifically includes: Calculate the standard deviation of each time interval value in the message interval sequence to obtain the time interval fluctuation coefficient; Calculating the trend change rate of the message interval sequence based on a sliding weighted average algorithm, wherein the trend change rate represents the change direction and change speed of the message time interval; The time interval fluctuation coefficient and the trend change rate are weighted and fused to obtain a discrete degree coefficient representing the discrete degree of message timing.

3. The method according to claim 1, characterized in that The calculating the probability distribution of communication anomalies under different state parameters according to the preset state transition matrix specifically includes: Constructing a state transition probability matrix, wherein the matrix elements in the state transition probability matrix represent the conditional probability of communication anomaly occurring under a set of state parameters and a discrete degree coefficient; Calculate the multi-step transition probability of the state parameter and the dispersion coefficient; Calculate the prior probability of various communication anomalies based on historical anomaly data; The multi-step transition probability and the prior probability are combined and the Bayesian formula is used to calculate the probability distribution of the communication anomaly under different state parameter combinations.

4. The method according to claim 1, characterized in that Before sending the test message sequence to the charger to be tested, the method further includes: Segmenting the test message sequence to divide the test message sequence into a plurality of test segments with different timing characteristics; Calculating the dispersion coefficient of each test segment; Optimize the timing characteristics of the test clips that do not match the target abnormal scene to obtain optimized test clips; The optimized test fragments are recombined to obtain a complete test sequence.

5. The method according to claim 4, characterized in that The optimizing of the timing characteristics of the test clips that do not match the target abnormal scene to obtain the optimized test clips specifically includes: Calculate the deviation between the discrete degree coefficient of the test segment that does not match the target abnormal scene and the preset target value; Constructing an optimization objective function, and making the value of the optimization objective function less than a preset threshold through iterative optimization while satisfying the maximum time interval and the minimum time interval specified in the charging protocol; The optimized time interval sequence is updated to the test segment that does not match the target abnormal scene.

6. The method according to claim 5, characterized in that The optimization objective function is: J=α×|S c -S t |+β×|V c -V t |+γ×|T c -T t | In the function, J is the optimization objective function, α, β and γ are weight coefficients and satisfy α+β+γ=1, and S c is the current dispersion coefficient, the S t is the target dispersion coefficient, the V c is the current volatility coefficient, the V t is the target volatility coefficient, the T c is the current trend change rate, T t is the target trend change rate.

7. The method according to claim 4 or 5, characterized in that: After the optimized test segments are reassembled to obtain a complete test sequence, the method further includes: Constructing a digital fingerprint of the complete test sequence and storing the digital fingerprint in a preset database, wherein the digital fingerprint includes timing characteristics and state parameter information of the complete test sequence; Establishing a mapping relationship database between the complete test sequence and the communication anomaly; When a new communication anomaly is detected, feature information of the new anomaly scene is extracted, and the feature information is matched with each digital fingerprint in the mapping relationship database; When it is determined that no corresponding digital fingerprint is matched, a new digital fingerprint corresponding to the new abnormal scenario is stored in the preset database, and a mapping relationship corresponding to the new communication abnormality is stored in the mapping relationship database.

8. A charger communication test system, characterized in that: The system comprises: One or more processors and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and the one or more processors call the computer instructions to cause the system to execute the method as described in any one of claims 1-7.

9. A computer-readable storage medium comprising instructions, characterized in that: When the instructions are executed on a system, the system is caused to execute the method according to any one of claims 1 to 7.

10. A computer program product, characterized in that When the computer program product is run on a system, the system is caused to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • A redundant data acquisition system and an operation and use method thereof

    CN109714402A

  • SIS model availability evaluation method and system based on discrete data

    CN115376703A

  • Low-voltage distributed power supply safety abnormity sensing method and device, memory and equipment

    CN115761299A

  • Communication method and network system

    EP3826249A1

Cited By

  • Test method, test bench, system and equipment for CAN data recorder

    CN120658640A

  • Remote control power supply test method, system, device and medium

    CN121114841A

  • A test method, system, device and medium for remotely controlling a power supply

    CN121114841B