Remote test restarting method of vehicle machine, electronic equipment and storage medium
By acquiring the timing waveform of the vehicle's operating data and using the N-Gram model to generate restart commands, the problem of incomplete coverage and low efficiency of vehicle system restart operations in fuzzy testing is solved, realizing intelligent and precise restart triggering, and improving the comprehensiveness and efficiency of testing.
Patent Information
- Application Number
- CN202511431550.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-09
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-10-09
AI Technical Summary
The restart operation of the existing vehicle infotainment system lacks specificity in fuzz testing, resulting in incomplete test coverage and low efficiency, and it cannot adapt to complex testing environments.
By acquiring the time-series waveform of the vehicle's operating data, a restart command is generated using the N-Gram model to achieve intelligent and precise restart triggering. The restart strategy is dynamically adjusted by combining historical data feature words and clustering algorithms.
It improves the completeness and relevance of test coverage, reduces labor costs and differences in human experience, enhances the efficiency of fuzz testing, and adapts to the comprehensive and efficient testing needs of complex vehicle systems.
Smart Images

Figure CN120909270A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of remote test restart of vehicle head unit, and particularly relates to a remote test restart method of vehicle head unit, an electronic device and a storage medium. BACKGROUND
[0002] With the rapid development of intelligent and networked automobile technology, the function of vehicle head unit system is increasingly complex, and its stability and reliability test has become a key link to ensure the safe operation of vehicles. In the test process of the head unit system, the restart operation is an important test means, through which the recovery ability of the head unit in different states, the data saving and loading performance and the system stability and other key indicators can be verified; at present, the triggering of the restart operation in the test process of the head unit mainly depends on the active intervention of the staff. The test personnel usually preset the time node of the restart according to experience, or manually trigger the restart instruction when observing specific phenomena. This way can play a certain role in some deterministic test scenarios, but its limitations are increasingly highlighted in the face of complex test environment, especially in the process of fuzzy testing.
[0003] Fuzzy testing, as a test method for discovering potential vulnerabilities of a system by inputting unexpected data, needs to cover as many running states and boundary conditions of the head unit system as possible. However, in the prior art, the restart operation in the process of fuzzy testing can only be realized by random triggering. This random triggering method lacks targeted analysis of the actual running state of the head unit, which can easily lead to incomplete test coverage, and the restart test in some key running states may be missed, while some non-critical states are repeatedly tested. At the same time, the random triggering method cannot dynamically adjust the restart strategy according to the real-time running data of the head unit, resulting in low test efficiency and difficulty in meeting the comprehensive test demand of complex head unit systems. Therefore, how to realize the intelligent and accurate triggering of the restart operation in the remote test of the head unit to solve the problems of incomplete test coverage and low efficiency in the existing method has become a technical problem to be solved in the field. SUMMARY
[0004] In order to solve the above technical problems, the technical scheme adopted by the present application is as follows: According to a first aspect of the present application, a remote test restart method of a vehicle head unit is provided, which comprises the following steps: S100, obtaining the time sequence waveform of each type of running data of the target head unit in a preset historical time period T to obtain a time sequence waveform list A=(A1, A2,…, An), i=1, 2,…, n; Ai is the time sequence waveform corresponding to the ith type of running data, and n is the number of running data types of the target head unit; i n i S200, acquire a historical time sequence waveform list L corresponding to the i-th type of running data i = (L i,1 , L i,2 , …, L i,j , …, L i,f(i) ), L i,j is the j-th historical time sequence waveform corresponding to the i-th type of running data, f(i) is the number of historical time sequence waveforms corresponding to the i-th type of running data; each historical time sequence waveform corresponds to a standard running data feature word; S300, determine the running data feature word B i corresponding to A i according to the similarity between each historical time sequence waveform in L i and A i , and further obtain the running data feature word list B = (B1, B2, …, B i , …, B n ) corresponding to A. S400, input B into a preset first N-Gram model for target vehicle machine restart instruction prediction to generate a restart label corresponding to the target vehicle machine; S500, if the restart label corresponds to a restart instruction, send the restart instruction corresponding to the restart label to the target vehicle machine to control the target vehicle machine to perform a restart operation corresponding to the restart instruction; otherwise, do not send the restart instruction to the target vehicle machine.
[0005] According to another aspect of the present application, a non-transitory computer readable storage medium is also provided, the storage medium stores at least one instruction or at least one program, the at least one instruction or at least one program is loaded and executed by a processor to implement the above-mentioned vehicle part remote starting method.
[0006] According to another aspect of the present application, an electronic device is also provided, which includes a processor and the above-mentioned non-transitory computer readable storage medium.
[0007] The present application has at least the following beneficial effects: The remote test restart method of the vehicle machine of the application, by acquiring the time sequence waveform of various types of running data of the target machine in the preset historical time period, combining the historical time sequence waveform list to match the corresponding running data characteristic words, and then using the preset N-Gram model to generate a restart instruction, realizes the change from manual intervention or random triggering to intelligent and precise triggering of the restart operation. Specifically, compared with the way of relying on the staff to actively set the time node in the prior art, this method can dynamically determine the restart time based on the real-time running data of the machine without human intervention, greatly reducing the labor cost and avoiding the test deviation caused by human experience difference; and in view of the limitations of random triggering of restart in fuzzy testing, this method generates a restart instruction by analyzing the actual running state characteristics of the machine, which can accurately capture the key running state and trigger the restart accordingly, avoiding the omission of key state testing and reducing the repeated testing of non-key state, thereby improving the completeness and pertinence of test coverage; at the same time, this intelligent triggering method based on data characteristics can dynamically adjust the restart strategy according to the change of the machine running state, effectively improving the test efficiency in the scene of fuzzy testing and better meeting the needs of complex machine system for comprehensive and efficient testing. BRIEF DESCRIPTION OF DRAWINGS
[0008] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained without creative labor.
[0009] Figure 1 The flowchart of the remote test restart method of the vehicle machine provided by the embodiments of the present application. DETAILED DESCRIPTION
[0010] The technical solutions in the embodiments of the present application will be described clearly and completely in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0011] It should be noted that based on the present disclosure, those skilled in the art should understand that one aspect described herein can be implemented independently of any other aspect, and two or more of these aspects can be combined in various ways. For example, an apparatus and / or a method can be implemented using any number of the aspects set forth herein. In addition, other structures and / or functionality can be implemented in addition to or instead of one or more of the aspects described herein.
[0012] The remote test restart method of the vehicle infotainment system will be introduced below with reference to the flowchart of the remote test restart method of the vehicle infotainment system shown in the figure. Figure 1
[0013] The remote test restart method of the vehicle infotainment system can include the following steps: S100, obtaining the time sequence waveform of each type of running data of the target infotainment system in a preset historical time period T to obtain a time sequence waveform list A=(A1, A2,..., An), i=1, 2,..., n; Ai is the time sequence waveform corresponding to the ith type of running data, and n is the number of running data types of the target infotainment system. i n i
[0014] The method in this embodiment is applied to infotainment testing scenarios, such as smart cockpit infotainment. The dynamic change curves of multiple types of running data in a specific time window under the current testing scenario of the infotainment are collected, which provides original data support for subsequent "current state recognition".
[0015] The preset historical time period T can be set according to the fluctuation characteristics of the infotainment running data, and both "capturing complete state" and "real-time" need to be considered. Usually, 5-20 seconds (example: T=10 seconds, i.e. collecting running data in the last 10 seconds of the current time) are taken.
[0016] The running data type n covers the core running dimensions of the infotainment and is determined by the testing requirements. Common types include: A1: CPU load (unit: %); A2: memory occupancy (unit: %); A3: core temperature (unit: ℃); A4: network delay (unit: ms).
[0017] Data collection can be performed through the OBD interface, CAN bus or remote communication module (such as 4G / 5G) of the infotainment at a fixed sampling frequency (such as 0.5 seconds / time).
[0018] The original data sequence is plotted into a continuous curve (i.e. time sequence waveform) according to the "time-value" dimension. The waveform needs to retain the dynamic trend of the data (such as rising, falling, stable, fluctuation).
[0019] Example: The time sequence waveform of A1 presents "rising from 65% to 82% in the first 5 seconds (rising trend) and falling from 82% to 55% in the last 5 seconds (falling trend)", which intuitively reflects the short-term change rule of CPU load.
[0020] Through this step, manual recording or estimation of the infotainment state by the tester can be replaced, the dynamic change of the running data is completely restored through the objective time sequence waveform, and the error of manual observation (such as missing a short-term high load peak) is avoided.
[0021] The timing waveform contains detailed information such as "trend, peak, fluctuation frequency", and can reflect the real running state of the vehicle machine better than static data at a single time point, solving the problem of "judging the state with static data not comprehensive".
[0022] S200, obtaining a historical timing waveform list L corresponding to the i-th type of running data i = (L i,1 , L i,2 , …, L i,j , …, L i,f(i) ), L i,j is the j-th historical timing waveform corresponding to the i-th type of running data, f(i) is the number of historical timing waveforms corresponding to the i-th type of running data; each historical timing waveform corresponds to a standard running data feature word.
[0023] Through this step, a historical reference library of each type of running data is established, and each historical waveform is associated with a "semantic standard feature word", which provides a reference for the subsequent "similarity matching of the current waveform and the historical waveform".
[0024] The timing waveforms of each type of running data recorded in the past tests (such as function test, pressure test, fuzz test) of the vehicle machine can be accumulated, which needs to cover "normal state", "slight abnormality", "serious abnormality" and other full scenes.
[0025] For the i-th type of running data, L i contains f(i) historical waveforms (f(i) is the historical data amount, and in the example, the CPU load corresponds to f(1)=200, i.e. L i = (L i,1 , L i,2 , …, L i,200 ).
[0026] Example: L i,1 (CPU load historical waveform): the data smoothly rises from 50% to 55% within 10 seconds (trend: slow rise, peak 55%); L i,200 (CPU load historical waveform): the data rises from 70% to 95% within 10 seconds (trend: rapid rise, peak 95%).
[0027] Based on the "key features" (such as peak, trend, fluctuation amplitude) of the historical waveform, a unique semantic label (feature word) is given, and the label needs to be concise and able to distinguish the state.
[0028] The preset annotation rules (taking CPU load as an example) are shown in Table 1: Table 1
[0029] Correlation method: each historical waveform L i,j is bound to a standard feature word (e.g. L i,1 is correlated to "CPU low load stable", L i,200 is correlated to "CPU high load surge").
[0030] This step has at least the following beneficial effects: Establish a unified state semantic standard: avoid different testers' description differences of "car machine state" (e.g. some people call "CPU load 80%" as "high load", and some people call "medium-high load"), and achieve consistency of state definition through standardized feature words.
[0031] Provide "semantic anchor point" for similarity matching: in the subsequent steps, "similarity between current waveform and historical waveform" can be directly converted into "corresponding relationship between current state and standard feature word", solving the problem that "only numerical value matching cannot correlate semantic state".
[0032] S300, according to A i and the similarity between each historical time series waveform in L i , determine A i corresponding running data feature word B i , and further obtain the running data feature word list B= (B1, B2, …, B i , …, B n ) corresponding to A.
[0033] Through "similarity calculation between current waveform A i and historical waveform L i ", the unique semantic feature word B i is matched for the current running data, and "numerical waveform" is converted into "symbol sequence that can be processed by N-Gram model".
[0034] Further, step S300 can include the following steps: S310, according to the feature vector corresponding to each historical time series waveform in L i , cluster the historical time series waveforms in L i to obtain the cluster list C= (C1, C2, …, C p , …, C q ) corresponding to L p , p=1, 2, …, q; C i is the pth cluster obtained by clustering the historical time series waveforms in L i , and q is the number of clusters obtained by clustering the historical time series waveforms in L i .
[0035] List L of historical time series waveforms of the i-th operation data (e.g., memory occupancy) i Each waveform L i,j corresponds to a feature vector (e.g., memory feature vector Y=(average occupancy, peak occupancy, occupancy growth rate, fluctuation variance)). Assuming L i contains 200 historical waveforms, i.e., there are 200 feature vectors.
[0036] Using the K-means clustering algorithm (unsupervised learning, suitable for quickly clustering similar vectors into a class), q clusters are obtained after clustering, each cluster contains a number of feature vectors (corresponding to similar historical waveforms), i.e., C.
[0037] Through this step, without matching the current waveform with all historical waveforms (e.g., 200), only the similarity with the q cluster centers (e.g., 3) needs to be calculated, greatly improving the matching efficiency (especially when the historical data volume is large); the historical waveforms in the same cluster have similar features, and after clustering, a "cluster center" can represent a class of states, avoiding the matching deviation caused by the individual differences of a single historical waveform.
[0038] S320, obtaining A i corresponding feature vector XL i Similarity between each cluster center vector in C i to obtain XL i corresponding similarity list η i,1 , η i,2 , …, η i,p , …, η i,q ); η i,p is the similarity between XL i and C p .
[0039] Extract the feature vector of the current time series waveform A i (e.g., memory occupancy A2), the method is the same as that of the historical waveform. Assuming that the 10-second data of A2 is: [75, 78, 80, 82, 85, 83, 86, 88, 90, 92], the feature vector is extracted: XL i =(average 83%, peak 92%, growth rate 1.7% / s, fluctuation variance 8). The cosine similarity (measuring the consistency of vector direction, taking values 0-1) is used to calculate the similarity between XL i and each cluster center.
[0040] Through the similarity calculation with the cluster center, the most likely state category to which the current waveform belongs is quickly located (e.g., in the example, XL i has the highest similarity with C3, indicating that the current memory state is close to the "high occupancy growth" category), providing a clear direction for subsequent feature word matching.
[0041] S330, if η i The maximum similarity η in i,max If ≥QR, then η will be randomly selected. i,max The standard runtime data feature word corresponding to a historical time-series waveform in the corresponding cluster is determined to be B. i Otherwise, exit the current processing; QR is the first preset similarity threshold.
[0042] Low similarity matches are filtered out by QR thresholding (to avoid false positives), while random selection of feature words within the same cluster is allowed (to utilize the commonalities within the cluster and avoid the limitations of a single sample); combined with the dynamic adjustment of subsequent QR (correlated with the parameters injected into the test cases), the threshold can be lowered during aggressive testing (tolerating a certain deviation and increasing the chance of matching), and the threshold can be raised during moderate testing (strict matching and reducing invalid feature words).
[0043] Furthermore, QR can be determined through the following steps: S331, obtain the injection strength S and injection risk level R of the current test case of the target vehicle system; S is determined by the amount, frequency and proportion of abnormal data of the input data corresponding to the test case; R is determined by the type of test case; 0≤S≤1; 0≤R≤1.
[0044] In this embodiment, the injection intensity S is calculated (0≤S≤1): S reflects the stress of the test case on the vehicle's infotainment system, and is obtained by weighting three quantifiable parameters: Input data volume: Current injected test data volume / maximum capacity of vehicle system = 0.8 (e.g., if the maximum capacity of vehicle system is 100 data points / second, the current injection volume is 80 data points / second).
[0045] Input frequency: Current data transmission frequency / maximum allowed frequency = 0.7 (e.g., maximum allowed 50Hz, current 35Hz).
[0046] Abnormal data percentage: Number of abnormal data entries / Total number of data entries = 0.9 (90 out of 100 data entries are in abnormal format).
[0047] If we set weights (data volume 0.3, frequency 0.3, anomaly percentage 0.4), then: S = 0.3 × 0.8 + 0.3 × 0.7 + 0.4 × 0.9 = 0.24 + 0.21 + 0.36 = 0.81.
[0048] Determination of injection risk level R (0≤R≤1): R reflects the risk of the test case, based on the preset parameters of the vehicle infotainment module involved in the case: Entertainment system test (e.g., abnormal injection during music playback): R=0.2.
[0049] Navigation module test (e.g., location data tampering): R=0.5.
[0050] Security authentication module test (such as fake login instruction): R = 0.9.
[0051] Assuming the current test case is "security authentication module abnormal instruction injection", then R = 0.9.
[0052] Through this step, the abstract "test pressure" and "risk" are converted into 0-1 interval values, providing operable input for subsequent QR calculation; adapting to multiple scene tests, the S and R of different test cases (such as entertainment module vs. security module) differ significantly, laying the foundation for differentiated adjustment of QR.
[0053] S332, according to S and R, determine the aggressiveness K = a x S + b x R corresponding to the current test case; where a is the injection intensity weight, b is the injection risk level weight; a + b = 1.
[0054] Weight setting: a (injection intensity weight) = 0.5, b (risk level weight) = 0.5 (a + b = 1, indicating equal attention to pressure and risk).
[0055] Calculate K: K = 0.5 x 0.81 + 0.5 x 0.9 = 0.405 + 0.45 = 0.855 (close to 1, indicating that the current test belongs to high aggressiveness).
[0056] Through the weighted fusion of S and R, a single "aggressiveness" index K is obtained, simplifying the calculation logic of subsequent QR; flexibly adjust the focus, if the test pays more attention to pressure (such as load testing), you can increase a (such as a = 0.7); if more attention to risk (such as security testing), you can increase b (such as b = 0.7), adapt to different test goals.
[0057] S333, according to K, determine QR = QR base × (1 - K x g); where QR base is the preset basic threshold; g is the preset adjustment coefficient; 0 < g < 1.
[0058] Preset parameters: QR base (basic threshold) = 0.6 (initial value balancing precision and fault tolerance); g (adjustment coefficient) = 0.4 (control the influence amplitude of K on QR, 0 < g < 1).
[0059] Calculate QR: QR = 0.6 x (1 - 0.855 x 0.4) = 0.6 x (1 - 0.342) = 0.6 x 0.658 ≈ 0.395.
[0060] Further, you can also add constraints: if QR < 0.3 (QR min ), take 0.3; if QR > 0.9 (QR maxIf S=0.2, R=0.2, K=0.2, then take 0.9 (avoid extreme threshold).
[0061] Example comparison: If the test is gentle (S=0.2, R=0.2, K=0.2), then QR=0.6x(1-0.2x0.4)=0.6x0.92≈0.55 (higher threshold, strict match).
[0062] If the test is aggressive (K=0.855 as above), then QR≈0.4 (lower threshold, loose match, increase restart opportunity).
[0063] Through the above steps, the QR is reduced during aggressive testing (allowing more matches, increasing restart frequency, and comprehensively testing recovery ability); the QR is increased during gentle testing (reducing invalid matches and avoiding frequent restarts affecting the test process); the formula is simple and only requires basic arithmetic operations, which can be calculated in real time (millisecond-level response) to meet the real-time needs of vehicle testing.
[0064] The above steps have at least the following beneficial effects: Efficiency improvement: By clustering, "one-to-one" matching is converted to "one-to-cluster" matching, reducing the amount of calculation, especially suitable for scenarios with large amounts of historical data.
[0065] Matching accuracy: Combined with the dynamic QR threshold, the matching quality is guaranteed while avoiding "missed matches" (aggressive testing) or "false matches" (gentle testing).
[0066] Test adaptability: QR is linked with the injection intensity and risk level of the test case, making the restart trigger logic deeply match the test target (such as comprehensive coverage vs. precise verification), solving the limitations of traditional fixed thresholds or random triggers.
[0067] S400, input B into a preset first N-Gram model for target vehicle restart instruction prediction, to generate a restart label corresponding to the target vehicle.
[0068] In this embodiment, the preset and training of the first N-Gram model are realized by the following methods: Model type: 2-Gram (binary model) is adopted, and the core logic is "based on the first feature word, to predict the restart label corresponding to the next feature word" (or directly based on the sequence of feature words to predict the label), balancing the calculation complexity and prediction accuracy.
[0069] Training data: Use the mapping data of "feature word list B→actual effective restart instruction" in historical tests, and the example training sample is shown in Table 2: Table 2
[0070] Model training: Calculate the association probability of each "feature word sequence" and "restart label", such as P("soft restart" | "CPU medium-high load stable + memory high occupancy") = 0.85 (i.e. 85% probability of soft restart when the sequence appears).
[0071] After training the first N-Gram model in the above manner, input the current B list obtained in step S300 into the trained N-Gram model, and the model determines the restart label by calculating the maximum probability: Example: Current B = ("CPU medium-high load stable", "memory high occupancy", "temperature normal", "low delay"), the model calculates: P("soft restart" | B) = 0.85, P("hard restart" | B) = 0.1, P("no restart" | B) = 0.05; take the label with the maximum probability, generate "soft restart" label.
[0072] Through this step, intelligent restart demand prediction is realized, without the need for manual setting of restart time nodes. The model automatically determines based on historical sequence rules, solving the problem of low efficiency of manual triggering. Avoiding single feature misjudgment, based on "multiple type feature word sequence" prediction, rather than single feature (such as only looking at CPU load), for example, "CPU high load but memory and temperature normal" does not trigger hard restart, improving the accuracy of restart decision.
[0073] S500, if the restart label corresponds to a restart instruction, send the restart instruction corresponding to the restart label to the target car machine to control the target car machine to perform the restart operation corresponding to the restart instruction; otherwise, do not send the restart instruction to the target car machine.
[0074] According to the restart label generated by the N-Gram model, it is determined whether to send a restart instruction to the car machine, realizing "precise restart triggering" or "avoiding invalid restart".
[0075] For example: if the restart label is "soft restart", send the soft restart instruction to the target car machine through the remote communication module (such as 4G), and the car machine receives and performs the soft restart operation (about 30 seconds to complete, and the test data is preserved after restart); if the restart label is "no restart", do not send the instruction, continue to collect the running data of the next T time period, and avoid interrupting the normal test process.
[0076] Through this step, only when the model predicts "restart" is the instruction sent, avoiding the problems of "normal state misrestart" (waste of test time) or "abnormal state missrestart" (missing vulnerabilities) in existing random triggering. Adapt to remote test scenarios, without the need for on-site operation by test personnel, and realize restart control through remote instructions, especially suitable for multi-car machine batch testing or remote testing scenarios, greatly improving test efficiency.
[0077] Furthermore, in the above embodiment, steps S100-S500 need to be executed continuously. However, the target vehicle system is not restarted very frequently. Therefore, steps S100-S500 are mostly ineffective. Based on this, before step S100, the method may further include the following steps: S010, whenever a new message to be executed is added to the preset first-in-first-out queue, retrieve each message to be executed in the first-in-first-out queue to obtain a list of messages to be executed D = (D1, D2, ..., D...). x D y ), x=1,2,…,y; D x y represents the x-th message to be executed in the first-in-first-out (FIFO) queue, and y represents the length of the FIFO queue.
[0078] During vehicle system testing, remotely sent test commands (such as data query, exception injection, status control, etc.) are stored in a first-in-first-out (FIFO) queue in the order of receipt to ensure that the commands are executed in order (avoiding test logic confusion caused by out-of-order execution).
[0079] The message to be executed is a data packet containing test instructions, including information such as "instruction type," "target module," and "execution time." For example: D1: {Type: Query, Target: CPU, Content: Load data, Execution time: 10:00:00}; D2: {Type: Injection, Target: Navigation, Content: Anomaly Location Data, Execution Time: 10:00:05}; D3: {Type: Control, Target: Screen, Content: Brightness Adjustment, Execution Time: 10:00:10}.
[0080] Generation of list D: Whenever a new message is added to the queue (such as adding D4), all messages in the queue are read immediately to form D=(D1,D2,D3,D4), where y=4 (queue length).
[0081] By acquiring the pending messages in the queue in real time, the instruction sequence for subsequent tests can be determined, providing context for predicting whether a restart is needed (e.g., a restart is usually required for verification after continuous exception injection).
[0082] S020, perform feature encoding on each message to be executed in D to obtain the message feature vector list E = (E1, E2, ..., E...). x , ..., E y ); E x D x The corresponding message feature vector.
[0083] Feature dimension design: extract the core attributes of the message as feature dimensions (ensure that different types of messages can be distinguished), for example: Dimension 1: instruction type (query = 1, injection = 2, control = 3, restart = 4); Dimension 2: target module risk level (entertainment = 0.2, navigation = 0.5, CPU = 0.7, security module = 1.0); Dimension 3: data length (short = 0.1, medium = 0.5, long = 0.9); Dimension 4: abnormality flag (normal = 0, slight abnormality = 0.5, severe abnormality = 1.0).
[0084] Feature vector generation: map the attributes of each message to the above dimensions, and standardize them into vectors in the 0-1 interval. For example: The feature vector E2 of D2 (abnormal navigation data injection) is (2, 0.5, 0.5, 1.0) (type = injection, target risk = 0.5, medium length, severe abnormality); The feature vector E3 of D3 (control screen brightness) is (3, 0.2, 0.1, 0) (type = control, target risk = 0.2, short length, normal).
[0085] Convert message "semantics" to "numerical value": facilitate subsequent processing through similarity calculation and model prediction, solve the problem of "text messages cannot directly participate in algorithm operation".
[0086] S030, according to the similarity between each message feature vector in E and the preset historical message feature vector, determine the corresponding message feature word of each to-be-executed message in D, to obtain the message feature word list F corresponding to D = (F1, F2, …, F x , …, F y ); F x is the message feature word corresponding to D x ; each historical message feature vector corresponds to a message feature word.
[0087] Further, step S030 includes the following steps: S031, obtain the similarity between E x and each preset historical message feature vector.
[0088] S032, if the maximum similarity RE between E x and each preset historical message feature vector is greater than or equal to the second preset similarity threshold, the historical message feature vector corresponding to RE is determined as the target historical message feature vector; otherwise, jump out of the current processing.
[0089] S033, determine the message feature word corresponding to the target historical message feature vector as Fx .
[0090] In this embodiment, the historical message feature vector library: the feature vectors of various typical messages in the preset historical test, each vector is associated with a "message feature word" (semantic label). As shown in Table 3: Table 3
[0091] Calculate the current message feature vector E x The cosine similarity with all historical vectors; the second preset similarity threshold can be set according to the strictness of message matching, for example: the second preset similarity threshold is set to 0.7; after matching all messages in D, F=(“CPU normal query”, “navigation abnormal injection”, “screen normal control”,...) is obtained.
[0092] Uniformly describe similar messages through feature words (such as different batches of “navigation abnormal injection” messages corresponding to the same feature word), and provide consistent input for subsequent sequence modeling of N-Gram model.
[0093] S040, input F into the preset second N-Gram model to predict whether the next message DZ entering the first-in-first-out queue is a restart message.
[0094] Training of the second N-Gram model: training based on historical “message feature word sequence→whether followed by restart message” samples, for example: History sequence 1: (“CPU normal query”, “navigation abnormal injection”)→next message is “hard restart message” (probability 0.8); History sequence 2: (“screen normal control”, “memory query”)→next message is not a restart message (probability 0.9).
[0095] The model uses 2-Gram, and the core calculation is “the probability of the next message being a restart message when the previous y feature word sequence appears”.
[0096] Prediction process: input F=(“CPU normal query”, “navigation abnormal injection”, “screen normal control”) into the model, and the model calculates that “the probability of the next message DZ being a hard restart message = 0.85” (greater than the preset probability threshold 0.7), so it is predicted that DZ is a restart message.
[0097] Through this step, the restart demand is predicted in advance, and the probability of the restart message appearing is predicted through historical rules before the restart message actually enters the queue, which provides a basis for subsequent preset restart instructions and reduces the consumption of “temporary decision” computing power.
[0098] S050, if the DZ is a restart message, insert the restart instruction CQ corresponding to the restart message after the last pending message in the first-in first-out queue; enter S060.
[0099] If S040 predicts that DZ is a "hard restart message", insert the corresponding restart instruction CQ after the last message (such as D4) in the current queue: {type: restart, mode: hard restart, execution time: pending} (the execution time will be determined in S060).
[0100] After insertion, the queue becomes (D1, D2, D3, D4, CQ), ensuring that the restart instruction is executed after the existing test sequence (without interrupting the original test logic).
[0101] Through this step, the restart instruction is prepared in advance to avoid the delay caused by temporary generation of the instruction when the restart requirement occurs, and the continuity of the restart operation and the previous test is ensured through queue insertion.
[0102] S060, when reaching the preset time point, enter S100; the preset time point is a time point before the execution time point TQ of the last pending message in the first-in first-out queue and the time interval T from TQ.
[0103] Preset time point calculation: assuming that the execution time of the last pending message (such as D4) in the queue is TQ=10:00:20, the preset time interval T=10 seconds (sufficient time to execute S100-S400), then the preset time point=10:00:20-10 seconds=10:00:10.
[0104] Triggering logic: when the system time reaches 10:00:10, automatically execute S100-S400 (collect the running data waveform within T=10 seconds and generate a restart label), ensuring that real-time verification is completed before D4 is executed.
[0105] Real-time analysis is completed before the last message is executed, which not only ensures that there is enough data to determine whether to restart, but also avoids test interruption caused by long waiting time of the restart instruction.
[0106] S070, according to the result corresponding to the restart label in S400, determine whether to send CQ to the target vehicle.
[0107] Further, step S070 includes the following steps: S071, if the restart instruction corresponding to the restart label in S400, send CQ to the target vehicle to control the target vehicle to execute the restart operation.
[0108] If the restart label of S400 corresponds to a restart instruction (such as "hard restart"), a CQ (preset hard restart instruction) is sent for controlling the vehicle machine to execute. For example, S400 predicts that a hard restart is needed, the CQ is a hard restart instruction, so the CQ is sent, and the vehicle machine executes a hard restart immediately after D4 execution (10:00:20).
[0109] Further, the restart instruction corresponding to the restart message includes a soft restart instruction and a hard restart instruction; and the restart label corresponds to the soft restart instruction and the hard restart instruction.
[0110] The restart instruction type is divided into "soft restart" (only restart the system layer, and the data is preserved) and "hard restart" (power-off restart, and the initial state is restored), and it is needed to verify whether the restart label type of S400 is consistent with the CQ type.
[0111] Further, step S071 can include the following steps: S71, if the restart label in S400 corresponds to a restart instruction, and the restart label corresponds to the same type of restart instruction as the restart instruction corresponding to the CQ, the CQ is sent to the target vehicle machine to control the target vehicle machine to execute the restart operation.
[0112] If the S400 label is "soft restart", and the CQ is also a "soft restart instruction", the CQ is sent. For example, the CQ is predicted to be a soft restart, real-time verification also needs a soft restart, and the execution of sending is performed.
[0113] S72, if the restart label in S400 corresponds to a restart instruction, and the restart label corresponds to a different type of restart instruction than the restart instruction corresponding to the CQ, an artificial selection restart prompt is generated.
[0114] If the S400 label is "hard restart", but the CQ is a "soft restart instruction", an artificial selection prompt (such as "predicted to be a soft restart, real-time needs a hard restart, please confirm the execution type") is generated, and the final instruction is determined by the test personnel.
[0115] S072, if the restart label in S400 corresponds to a non-restart instruction, the CQ is not sent to the target vehicle machine.
[0116] If the restart label of S400 is "no need to restart", the CQ is not sent. For example, S400 analyzes and finds that the vehicle machine state is normal, and there is no need to restart, so the preset CQ is discarded to avoid invalid operation.
[0117] Through the above steps, the risk caused by type error is avoided: the hard restart may lose test data, and the soft restart may not be able to solve the deep problem, and the type matching check reduces the test deviation caused by "instruction type error"; man-machine collaborative optimization decision: when the prediction conflicts with the real-time result, artificial judgment is introduced to balance the automation efficiency and the decision accuracy in the complex scene.
[0118] The above steps have at least the following beneficial effects: Reduce computing power consumption: By predicting the need for restart in advance through S010-S040, only when it is predicted that a restart may be needed, S100-S500 (real-time verification) is performed, avoiding the waste of computing power caused by "frequent execution without distinction" in the original method (especially in low aggressive test scenarios).
[0119] Improve the accuracy of restart timing: Through FIFO queue management and preset time point design, ensure that the restart instruction is executed after the "pre-test is completed and the state is abnormal", avoid interrupting the test process or missing the key verification node.
[0120] Enhance decision reliability: The triple logic of "prediction (second N-Gram) + real-time verification (first N-Gram) + type matching check" greatly reduces the probability of false / missed restart instructions, solving the limitations of traditional single logic decision.
[0121] Adapt to complex test scenarios: By manually selecting prompts, when the prediction and real-time results conflict, manual intervention space is reserved, balancing automation efficiency and test rigor in special scenarios.
[0122] In this embodiment, by obtaining the time sequence waveform of various running data of the target car machine in the preset historical time period, combining the historical time sequence waveform list to match the corresponding running data feature words, and using the preset N-Gram model to generate a restart instruction, the change from manual intervention or random triggering to intelligent and accurate triggering of the restart operation is realized. Specifically, compared with the existing technology which relies on the active setting of time nodes by staff, this method can dynamically determine the restart timing based on real-time running data of the car machine without human intervention, greatly reducing labor costs and avoiding test deviations caused by human experience differences; and for the limitations of random triggering of restart in fuzzy testing, this method generates a restart instruction by analyzing the actual running state characteristics of the car machine, which can accurately capture key running states and trigger restart accordingly, avoiding the omission of key state testing and reducing repeated testing of non-key states, thereby improving the completeness and relevance of test coverage; At the same time, this intelligent triggering method based on data characteristics can dynamically adjust the restart strategy according to the changes in the running state of the car machine, effectively improving the test efficiency in fuzzy testing scenarios, and better meeting the needs of complex car machine systems for comprehensive and efficient testing.
[0123] Moreover, although individual steps of the methods in the present disclosure are described in a particular order in the figures, this is not required or implied as to the order of execution of the steps, nor is it required that all of the steps be executed for the desired results. Additionally or alternatively, certain steps can be omitted, combined into a single step, broken into multiple steps, and / or executed in a different order than shown.
[0124] Embodiments of the present application also provide a non-transitory computer readable storage medium, which can be arranged in an electronic device to save at least one instruction or at least one program related to a method in the method embodiments, and the at least one instruction or the at least one program is loaded and executed by the processor to implement the method provided by the above-mentioned embodiments.
[0125] The program product can employ any combination of one or more readable media. The readable media can be a readable signal medium or a readable storage medium. The readable storage medium, for example, can be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or apparatus, or any suitable combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or 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 of the above.
[0126] The computer readable signal medium can include a data signal propagated in baseband or propagated as a carrier wave, in which the readable program code is carried. Such propagated data signal can take many forms, including but not limited to electro-magnetic signal, optical signal, or any suitable combination of the above. The readable signal medium can also be any readable medium that is not a readable storage medium and that can transmit, propagate, or transport the program for use by or in connection with an instruction execution system, apparatus, or device.
[0127] The program code contained on the readable medium can be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, RF, and the like, or any suitable combination of the above.
[0128] The program code can be executed by one or more programmable processors, digital signal processors, ASICs, FPGAs, or microprocessors or microcontrollers or other similar consumer electronics devices. The program code can be downloaded to the user device from a network or from the memory of another user device or sold on a physical medium such as a disk or DVD computer readable medium. Other variations are possible.
[0129] Embodiments of the present application also provide an electronic device, including a processor and the aforementioned non-transitory computer readable storage medium.
[0130] The electronic device is merely an example and should not bring any limitation to the function and usage range of the embodiments of the present application.
[0131] The electronic device is in the form of a general computing device. The components of the electronic device can include, but are not limited to, the aforementioned at least one processor, the aforementioned at least one memory, a bus connecting different system components including the memory and the processor.
[0132] The memory stores program codes which can be executed by the processor, so that the processor performs the steps in the various embodiments described in the specification.
[0133] The memory can include a readable medium in the form of a volatile memory, such as a random access memory (RAM) and / or a cache memory, and can further include a read-only memory (ROM).
[0134] The memory can further include programs / utilities with a set of (at least one) program modules, such as an operating system, one or more application programs, other program modules, and program data, each of which or some combination of which can include the implementation of a network environment.
[0135] The bus can be one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of a variety of bus structures.
[0136] The electronic device can also communicate with one or more external devices such as a keyboard or a pointing device, through an I / O interface. The electronic device can communicate with one or more devices that enable a user to interact with it through a communication interface. The electronic device can also communicate with one or more devices or networks (e.g., LANs, WANs, and / or the Internet) through a network adapter. The network adapter can communicate with the other modules of the electronic device through the bus. It should be appreciated that other hardware and / or software modules can be used in conjunction with the electronic device. For example, a microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data archival storage systems, etc. can be used with the electronic device.
[0137] From the above description of the embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a U disk, a mobile hard disk, etc.) or a network, and includes a number of instructions to make a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) execute the method according to the embodiments of the present disclosure.
[0138] The embodiments of the present disclosure also provide a computer program product, which includes program codes for causing an electronic device to perform the steps in the method according to various example embodiments of the present disclosure described above in the specification when the program product is run on the electronic device.
[0139] Although some specific embodiments of the present disclosure have been described in detail by way of examples, it should be appreciated that the above examples are only for illustration, but not to limit the scope of the present disclosure. It should also be appreciated by those skilled in the art that various modifications can be made to the embodiments without departing from the scope and spirit of the present disclosure.
Claims
1. A method for remotely testing and rebooting a vehicle head unit, the method comprising: The method comprises the following steps: S100, obtaining time sequence waveforms of each type of running data of the target car machine in a preset historical time period T to obtain a time sequence waveform list A=(A1, A2, …, A i , …, A n ), i=1, 2, …, n; A i is the time sequence waveform corresponding to the ith type of running data, and n is the number of types of running data of the target car machine; S200, obtaining a historical time sequence waveform list L corresponding to the i-th type of operation data i = (L i,1 , L i,2 , …, L i,j , …, L i,f(i) ), L i,j is the j-th historical time sequence waveform corresponding to the i-th type of operation data, f(i) is the number of historical time sequence waveforms corresponding to the i-th type of operation data; each historical time sequence waveform corresponds to a standard operation data characteristic word; S300, according to A i With L i Similarity between each historical time sequence waveform, determine A i Corresponding operation data characteristic word B i , and then get A corresponding operation data characteristic word list B= (B1, B2, …, B i , …, B n ); S400, input B into a preset first N-Gram model for target vehicle machine restart instruction prediction to generate a restart label corresponding to the target vehicle machine; S500, if the restart label corresponds to a restart instruction, send the restart instruction corresponding to the restart label to the target vehicle machine to control the target vehicle machine to execute a restart operation corresponding to the restart instruction; otherwise, do not send the restart instruction to the target vehicle machine.
2. The method of claim 1, wherein, Step S300 comprises the following steps: S310, according to L i characteristic vectors corresponding to each historical time sequence waveform in L i , the historical time sequence waveforms in L i are clustered to obtain a cluster list C=(C1, C2, …, C p , …, C q ), p=1, 2, …, q; C p is the pth cluster obtained by clustering the historical time sequence waveforms in L i , and q is the number of clusters obtained by clustering the historical time sequence waveforms in L i . S320, obtaining A i corresponding feature vector XL i similarity between the center vectors corresponding to each cluster in C, to obtain XL i corresponding similarity list η i = (η i,1 , η i,2 , …, η i,p , …, η i,q ); η i,p is the similarity between XL i and C p S330, if the maximum similarity η i in the η i,max is greater than or equal to QR, then randomly determine η i,max ; otherwise, jump out of the current processing; QR is a first preset similarity threshold. i ; otherwise, jump out of the current processing; QR is a first preset similarity threshold.
3. The method of claim 2, wherein the remote test reboot of the vehicle head unit is initiated by a user of the vehicle head unit. QR is determined by the following steps: S331, obtain the injection intensity S and the injection risk level R of the current test case of the target vehicle machine; S is determined by the amount, frequency and proportion of abnormal data of the input data corresponding to the test case; R is determined by the type of the test case; 0≤S≤1; 0≤R≤1; S332, determine the degree of aggressiveness K=α×S+β×R corresponding to the current test case according to S and R; wherein, α is the injection intensity weight, and β is the injection risk level weight; α+β=1; S333, determining QR = QR according to K base × (1 - K × γ); wherein, QR base is a preset basic threshold; γ is a preset adjustment coefficient; 0 < γ < 1.
4. The method of claim 1, wherein the remote test reboot of the vehicle head unit is initiated by a user of the vehicle head unit. Before step S100, the method further comprises the following steps: S010, whenever a new to-be-executed packet is added in the preset first-in-first-out queue, obtaining each to-be-executed packet in the first-in-first-out queue to obtain a to-be-executed packet list D=(D1, D2, …, Dy), x=1, 2, …, y; Dx is the xth to-be-executed packet in the first-in-first-out queue, and y is the length of the first-in-first-out queue. x , …, D y ), x=1, 2, …, y; Dx is the xth to-be-executed packet in the first-in-first-out queue, and y is the length of the first-in-first-out queue. x S020, perform feature encoding on each message to be executed in D to obtain the message feature vector list E = (E1, E2, ..., E...). x , ..., E y ); E x D x The corresponding message feature vector; S030, according to the similarity between each message feature vector in E and the preset historical message feature vector, determining the message feature word corresponding to each to-be-executed message in D to obtain the message feature word list F=(F1, F2, …, F x , …, F y ) corresponding to D; F x is the message feature word corresponding to D x ; each historical message feature vector corresponds to a message feature word; S040, input F into a preset second N-Gram model to predict whether the to-be-executed packet DZ entering the first-in-first-out queue next is a restart packet; S050, if DZ is a restart packet, insert the restart instruction CQ corresponding to the restart packet after the last to-be-executed packet in the first-in-first-out queue; enter S060; S060, when reaching a preset time point, enter S100; the preset time point is a time point before the execution time point TQ of the last to-be-executed packet in the first-in-first-out queue and the time interval with TQ is T; S070, determine whether to send CQ to the target vehicle machine according to the result corresponding to the restart label in S400.
5. The method of claim 4, wherein, Step S070 comprises the following steps: S071, if the restart label in S400 corresponds to a restart instruction, send CQ to the target vehicle machine to control the target vehicle machine to execute a restart operation; S072, if the restart label in S400 corresponds to a non-restart instruction, do not send CQ to the target vehicle machine.
6. The method of claim 4, wherein, Step S030 comprises the following steps: S031, obtaining E x a similarity between each preset historical message feature vector; S032, if E x If the maximum similarity RE between each preset historical message feature vector is greater than or equal to a second preset similarity threshold, the historical message feature vector corresponding to RE is determined as the target historical message feature vector; otherwise, the current processing is exited. S033, determine the message feature word corresponding to the target historical message feature vector as F x .
7. The method of claim 5, wherein the remote test reboot of the vehicle head unit is initiated by a user of the vehicle head unit. The restart instruction corresponding to the restart packet comprises a soft restart instruction and a hard restart instruction; the restart instruction corresponding to the restart label comprises a soft restart instruction and a hard restart instruction.
8. The method of claim 7, wherein, Step S071 comprises the following steps: S71, if the restart label in S400 corresponds to a restart instruction and the restart instruction corresponding to the restart label is of the same type as the restart instruction corresponding to CQ, send CQ to the target vehicle machine to control the target vehicle machine to execute a restart operation; S72, if the restart label in S400 corresponds to a restart instruction and the restart instruction corresponding to the restart label is of a different type from the restart instruction corresponding to CQ, generate an artificial selection restart prompt. 9.A non-transitory computer-readable storage medium having stored therein at least one instruction or at least one piece of program, characterized in that, The at least one instruction or the at least one program is loaded and executed by the processor to implement the remote test restart method of the vehicle machine as claimed in any one of claims 1-8.
10. An electronic device, comprising: The processor and the non-transitory computer readable storage medium of claim 9. The processor and the non-transitory computer readable storage medium of claim 9.
Citation Information
Patent Citations
Vehicle-mounted device road test method, device and system and storage medium
CN113532872A
Vehicle restart fault monitoring method and device, vehicle and storage medium
CN115416593A
Vehicle computer restart method, electronic device and storage medium
CN119781843A
Method, system and equipment for testing stability of vehicle-mounted infotainment system and medium
CN120407400A
Autonomous driving system test method and system, computer device, storage medium and program product
WO2025201029A1