A machine learning-based gateway-driven fault diagnosis method, device, and medium
Patent Information
- Application Number
- CN202211552204.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-05
- Publication Date
- 2026-09-18
- Estimated Expiration
- 2042-12-05
AI Technical Summary
但是,该申请的适用于车载环境,存在专用性较强的问题
[0033](1) By acquiring the driving status information and inputting it into the pre-trained gateway driver diagnostic model, feature extraction and feature fusion are performed on various driving status information to obtain diagnostic results and realize the diagnosis of the gateway driver, thus solving or partially solving the problem of the lack of a gateway driver fault diagnosis method based on machine learning.
Smart Images

Figure CN116260708B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence, and in particular to a gateway driver fault diagnosis method, device, and medium based on machine learning. Background Technology
[0002] Currently, driver testing for edge smart gateways relies primarily on manual, one-by-one checks, which is time-consuming and labor-intensive. In actual production, it's difficult to efficiently and comprehensively diagnose the same driver across different devices, or different drivers for the same device. Existing Linux driver auto-detection software mostly employs a logic tree traversal method, which can perform diagnostics to some extent, but suffers from high specialization and low robustness. Therefore, developing a robust, versatile, and accurate driver diagnostic system based on machine learning, using a multi-dimensional information fusion approach combining Linux driver logic trees and prompts, is of significant importance.
[0003] Chinese patent application CN202111184622.0 discloses a dual-mode adaptive vehicle-mounted intelligent gateway system, including a host. The host connects to a monitoring terminal to acquire monitoring information and transmits it to a display terminal for display. The host is connected to a Bluetooth peripheral via Bluetooth communication to acquire data information from external vehicle devices. The host also connects to an engineering vehicle via an OBD (On-Board Diagnostics) interface to acquire the vehicle's operating status. The host collects monitoring information, Bluetooth peripheral information, and vehicle operating status information. By connecting the host to the monitoring terminal and the display terminal, video playback and real-time monitoring are achieved. A CAN module is also included to acquire vehicle operation data, and BLE, G-SENSOR, and GPS / BD modules are used to acquire information from Bluetooth peripherals, vehicle attitude information, and location information, respectively, enabling precise positioning and real-time status perception of mechanical equipment. However, this application is applicable to vehicle environments and has a high degree of specialization. Furthermore, this application does not disclose a method for driving and detecting the gateway.
[0004] In summary, there is currently a lack of a machine learning-based method for gateway driver fault diagnosis that integrates multi-dimensional information to diagnose gateway drivers. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of the existing technology by providing a gateway driver fault diagnosis method, device, and medium based on machine learning. By integrating multi-dimensional driver status information and analyzing various driver status information, the invention achieves the diagnosis of gateway drivers.
[0006] The objective of this invention can be achieved through the following technical solutions:
[0007] One aspect of the present invention provides a gateway driver fault diagnosis method based on machine learning, comprising the following steps:
[0008] Obtain the driver status information of the target gateway and convert the driver status information into a preset format;
[0009] The converted driver status information is input into the pre-trained gateway driver diagnostic model to obtain the diagnostic results, thus completing the gateway driver diagnostic.
[0010] The gateway driver diagnostic model includes:
[0011] The feature extraction and fusion module is used to obtain fused features by mapping and feature extraction to fill in missing data for the driving state information after it has been converted to a preset format;
[0012] A diagnostic module is used to obtain the diagnostic results based on the fusion features.
[0013] As a preferred technical solution, the drive status information includes one or more of the following: logic tree status information, system prompt information, and communication interface drive status information.
[0014] As a preferred technical solution, the feature extraction and fusion module includes:
[0015] The first feature extraction network has a built-in feature extraction sub-model. The first feature extraction network is used to construct a prompt information matrix for the system prompt information through the preset feature extraction sub-model.
[0016] The second feature extraction network is used to extract features of the communication interface driver state information.
[0017] The third feature extraction network is used to extract features from the state information of the logic tree.
[0018] A feature fusion network is used to construct a state information matrix based on the outputs of the second feature extraction network and the third feature extraction network, and to obtain the fused features based on the prompt information matrix and the state information matrix.
[0019] As a preferred technical solution, the feature extraction sub-model is the BERT model.
[0020] As a preferred technical solution, the acquisition of the pre-trained gateway-driven diagnostic model includes the following steps:
[0021] By simulating faults, fusion features under multiple fault scenarios are obtained, and a first training sample set is constructed based on the fusion features under the multiple fault scenarios and their corresponding classifications.
[0022] The gateway-driven diagnostic model is trained based on the first training sample set. After the loss function value reaches the preset first convergence condition, the second feature extraction network and the third feature extraction network are solidified. Based on the fusion features when there is a fault and the fusion features when there is no fault, the attribute features of multiple faults are obtained. Based on the attribute features of the multiple faults and their corresponding classifications, a second training sample set is constructed.
[0023] The gateway-driven diagnostic model is trained based on the second training sample set. After the loss function value reaches a preset second convergence condition, the pre-trained gateway-driven diagnostic model is obtained.
[0024] The loss function value is the loss function value between the predicted classification result of the feature and the true classification result corresponding to the feature.
[0025] As a preferred technical solution, the diagnostic module includes a key feature extraction network based on an attention mechanism, used to extract key features from the fused features obtained after padding.
[0026] As a preferred technical solution, the process of filling in missing data and then obtaining fusion features includes the following steps:
[0027] For the features after mapping and feature extraction, for the missing dimensions or content of the fused feature data, fill the missing data with 0 and record the filling position information mask to obtain the fused features.
[0028] As a preferred technical solution, after obtaining the diagnostic results, the following is also included:
[0029] By translating the diagnostic results, diagnostic information is obtained and recorded, and repair suggestions are output.
[0030] In another aspect, an electronic device is provided, comprising: one or more processors and a memory, wherein the memory stores one or more programs, the one or more programs including instructions for executing the above-described machine learning-based gateway-driven fault diagnosis method.
[0031] In another aspect, the present invention provides a computer-readable storage medium including one or more programs executable by one or more processors of an electronic device, said one or more programs including instructions for performing the above-described machine learning-based gateway driver fault diagnosis method.
[0032] Compared with the prior art, the present invention has the following advantages:
[0033] (1) By acquiring the driving status information and inputting it into the pre-trained gateway driver diagnostic model, feature extraction and feature fusion are performed on various driving status information to obtain diagnostic results and realize the diagnosis of the gateway driver, thus solving or partially solving the problem of the lack of a gateway driver fault diagnosis method based on machine learning.
[0034] (2) A training method for a gateway-driven diagnostic model is provided, which can generate a model training set through fault simulation without collecting actual fault data, thus reducing the difficulty of creating the training set.
[0035] (3) The driver is diagnosed through machine learning, and the analysis process does not require the participation of professionals.
[0036] (4) The model training and inference processes are separated, supporting online learning, with strong robustness and high accuracy.
[0037] (5) It is easy to operate and can provide repair suggestions based on the driver status. Attached Figure Description
[0038] Figure 1 This is a schematic diagram of a gateway driver diagnostic system in Example 1;
[0039] Figure 2 This is a schematic diagram of the artificial intelligence and machine learning model structure in Example 1;
[0040] Figure 3 This is a schematic diagram of the data interaction process of the gateway-driven diagnostic system in the inference phase in Example 1. Detailed Implementation
[0041] 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, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0042] Example 1
[0043] This embodiment provides a machine learning-based gateway driver fault diagnosis method, applicable to, for example... Figure 1 The aforementioned gateway driver diagnostic system.
[0044] The gateway-driven diagnostic system consists of four parts: the intelligent gateway end, the feature extraction end, the training end, and the inference end.
[0045] The intelligent gateway collects logic tree state information (state is collected after state determination), driver (system) prompt information (raw data in the system log), and driver state information such as communication interfaces (obtained after simulating data transmission and reception), and transmits the relevant information to the PC. The logic tree state and communication interface driver state obtained from the edge are mapped (embedding) into a multi-dimensional space to construct a state information matrix; a BERT network model is used to extract features from the Linux driver (system) prompt information to construct a prompt information matrix; the prompt information matrix and the state information matrix are fused to achieve multi-dimensional information fusion and form an information matrix.
[0046] like Figure 2 The diagram illustrates the structure of an artificial intelligence and machine learning model. The fused features are an information matrix formed by fusing the prompt information matrix and the state information matrix. The Key_padding_mask is a marker used to fill in missing dimensions and content in the fused feature data during feature optimization, used to mark useless data. A multi-layer attention-based transformer encoder feature extraction network extracts key features, providing feature information for subsequent feature analysis and classification networks such as the GlobalMaxPooling1D network.
[0047] During the model training phase, multiple types of faults (simulated faults) are artificially created to obtain various fusion features. These fusion features under different faults are used as input to train the model, ensuring it can accurately classify simulated faults. Once the model can accurately identify multiple simulated fault types, the embedding network (the BERT network remains fixed) is solidified to obtain fusion features under fault-free conditions and fusion features under other fault conditions. The fusion features under fault conditions are subtracted from the fusion features under fault conditions to obtain the attribute features for each fault. By adding the attribute features of each fault to the fault-free features, multiple fault characteristics are freely combined to train the network (excluding the embedding and BERT parts), resulting in a network model that simultaneously detects multiple faults (multi-label classification), which serves as the final model.
[0048] In the reasoning stage, such as Figure 3 The diagram illustrates the data interaction process during the inference phase of the gateway-driven diagnostic system. The model is quantized using architectures such as TensorRT, and the fused feature parameters are used as input for analysis by the trained model. When optimizing features, missing dimensions or content in the fused feature data are filled with zeros, and the corresponding data is masked. These missing feature parameters are ignored when analyzing the input features. In the results analysis phase, the model's inference results are analyzed, and based on the analysis results, the system driver is diagnosed, and repair suggestions are given to the user, such as driver missing information or internal driver errors. The results are then written to the log.
[0049] This system traverses the logic tree, collects system prompts, simulates data transmission and reception to detect the driver status of system communication interfaces, and integrates multi-dimensional information to form an information matrix. Machine learning methods are used to analyze the information matrix, diagnose driver status, and provide repair suggestions. It can independently debug and test various drivers, identify the types of faulty drivers, and provide driver repair solutions.
[0050] Example 2
[0051] This embodiment provides an electronic device, including: one or more processors and a memory, wherein the memory stores one or more programs, the one or more programs including instructions for executing the machine learning-based gateway driver fault diagnosis method as described in Embodiment 1.
[0052] Example 3
[0053] This embodiment provides a computer-readable storage medium including one or more programs executable by one or more processors of an electronic device, the one or more programs including instructions for performing the machine learning-based gateway driver fault diagnosis method as described in Embodiment 1.
[0054] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A gateway-driven fault diagnosis method based on machine learning, characterized in that, Includes the following steps: Obtain the driver status information of the target gateway and convert the driver status information into a preset format; The converted driver status information is input into the pre-trained gateway driver diagnostic model to obtain the diagnostic results, thus completing the gateway driver diagnostic. The gateway driver diagnostic model includes: The feature extraction and fusion module is used to obtain fused features by mapping and feature extraction to fill in missing data for the driving state information after it has been converted to a preset format; The diagnostic module is used to obtain the diagnostic results based on the fusion features. The feature extraction and fusion module includes: The first feature extraction network has a built-in feature extraction sub-model. The first feature extraction network is used to construct a prompt information matrix for the system prompt information through the preset feature extraction sub-model. The second feature extraction network is used to extract features of the communication interface driver state information. The third feature extraction network is used to extract features from the state information of the logic tree. A feature fusion network is used to construct a state information matrix based on the outputs of the second and third feature extraction networks, and to obtain the fused features based on the prompt information matrix and the state information matrix. The acquisition of the pre-trained gateway-driven diagnostic model includes the following steps: By simulating faults, fusion features under multiple fault scenarios are obtained, and a first training sample set is constructed based on the fusion features under the multiple fault scenarios and their corresponding classifications. The gateway-driven diagnostic model is trained based on the first training sample set. After the loss function value reaches the preset first convergence condition, the second feature extraction network and the third feature extraction network are solidified. Based on the fusion features when there is a fault and the fusion features when there is no fault, the attribute features of multiple faults are obtained. Based on the attribute features of the multiple faults and their corresponding classifications, a second training sample set is constructed. The gateway-driven diagnostic model is trained based on the second training sample set. After the loss function value reaches a preset second convergence condition, the pre-trained gateway-driven diagnostic model is obtained. The loss function value is the loss function value between the predicted classification result of the feature and the true classification result corresponding to the feature.
2. The gateway driver fault diagnosis method based on machine learning according to claim 1, characterized in that, The driver status information includes one or more of the following: logic tree status information, system prompt information, and communication interface driver status information.
3. The gateway driver fault diagnosis method based on machine learning according to claim 1, characterized in that, The feature extraction sub-model is the BERT model.
4. The gateway driver fault diagnosis method based on machine learning according to claim 1, characterized in that, The diagnostic module includes a key feature extraction network based on an attention mechanism, used to extract key features from the fused features obtained after padding.
5. The gateway driver fault diagnosis method based on machine learning according to claim 1, characterized in that, The process of filling in missing data and then obtaining fusion features includes the following steps: For the features after mapping and feature extraction, for the missing dimensions or content of the fused feature data, fill the missing data with 0 and record the filling position information mask to obtain the fused features.
6. The gateway driver fault diagnosis method based on machine learning according to claim 1, characterized in that, After obtaining the diagnostic results, the following is also included: By translating the diagnostic results, diagnostic information is obtained and recorded, and repair suggestions are output.
7. An electronic device, characterized in that, include: One or more processors and a memory, wherein the memory stores one or more programs, the one or more programs including instructions for executing the machine learning-based gateway-driven fault diagnosis method as described in any one of claims 1-6.
8. A computer-readable storage medium, characterized in that, Includes one or more programs executable by one or more processors of an electronic device, said one or more programs including instructions for performing the machine learning-based gateway driver fault diagnosis method as described in any one of claims 1-6.
Citation Information
Patent Citations
Dual-mode adaptive vehicle-mounted intelligent gateway system
CN114007281A
Server fault diagnosis method and device, electronic equipment and storage medium
CN114691403A