A method for risk prediction and analysis of vehicle components

By constructing a Transformer model for risk prediction analysis of vehicle components, the complexity and time-consuming nature of identifying potential faults during vehicle inspections have been resolved, resulting in efficient and accurate inspection reports and improved transaction transparency.

CN118627898BActive Publication Date: 2026-03-06BEIJING KUCHE YIMEI NETWORK TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202410775651.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-17
Publication Date
2026-03-06
Estimated Expiration
2044-06-17

AI Technical Summary

Technical Problem

In vehicle inspection, inspectors need to accurately identify potential faults in a short time to avoid discrepancies between the inspection results and the actual condition of the vehicle. Existing technologies are complex and time-consuming, resulting in low inspection efficiency and information asymmetry.

Method used

The Transformer model is used for risk prediction analysis of vehicle components. By building a corpus, training the model, and optimizing the model parameters using the cross-entropy loss function, the system predicts the state and relationships of vehicle components and provides real-time auxiliary decision support.

Benefits of technology

Accurately identify high-risk components and potential faults, improve the efficiency of inspectors, provide transparent and accurate inspection reports, enhance consumer trust, and promote the intelligence and transparency of the vehicle transaction process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118627898B_ABST
    Figure CN118627898B_ABST
Patent Text Reader

Abstract

This invention provides a method for risk prediction and analysis of vehicle components, comprising the following steps: 1. Data preprocessing; 2. Data processing, constructing an input sequence; 3. Constructing a Transformer model; 4. Training the Transformer model; 5. Detecting applications using the Transformer model. The vehicle component risk prediction and analysis method provided by this invention, through in-depth mining and intelligent analysis of massive historical inspection and vehicle repair data, constructs a component risk assessment model, which can accurately identify high-risk components and potential faults, providing real-time auxiliary decision support for inspectors; it can predict common fault locations of specific vehicle models, thereby guiding inspectors to focus on these areas. This invention not only significantly improves the work efficiency of inspectors and reduces human error, but also provides car owners with more transparent and accurate inspection reports, enhancing consumer trust in the transaction process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of vehicle inspection and analysis technology, and specifically relates to a method for risk prediction and analysis of vehicle components. Background Technology

[0002] In vehicle maintenance, both the repair and replacement of parts can affect the vehicle's condition and the lifespan of the parts. Repairing a part can affect its strength, while replacing a part can have a significant impact on the vehicle's components depending on the type of replacement part (for example, when replacing an original part with a high-quality counterfeit part, the counterfeit part is a fake product with no quality guarantee).

[0003] With the continued expansion of the global passenger vehicle market and the increasing activity in vehicle transactions, vehicle-related industries are showing strong growth momentum. Among them, the vehicle inspection industry, as a key supporting link, is undergoing profound changes and upgrades. This booming development not only reflects the strong consumer demand for automobiles but also reveals the industry's urgent pursuit of refined and intelligent services.

[0004] In the vehicle transaction chain, professional and detailed inspection services play an indispensable role. Faced with dozens or even hundreds of inspection items involved in each inspection—covering various common and core vehicle components from engines, transmission systems, suspension systems, and electronic equipment to body structure—the complexity and time-consuming nature of the inspection work has become a major concern in the industry. Inspectors not only need to possess profound vehicle expertise but also must accurately identify potential faults in a short time to avoid discrepancies between the inspection results and the vehicle's true condition due to omissions or misjudgments. This complex working environment not only places extremely high demands on the professional skills and experience of inspectors but also brings inconveniences to car owners, such as long waiting times and information asymmetry. Summary of the Invention

[0005] To address the above problems, this invention provides a method for risk prediction and analysis of vehicle components.

[0006] The vehicle component risk prediction and analysis method provided by this invention includes the following steps:

[0007] 1. Data preprocessing;

[0008] 2. Data processing: Construct the input sequence to obtain the input sequence;

[0009] 3. Construct the Transformer model;

[0010] 4. Train the Transformer model;

[0011] 5. The Transformer model detection application,

[0012] in,

[0013] Step 1:

[0014] 1A. Summarize the names and statuses of vehicle components and construct a corpus;

[0015] 1B. Filter corpus elements from the corpus to construct a high-risk component corpus;

[0016] 1C. Create a vehicle model database based on vehicles circulating in the market;

[0017] 1D. Clean the vehicle inspection and maintenance information, remove irrelevant information, and retain only the text related to the status of the components;

[0018] 1E. Based on the corpus, process the text to extract component names and component status information;

[0019] 1F. Based on the vehicle model database, parse the vehicle identification code to be analyzed, match it to the corresponding vehicle model record, and obtain the vehicle identification number.

[0020] Step 3 includes the following steps:

[0021] 3A. Adjusting the Transformer model only requires using the encoder;

[0022] 3B. Pass the input sequence to the encoder so that the encoder can learn the relationships therein;

[0023] 3C. Add a classification layer to the output vector to predict the state of associated components;

[0024] Step 4 includes the following steps:

[0025] 4A. The pre-selected samples are converted into input sequences in step 2 to train the Transformer model constructed in step 3;

[0026] 4B. Use the cross-entropy loss function to measure the accuracy of the model's predictions;

[0027] 4C. Calculate the gradient by backpropagating the total cross-entropy loss through the model;

[0028] 4D. Use the optimizer Adam to update the model parameters based on the gradient to reduce the cross-entropy loss between the prediction results output by the Transformer model and the pseudo-labels;

[0029] 4E. Divide the input sequence constructed in step 2 into a training sequence and a validation sequence, and use the training sequence to iteratively train the Transformer model, and use the validation sequence to monitor the Transformer model.

[0030] further,

[0031] The corpus includes multiple corpus elements, and each corpus element includes three corpus sub-elements: the first corpus sub-element stores the sequence number, i.e. the sequence number of the corpus element; the second corpus sub-element stores the component name; and the third corpus sub-element stores the component status.

[0032] The high-risk component corpus includes multiple high-risk component corpus elements, and each high-risk component corpus element includes four high-risk component corpus sub-elements: the first high-risk component corpus sub-element stores the serial number, i.e. the serial number of the high-risk component corpus element; the second high-risk component corpus sub-element stores the vehicle identification number; the third high-risk component corpus element stores the component name; and the fourth high-risk component corpus sub-element stores the component status.

[0033] The vehicle model database includes at least one vehicle model element, and each vehicle model element includes four vehicle model sub-elements: the first vehicle model sub-element stores the vehicle identification number, the second vehicle model sub-element stores the brand name, the third vehicle model sub-element stores the vehicle series name, and the fourth vehicle model sub-element stores the vehicle model name.

[0034] Step 1F includes the following steps:

[0035] 1. Call the vehicle identification code parsing interface to parse and obtain the brand name, vehicle series name, and model name corresponding to the vehicle identification code;

[0036] 1Fb. Match the corresponding vehicle elements in the vehicle database using the brand name, series name, and model name;

[0037] 1Fc, Extract the vehicle identification number of the matched vehicle element.

[0038] further,

[0039] Step 2 includes the following steps:

[0040] 2A. Sample processing: The information obtained from each vehicle repair or inspection is regarded as a sample. Each sample contains at least one component and its state. The vehicle model and a sample are represented as a sequence of data in a one-to-one correspondence: [Vehicle model identification number - component 1 - state 1, ..., vehicle model identification number - component n - state n], where n is an integer not less than 1, representing the number of components whose state is adjusted each time the vehicle is repaired or inspected.

[0041] 2B. Text Encoding: The sequence data is converted into a numerical form that the Transformer model can process through word embedding, resulting in the input sequence: (Vehicle Identification Number - Component Name 1 - Component State 1, ..., Vehicle Identification Number - Component Name n - Component State n). The input sequence includes n input data, and the i-th data is in the format: Vehicle Identification Number - Component Name i - Component State i. After the conversion, each component name component i and the corresponding state state i in the sequence data are mapped to a fixed-dimensional vector, where i is an integer and satisfies 1 ≤ i ≤ n.

[0042] further,

[0043] In step 3c, the core of the classification layer is a fully connected layer. The fully connected layer is used to perform a weighted summation of the features extracted from the previous layer, i.e., the last hidden layer of the neural network, and add a bias term. Then, the output is obtained through a softmax activation function. The initial bias term for the part name is set to 0.74, and the initial bias term for the part state is set to 0.5.

[0044] further,

[0045] Step 4B includes the following steps:

[0046] 4Ba, Autoregressive Generation: For any input sequence j generated from the sample, for the i-th data, the Transformer model is used to predict the probability distribution of the components and their states in the (i+1)-th data based on the first to the i-th data in the input sequence j, i.e., the combination of vehicle model component states;

[0047] 4Bb, Cutoff probability distribution: In order to calculate the loss, a cutoff point is selected, specifically a threshold is set as the cutoff point, and only vehicle component state combinations whose probability of state is greater than the threshold are retained.

[0048] 4Bc. Construct pseudo-labels: Use the probability distribution of the states in the truncated combination of vehicle component states as pseudo-labels;

[0049] 4Bd. Ensure that the output of the Transformer model and the pseudo-label have the same vehicle component state combination order;

[0050] 4Be, Cross-entropy Calculation: For each combination of component states in the output of the Transformer model, the cross-entropy is calculated using its predicted probability and the probability in the corresponding pseudo-label;

[0051] 4Bf, the cross-entropy calculation formula is as follows: ,

[0052] In the above formula, pi is the probability of component state combination i in the pseudo-label, and qi is the probability of the same component state combination in the model output.

[0053] 4Bg. The cross-entropy loss of the entire sample is obtained by summing the cross-entropy of all component state combinations.

[0054] further,

[0055] The threshold is 0.4.

[0056] further,

[0057] Step 4C includes the following steps:

[0058] 4Ca, Backpropagation: Starting from the output layer, the gradient of the loss function with respect to the model parameters is calculated in reverse. Specifically, the backpropagation means starting from the output layer and performing the following operation for each layer: calculate the gradient of the loss function with respect to the model output layer according to the chain rule, propagate the gradient to the previous layer of the model, and repeat the operation until the input layer or embedding layer of the Transformer model is reached.

[0059] 4Cb, Accumulated Gradient: The gradients calculated in each layer are accumulated onto the gradient tensor of the corresponding parameter. Due to batch training, the Transformer model first calculates the gradient of each sample, and then averages the gradients of the entire batch of samples to obtain the batch gradient. Each gradient in the batch gradient is automatically stored in the .grad attribute of the corresponding parameter tensor.

[0060] further,

[0061] Step 4D includes the following steps:

[0062] 4Da, Create an optimizer instance and associate it with the hyperparameters of the Transformer model, including setting the hyperparameters before creating the optimizer instance: learning rate, momentum betas, and weight decay to optimize the model. The values ​​of each hyperparameter are set as follows:

[0063] learning_rate=1×10 -3 ;

[0064] betas=(0.9, 0.999), where betas is Adam's beta parameter, used to control the rate of momentum decay and second moment decay;

[0065] eps=1×10 -8 eps is a small amount to prevent division by zero;

[0066] weight_decay=0.

[0067] 4Db, Use the optimizer step() to update the model parameters based on the gradient currently stored in the .grad of the parameter tensor and the momentum and second moment estimates from the Adam algorithm.

[0068] further,

[0069] Step 5 includes the following steps:

[0070] Including the following steps:

[0071] 5a. Parse the vehicle identification number (VIN) of the vehicle to be inspected to obtain its corresponding vehicle model identification number;

[0072] The vehicle identification code of the vehicle to be detected is parsed to obtain its corresponding brand name, vehicle series name, and model name;

[0073] By matching the corresponding brand name, car series name, and model name with the corresponding model record in the model database, that is, the corresponding model element;

[0074] Retrieve the vehicle identification number stored in the matched vehicle record.

[0075] 5b. Based on the vehicle identification code of the vehicle to be tested, query its corresponding historical detection data and vehicle maintenance data, and extract the replaced and repaired parts for actual testing. After processing through step 2, the actual input sequence is obtained and input into the Transformer model as input data. The Transformer model generates a combination of component states associated with the actual input sequence, which includes the component state sequence and its probability distribution.

[0076] 5c. When the probability of a component being in maintenance or replacement exceeds a probability threshold in the component state sequence and probability distribution obtained from step 5b, the component is considered to be in a risky state.

[0077] 5d. Based on the high-risk component corpus, screen the components that are in a risky state obtained through step 5c. If the component belongs to the high-risk component corpus, remind the tester to test it.

[0078] further,

[0079] The probability threshold is 60%.

[0080] The vehicle component risk prediction and analysis method provided by this invention, through in-depth mining and intelligent analysis of massive historical inspection and vehicle repair data, constructs a component risk assessment model. This model can accurately identify high-risk components and potential faults, providing real-time decision support for inspectors. It can also predict common fault locations for specific vehicle models, thereby guiding inspectors to focus on these areas. This invention not only significantly improves the work efficiency of inspectors and reduces human error, but also provides car owners with more transparent and accurate inspection reports, enhancing consumer trust in the transaction process.

[0081] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures pointed out in the description, claims and drawings. Attached Figure Description

[0082] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0083] Figure 1 A flowchart of a vehicle component risk prediction and analysis method according to an embodiment of the present invention is shown. Detailed Implementation

[0084] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0085] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains; the terminology used herein in the specification is for the purpose of describing particular embodiments only and is not intended to limit the application; the terms "comprising" and "having," and any variations thereof, in the specification, claims, and accompanying drawings of this application are intended to cover non-exclusive inclusion. The terms "first," "second," "third," etc., in the specification, claims, or accompanying drawings of this application are used to distinguish different objects, not to describe a specific order or hierarchy. The term "multiple" in this application refers to two or more (including two).

[0086] In this document, the term "embodiment" means that a particular feature, structure, or characteristic described in connection with an embodiment may be included in at least one embodiment of this application. The appearance of this phrase in various places throughout the specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment mutually exclusive with other embodiments. It will be explicitly and implicitly understood by those skilled in the art that the embodiments described herein can be combined with other embodiments.

[0087] Figure 1 A flowchart illustrating the vehicle component risk prediction and analysis method provided by this invention. See also... Figure 1 The vehicle component risk prediction and analysis method includes the following steps.

[0088] 1. Data preprocessing, including the following steps:

[0089] 1A. Technicians summarize the names and statuses of vehicle parts and construct a corpus. The corpus includes more than one corpus element, and each corpus element includes three sub-elements: the first sub-element stores the sequence number, i.e., the corpus element number; the second sub-element stores the part name; and the third sub-element stores the part status. Table 1 shows an example of the corpus. As can be seen from Table 1, this corpus has two corpus elements. The sequence number of the first corpus element is 1, the part name is "left rear fender," and the part status is "under repair"; the sequence number of the second corpus element is 2, the part name is "rear bulkhead," and the part status is "replacement."

[0090] Table 1. Corpus Examples.

[0091] Serial Number Component Name Component status 1 Left rear fender repair 2 rear panel replace

[0092] 1B. Technical personnel will select high-priority components (i.e., components that significantly impact vehicle condition) from the corpus to construct a high-risk component corpus. Note that the high-priority components may differ depending on the vehicle model. The high-risk component corpus includes multiple high-risk component elements, each containing four sub-elements: the first sub-element stores a sequence number (i.e., the element's serial number); the second sub-element stores the vehicle identification number (ID); the third sub-element stores the component name; and the fourth sub-element stores the component status. Table 2 shows an example of a high-risk component corpus. As can be seen from Table 2, there are four high-risk component corpus elements in this corpus. The first high-risk component corpus element has the serial number 1, the component name is left rear fender, and the component status is under repair. The second high-risk component corpus element has the serial number 2, the component name is rear panel, and the component status is replacement. The vehicle model IDs of the first and second high-risk component corpus elements are both 13345. The third high-risk component corpus element has the serial number 3, the component name is left rear fender, and the component status is under repair. The fourth high-risk component corpus element has the serial number 4, the component name is rear panel, and the component status is replacement. The vehicle model IDs of the third and fourth high-risk component corpus elements are both 13346.

[0093] Table 2. Examples of high-risk component corpora.

[0094] Serial Number Model ID Component Name Component status 1 13345 Left rear fender repair 2 13345 rear panel replace 3 13346 Left rear fender repair 4 13346 rear panel replace

[0095] 1C. Technical personnel create a vehicle model database based on vehicles circulating in the market. The database includes at least one vehicle model element, and each element contains four sub-elements: the first sub-element stores the vehicle model ID, the second stores the brand name, the third stores the model series name, and the fourth stores the vehicle model name. Table 3 shows an example of the vehicle model database. As shown in Table 2, the vehicle model ID in this corpus is 13345, the brand name is Aston Martin, the model series name is Aston Martin DBS, and the model name is the 2020 DBS Superleggera V12 Volante.

[0096] Table 3. Example of vehicle model library.

[0097] 1D. Technicians clean the vehicle inspection and repair information, removing irrelevant information such as dates and repair personnel names, retaining only text related to component status. Example: Input vehicle inspection and repair information: Thank you for choosing Harbin Zhongbao. After-sales service advisor *** is at your service. Repair: Rear bumper cover removal and installation. After data cleaning, the result is: Repair: Rear bumper cover removal and installation.

[0098] 1E. Based on the corpus, technicians process the text to extract component names and component status information. The data cleaning result in step 1D, after processing, yields the component name as: rear bumper cover, and the component status as: disassembled / assembled.

[0099] 1F. Based on the vehicle model database, parse and match the vehicle identification code (VIN) to be analyzed to obtain the corresponding vehicle model ID, including the following steps:

[0100] 1Fa. Call the third-party VIN parsing interface to parse and obtain the brand name, car series name, and model name corresponding to the VIN. The third party refers to some companies in the market that provide VIN parsing vehicle information services.

[0101] 1Fb. Match the corresponding vehicle elements in the vehicle database by brand name, series name, and model name;

[0102] 1Fc: Extract the vehicle model ID of the matched vehicle model element.

[0103] 2. Data processing, constructing the input sequence, including the following steps:

[0104] 2A. Sample Processing: The information obtained from each vehicle repair or inspection is regarded as a sample. Each sample contains at least one component and its state. The vehicle model and the sample are represented in a one-to-one correspondence, or a sequence of data is generated: [Model ID-Component 1-State 1, ..., Model ID-Component n-State n], where n is an integer not less than 1, representing the number of components whose state is adjusted each time the vehicle is repaired or inspected.

[0105] 2B. Text Encoding: Sequence data is converted into a numerical form that the model can process using word embeddings, resulting in the input sequence: (Model ID - Part Name 1 - Part State 1, ..., Model ID - Part Name n - Part State n). The input sequence includes n input data points, where the i-th data point is formatted as: Model ID - Part Name i - Part State i. After this conversion, each part name (part i) and its corresponding state (state i) in the sequence data is mapped to a fixed-dimensional vector, where i is an integer and satisfies 1 ≤ i ≤ n.

[0106] 3. Construct the Transformer model, including the following steps:

[0107] 3A. Adjust the Transformer model. Since text generation is not required, only the encoder part is needed. In this invention, the Transformer model used is version 4.30.0 of the open-source Hugging Face Transformers model package.

[0108] 3B. Pass the input sequence to the encoder so that the encoder can learn the relationships between them. The encoder's output is a fixed-size vector, i.e., a fixed-dimensional vector, which contains information about all components in the input sequence.

[0109] 3C. Add a classification layer (a type of output layer) to the output vector to predict the state of associated parts. The classification layer has the same number of neurons as the number of output categories and uses a softmax activation function to output the probability of each part state. The core of this classification layer is a fully connected layer, where each neuron is connected to every neuron in the previous layer (i.e., the last hidden layer of the neural network). The fully connected layer performs a weighted summation of the features extracted from the previous layer, adds a bias term, and then passes the sum to obtain the output through a softmax activation function. The number of output neurons in the classification layer is the same as the number of part states to be predicted (i.e., the number of categories). For example, if there are 10 possible part states, the classification layer will have 10 output neurons. The softmax activation function transforms the raw output of each output neuron into a probability distribution, ensuring that the sum of the probability values ​​of the final outputs of all output neurons is 1, and that each probability value is between 0 and 1. This allows the Transformer model to output the probability of each part state being predicted. Based on the recommendations of vehicle technology experts, this invention believes that the weight of component names is higher than that of component states during model training. Therefore, the initial bias term for component names is set to 0.74, and the initial bias term for component states is set to 0.5.

[0110] The associated components are those that have a relationship with the components listed in the input sequence in vehicle maintenance. For example, if repairing component A requires repairing component B first, or repairing component C requires replacing component D first, then if the input sequence lists component A or C, the corresponding associated components are component B or D. After executing step 3C, the status of the associated components is automatically determined by the Transformer model.

[0111] 4. Training the Transformer model, including the following steps:

[0112] 4A. After constructing the input sequence from the pre-selected samples in step 2A, convert it into an input sequence in step 2B to train the Transformer model constructed in step 3.

[0113] 4B. Use the cross-entropy loss function to measure the accuracy of the model's predictions. In unsupervised learning scenarios, since there are no explicit labels, we need to construct pseudo-labels (i.e., "soft targets") based on the model's autoregressive properties, including the following steps:

[0114] 4Ba, Autoregressive Generation: For any input sequence j corresponding to a sample, for the i-th data, the Transformer model is used to predict the probability distribution of the components and their states in the (i+1)-th data based on the first to the i-th data in the input sequence j, i.e., the combination of vehicle model component states.

[0115] 4Bb, Cutoff Probability Distribution: In order to calculate the loss, a cutoff point is selected. Specifically, a threshold such as 0.4 can be set as the cutoff point. Only vehicle component state combinations in which the probability of the state is greater than the threshold are retained.

[0116] 4Bc. Constructing pseudo-labels: The probability distribution of the states in the truncated combination of vehicle component states is used as pseudo-labels. Each element in the probability distribution, i.e. each probability value, represents the probability that the Transformer model predicts for the combination of vehicle component states.

[0117] 4Bd. Ensure that the output of the Transformer model and the pseudo-label have the same vehicle component state combination order.

[0118] 4Be, Cross-entropy Calculation: For each combination of component states in the output of the Transformer model, the cross-entropy is calculated using its predicted probability and the probability in the corresponding pseudo-label.

[0119] 4Bf, the cross-entropy calculation formula is as follows: ,

[0120] In the above formula, pi is the probability of component state combination i in the pseudo-label, and qi is the probability of the same component state combination in the model output.

[0121] 4Bg. The cross-entropy loss of the entire sample is obtained by summing the cross-entropy of all component state combinations.

[0122] 4C. Calculate the gradient of the total cross-entropy loss through backpropagation of the model, including the following steps:

[0123] 4Ca, Backpropagation: Starting from the output layer, the gradient of the loss function with respect to the model parameters is calculated in reverse. Specifically, the backpropagation refers to performing the following operation for each layer, starting from the output layer: calculating the gradient of the loss function with respect to the model's output layer according to the chain rule, propagating the gradient to the previous layer of the model, and repeating this operation until the input layer or embedding layer of the Transformer model is reached. This operation utilizes the derivative of the previous layer's output with respect to the current layer, i.e., the derivative of the activation function, of the input of each layer. The backpropagation involves the application of the chain rule because the loss function is a composite function of the model parameters. At each layer, the Transformer model calculates the gradient of the current layer's output with respect to its weights and biases, and how these gradients affect the gradient of the previous layer. This process continues to propagate back to the input layer. This step utilizes the Transformer model's self-attention mechanism and the gradient calculation of the feedforward neural network (FFN).

[0124] 4Cb, Accumulated Gradient: The gradients calculated in each layer are accumulated onto the gradient tensor of the corresponding parameters. The core structure of the Transformer model used in this invention, from front to back, includes: Input Layer, Self-Attention Layer, Feedforward Neural Network Layer (i.e., fully connected or dense layer), and Output Layer. The Input Layer converts the raw data into a format that the Transformer model can process. The Self-Attention Layer learns the relationships between words, capturing global dependencies between words. The Feedforward Neural Network Layer introduces non-linearity, increasing model complexity and mitigating the vanishing gradient problem. The Output Layer generates the final prediction result. The Transformer model used in this invention employs Layer Normalization to stabilize the training process. Layer Normalization is a key component of the Transformer model, helping to accelerate training and improve model performance. Residual Connections are also used to alleviate the vanishing gradient problem in deep neural networks. Due to batch training, Transformer models typically calculate the gradient of each sample first, and then average the gradients of the entire batch of samples to obtain the batch gradient. Each gradient in the batch gradient is automatically stored in the .grad attribute of the corresponding parameter tensor.

[0125] 4D. Use the optimizer Adam to update model parameters based on gradients to reduce the cross-entropy loss between the Transformer model's predictions and pseudo-labels, including the following steps:

[0126] 4Da, Create an optimizer instance and associate it with the training parameters, i.e., hyperparameters, of the Transformer model.

[0127] Before creating an optimizer instance, set hyperparameters such as learning rate, betas, and weight decay (regularization term) to optimize the model. The values ​​for each hyperparameter are as follows:

[0128] learning_rate=1×10 -3 ;

[0129] betas=(0.9, 0.999), where betas is Adam's beta parameter, used to control the rate of momentum decay and second moment decay;

[0130] eps=1×10 -8 eps is a small amount to prevent division by zero;

[0131] weight_decay=0.

[0132] 4Db, Use the optimizer step() to update the model parameters based on the gradient currently stored in the parameter tensor's .grad file, as well as the momentum and second-order moment estimates specific to the Adam algorithm.

[0133] 4E. Divide the input sequence constructed in step 2 into a training sequence and a validation sequence, and use the training sequence to iteratively train the Transformer model, and use the validation sequence to monitor the Transformer model.

[0134] 5. Transformer model detection application, including the following steps:

[0135] 5a. Using the VIN of the vehicle to be detected, parse out the vehicle model ID corresponding to the VIN;

[0136] Call the third-party VIN parsing interface to parse the VIN and obtain the brand name, car series name, and model name corresponding to the VIN;

[0137] Match the corresponding vehicle model record, i.e., the corresponding vehicle model element, to the vehicle model library created in step 1C by using the brand name, car series name, and model name corresponding to vin.

[0138] Retrieve the vehicle model ID stored in the matched vehicle model record.

[0139] 5b. Based on VIN, query the corresponding historical inspection data and vehicle maintenance data. Extract the replaced and repaired parts from the historical inspection data and vehicle maintenance data and measure the actual samples. After processing in step 2, obtain the measured input sequence, which is then input into the Transformer model as input data. The Transformer model generates a combination of component states associated with the measured input sequence. The combination of component states includes the component state sequence and its probability distribution.

[0140] 5c. When the probability of a component being repaired or replaced in the component status sequence and probability distribution obtained from step 5b exceeds a probability threshold such as 60%, the component is considered to be in a risky state. That is, in the corresponding historical inspection data and vehicle maintenance data, the replaced and repaired components are in a risky state.

[0141] 5d. Based on the high-risk component corpus marked in step 1B, screen the risk status components obtained in step 5c. If the risk status component belongs to the high-risk component corpus, remind the tester to focus on testing it.

[0142] This invention has broad application prospects, specifically in the following two aspects:

[0143] Improved Vehicle Inspection Efficiency: This invention provides vehicle inspectors with a highly efficient auxiliary tool. During the inspection process, inspectors can use this model to retrieve historical repair data of the vehicle being inspected as input. Subsequently, the model will intelligently predict potentially high-risk vehicle components based on this data and provide immediate alerts to the inspector. This not only greatly improves the efficiency of the inspection work but also ensures the accuracy of the inspection results, providing a more reliable guarantee for vehicle safety.

[0144] Transparency in Used Car Transactions: This invention is also of great significance to used car buyers. Before purchasing a vehicle, buyers can access the vehicle's maintenance history data as input and use this model to predict risks. The model quickly analyzes and outputs the predicted high-risk components and their current condition, providing buyers with a detailed vehicle condition analysis report based on the vehicle's maintenance history data. This feature not only enhances the transparency of used car transactions, allowing buyers to more clearly understand the actual condition of the vehicle, but also injects new vitality into the healthy development of the used car market.

[0145] This invention utilizes in-depth mining and intelligent analysis of massive amounts of historical inspection and vehicle repair data to construct a component risk assessment model. This model can accurately identify high-risk components and potential faults, providing real-time decision support for inspectors. It can also predict common fault locations for specific vehicle models, guiding inspectors to focus on these areas. This invention not only significantly improves inspector efficiency and reduces human error, but also provides car owners with more transparent and accurate inspection reports, enhancing consumer trust in the transaction process.

[0146] In summary, by employing this invention, the vehicle inspection industry can achieve service upgrades and efficiency improvements, significantly enhancing the work efficiency and inspection accuracy of inspectors, thus enabling car owners to enjoy a more efficient and accurate inspection experience. This invention can propel the entire vehicle transaction-related industry into a new era of intelligence and personalization.

[0147] Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method of vehicle component risk estimation analysis, characterized by, The method comprises the steps of:

1. data preprocessing; 2. data processing, constructing input sequences, and obtaining input sequences; 3. constructing a Transformer model; 4. training the Transformer model; 5. applying the Transformer model for detection, wherein, the step 1 comprises the steps of: 1A, summarizing vehicle component names and component states and constructing a corpus; 1B, screening corpus elements from the corpus and constructing a high-risk component corpus; 1C, creating a vehicle model library according to market circulating vehicles; 1D, cleaning vehicle detection and maintenance information, removing irrelevant information, and only retaining text related to component states; 1E, processing the text according to the corpus, extracting component names and component state information; 1F, parsing and matching the vehicle identification code to be analyzed to the corresponding vehicle model record according to the vehicle model library to obtain the vehicle model identification number, the step 3 comprises the steps of: 3A, adjusting the Transformer model, only the encoder is needed; 3B, passing the input sequence to the encoder to let the encoder learn the correlation therein; 3C, adding a classification layer to the output vector for predicting the state of the associated component; the step 4 comprises the steps of: 4A, converting preselected samples into input sequences through the step 2 to train the Transformer model constructed in the step 3; 4B, using a cross-entropy loss function to measure the accuracy of the model prediction; 4C, calculating the gradient by backward propagating the total cross-entropy loss through the model; 4D, updating the model parameters according to the gradient using the optimizer Adam to reduce the cross-entropy loss between the prediction results output by the Transformer model and the pseudo label; 4E, dividing the input sequences constructed in the step 2 into training sequences and validation sequences, and iteratively training the Transformer model using the training sequences and monitoring the Transformer model using the validation sequences; the corpus comprises a plurality of corpus elements, each of which comprises three corpus sub-elements: a serial number, i.e., the serial number of the corpus element, is stored in the first corpus sub-element, a component name is stored in the second corpus sub-element, and a component state is stored in the third corpus sub-element; the high-risk component corpus comprises a plurality of high-risk component corpus elements, each of which comprises four high-risk component corpus sub-elements: a serial number, i.e., the serial number of the high-risk component corpus element, is stored in the first high-risk component corpus sub-element, a vehicle model identification number is stored in the second high-risk component corpus sub-element, a component name is stored in the third high-risk component corpus element, and a component state is stored in the fourth high-risk component corpus sub-element; the vehicle model library comprises at least one vehicle model element, each of which comprises four vehicle model sub-elements: a vehicle model identification number is stored in the first vehicle model sub-element, a brand name is stored in the second vehicle model sub-element, a vehicle series name is stored in the third vehicle model sub-element, and a vehicle model name is stored in the fourth vehicle model sub-element; the step 1F comprises the steps of: 1Fa, call the vehicle identification code analysis interface to parse the brand name, vehicle series name and vehicle model name corresponding to the vehicle identification code; 1Fb, match the corresponding vehicle model element in the vehicle model library through the brand name, vehicle series name and vehicle model name; 1Fc, take out the vehicle model identification number of the matched vehicle model element; The step 2 includes the following steps: 2A, sample processing: the information obtained each time the vehicle is maintained or detected is regarded as a sample, each sample contains at least one component and its state, and the vehicle model and one sample are one-to-one correspondingly represented as a sequence data: [vehicle identification number-component 1-state 1,..., vehicle identification number-component n-state n], wherein n is an integer not less than 1, representing the number of components whose state is adjusted each time the vehicle is maintained or detected; 2B, text encoding: the sequence data is converted into a numerical form that can be processed by the Transformer model through word embedding, obtaining an input sequence: (vehicle identification number-component name 1-component state 1,..., vehicle identification number-component name n-component state n), the input sequence includes n input data, the format of the i-th data is: vehicle identification number-component name i-component state i, after the conversion, each component name component i and the corresponding component state i in the sequence data are mapped to a fixed-dimensional vector, i is an integer, and satisfies 1≤i≤n; In the step 3c, the core of the classification layer is a fully connected layer, which is used to weight sum the features extracted by the last hidden layer of the neural network in the previous layer and add a bias term, and then obtain the output through a softmax activation function, wherein the value of the initial bias term of the component name is set to 0.74, and the value of the initial bias term of the component state is set to 0.5; The step 4B includes the following steps: 4Ba, autoregressive generation: for the input sequence j generated for any sample, for the i-th data in it, the probability distribution of the component and its state in the i+1-th data is predicted according to the 1st data to the i-th data in the input sequence j using the Transformer model, that is, the vehicle component state combination; 4Bb, truncate the probability distribution: in order to calculate the loss, a threshold is selected as the truncation point, and only the vehicle component state combination whose state probability is greater than the threshold is retained in the truncated vehicle component state combination; 4Bc, construct pseudo-labels: the state probability distribution in the truncated vehicle component state combination is taken as the pseudo-labels; 4Bd, ensure that the output result of the Transformer model and the pseudo-labels have the same vehicle component state combination sequence; 4Be, cross-entropy calculation: for each component state combination in the output result of the Transformer model, the cross-entropy is calculated using the prediction probability and the corresponding probability in the pseudo-labels; 4Bf, the cross-entropy calculation formula is as follows: , In the above formula, pi is the probability of the i-th component state combination in the pseudo-labels, and qi is the probability of the same component state combination in the model output. 4Bg, summing up the cross-entropy of all component state combinations to obtain the cross-entropy loss of the entire sample; The threshold is 0.4; The step 4C includes the steps of: 4Ca, back propagation: starting from the output layer, the gradient of the loss function with respect to the model parameters is calculated in reverse, specifically, starting from the output layer, for each layer, the gradient of the loss function with respect to the model output layer is calculated according to the chain rule, the gradient is propagated to the previous layer of the model, and the operation is repeated until the input layer or the embedding layer of the Transformer model is reached; 4Cb, accumulate the gradient calculated by each layer to the gradient tensor of the corresponding parameter, due to batch training, the Transformer model first calculates the gradient of each sample, then averages the gradients of the entire batch sample to obtain the batch gradient, each gradient in the batch gradient is automatically stored in the.grad attribute of the corresponding parameter tensor; The step 4D includes the steps of: 4Da, create an optimizer instance associated with the hyperparameters of the Transformer model, including: setting the hyperparameters: learning rate learning_rate, momentum betas, and weight decay weight_decay to optimize the model before creating the optimizer instance, the values of each hyperparameter setting are as follows: learning_rate=1×10 -3 ; betas=(0.9, 0.999), betas is the beta parameter of Adam, used to control the rate of momentum decay and second moment decay; eps = 1 x 10 -8 , eps is a small quantity to prevent division by zero; weight_decay=0; 4Db, update the model parameters using the optimizer step() according to the gradient currently stored in the.grad of the parameter tensor, as well as the momentum and second moment estimation of the Adam algorithm.

2. The vehicle component risk estimation analysis method according to claim 1, wherein, The step 5 includes the steps of: including the steps of: 5a, by the vehicle identification code of the vehicle to be detected, the corresponding vehicle model identification number is parsed; The vehicle identification code of the vehicle to be detected is parsed to obtain the corresponding brand name, vehicle series name and vehicle model name; Match the corresponding vehicle model record, i.e. the corresponding vehicle model element, in the vehicle model library through the corresponding brand name, vehicle series name and vehicle model name; Take out the vehicle model identification number stored in the matched vehicle model record, 5b, according to the vehicle identification code of the vehicle to be detected, query the corresponding historical detection data and vehicle maintenance data, and extract the replaced and maintained components from the real measurement sample, then process the input sequence obtained after the step 2 to obtain the input data input into the Transformer model, and the Transformer model generates a component state combination associated with the real measurement input sequence, which includes a component state sequence and its probability distribution; 5c, when the probability of the component state being maintenance and replacement in the component state sequence and its probability distribution obtained by the step 5b exceeds the probability threshold, it is considered that the component is in a risk state; 5d. Based on the high-risk component corpus, screen the components that are in a risky state obtained through step 5c. If the component belongs to the high-risk component corpus, remind the tester to test it.

3. The vehicle component risk prediction and analysis method according to claim 2, characterized in that, The probability threshold is 60%.

Citation Information

Patent Citations

  • Vehicle safety assessment method, system, device and equipment and storage medium

    CN116882632A