A locomotive operation and maintenance method and related device

By deploying local knowledge bases and vector libraries on locomotive edge devices and combining them with large language models, real-time diagnosis and repair of locomotive faults were achieved, solving the problem of locomotive faults not being handled quickly while en route and improving the real-time performance and stability of fault handling.

CN122472740APending Publication Date: 2026-07-28CRRC QISHUYAN CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610604563.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-04-30
Publication Date
2026-07-28

AI Technical Summary

Technical Problem

In existing technologies, when a locomotive experiences a sudden malfunction en route, it is impossible to achieve real-time fault diagnosis and handling at the second or even millisecond level. This is especially true in areas with weak or no network coverage, such as tunnels, mountains, and deserts, which makes it impossible to quickly locate and handle emergency faults, affecting driving safety and transportation efficiency.

Method used

Deploy local knowledge bases and vector libraries on the locomotive edge devices, and combine them with the target large language model to generate fault repair information through precise matching and similarity retrieval, including fault causes, repair steps and safety precautions, so as to realize real-time fault analysis and handling.

Benefits of technology

In environments with limited wireless transmission, low-latency and highly reliable fault diagnosis and maintenance were achieved, improving the real-time performance and stability of locomotive faults on the road, increasing retrieval accuracy and coverage, reducing manual labor, and improving fault handling efficiency and operational safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122472740A_ABST
    Figure CN122472740A_ABST
Patent Text Reader

Abstract

The application discloses a locomotive operation and maintenance method and related device, and relates to the technical field of artificial intelligence, comprising: acquiring user maintenance query information and real-time fault codes of a locomotive, accurately matching the real-time fault codes of the locomotive from a local knowledge base to obtain a first operation and maintenance text segment, vectorizing the user maintenance query information to perform similarity retrieval in a local vector library, obtaining a second operation and maintenance text segment based on the retrieval result, and generating fault maintenance information through a target large language model according to the user maintenance query information, the first operation and maintenance text segment and the second operation and maintenance text segment. The application adopts a double-path retrieval mode, improves the retrieval accuracy and coverage. The double-path retrieval is locally executed on a locomotive edge device, and wireless transmission between a ground data center and the locomotive edge device is not required, so that the operation and maintenance demand can be responded to in a low-delay and high-reliability manner in a weak network or no-network scene, and the real-time performance and stability of locomotive on-route fault maintenance are significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and in particular to a locomotive maintenance and repair method and related apparatus. Background Technology

[0002] As railway locomotives continue to develop towards higher speeds, greater intelligence, and heavier loads, the integration and complexity of key equipment such as the locomotive's electrical control system, running gear, and braking system are constantly increasing. Equipment operating conditions are dynamically changing, and faults exhibit randomness, suddenness, and coupling characteristics, placing stringent demands on the real-time, reliable, and localized nature of fault diagnosis and repair. If a locomotive experiences a sudden fault en route, and a solution cannot be quickly located and provided immediately, it can easily lead to speed reductions, delays, and partial stops, seriously endangering train operation safety and directly impacting railway transportation efficiency and operational safety.

[0003] Currently, locomotive fault diagnosis and maintenance mainly rely on the remote diagnosis mode of the ground center. That is, the locomotive edge equipment collects on-board sensor data and transmits it to the ground data center. The ground data center then feeds back the analyzed fault repair information to the fault repair personnel on the locomotive, who then repair the locomotive fault.

[0004] However, the way vehicle-mounted sensor data is transmitted to ground data centers is highly dependent on wireless communication. In areas with weak or no network, such as tunnels, mountains, and deserts, data transmission is prone to problems such as high latency, interruption, and packet loss, making it impossible to achieve real-time fault diagnosis at the second or even millisecond level and difficult to deal with emergency fault handling during locomotive operation. Summary of the Invention

[0005] In view of the above problems, this application provides a locomotive maintenance and repair method and related equipment to achieve real-time response to sudden faults during locomotive operation. The specific solution is as follows:

[0006] The first aspect of this application provides a locomotive maintenance and repair method, applied to locomotive peripheral equipment, including:

[0007] The system obtains user maintenance query information and locomotive real-time fault codes, which are obtained from the locomotive control system of the locomotive edge device.

[0008] The first maintenance text fragment is obtained by accurately matching the locomotive's real-time fault code with the local knowledge base.

[0009] The user maintenance query information is vectorized to perform similarity retrieval in a local vector library. Based on the retrieval results, a second maintenance text fragment is obtained. The local vector library is obtained by vectorizing the maintenance text fragments in the local knowledge base.

[0010] Based on the user's maintenance query information, the first maintenance text fragment, and the second maintenance text fragment, fault maintenance information is generated through the target large language model. The fault maintenance information includes the cause of the fault, suggested maintenance steps, and safety precautions.

[0011] In one possible implementation, the step of performing precise matching from a local knowledge base based on the locomotive's real-time fault code to obtain a first maintenance text fragment includes:

[0012] Using the locomotive's real-time fault code as a key, the corresponding maintenance text fragment is retrieved from the local knowledge base and used as the first maintenance text fragment.

[0013] And / or, determine the fault keywords corresponding to the locomotive's real-time fault code, and retrieve the maintenance text fragment containing the fault keywords from the local knowledge base as the first maintenance text fragment.

[0014] In one possible implementation, the step of generating fault repair information using a target large language model based on the user's maintenance query information, the first maintenance text fragment, and the second maintenance text fragment includes:

[0015] Based on the similarity between the maintenance text fragment and the user's maintenance query information, the maintenance text fragment with the most similar target number is selected from the first maintenance text fragment and the second maintenance text fragment as the target maintenance text fragment;

[0016] Obtain an operation and maintenance prompt instruction template, which includes a text filling slot and a query filling slot. The operation and maintenance prompt instruction template is used to instruct the target large language model to perform fault repair analysis based on the contents of the text filling slot and the query filling slot to obtain the fault repair information.

[0017] The target maintenance text fragment is filled into the text filling slot, and the user's maintenance query information is filled into the query filling slot to obtain the maintenance prompt instruction. This instruction is then input into the target large language model to obtain the fault repair information.

[0018] One possible implementation also includes:

[0019] Before inputting the maintenance and repair prompt into the target large language model, obtain the remaining memory value of the locomotive edge device;

[0020] If the remaining memory value is greater than the preset memory threshold, then any large language model in the first gradient among the multiple large language models deployed on the locomotive edge device will be used as the target large language model.

[0021] If the remaining memory value is less than or equal to the memory threshold, then any large language model in the second gradient among the plurality of large language models is taken as the target large language model, wherein the quantization bits of the large language model in the first gradient are greater than the quantization bits of the large language model in the second gradient.

[0022] In one possible implementation, the user maintenance query information is a user fault query voice command, and the vectorization of the user maintenance query information includes:

[0023] The voice wake-up engine identifies the fault wake-up word from the user's fault query voice command;

[0024] If the fault wake-up word is detected, the speech recognition model is invoked to perform speech recognition on the user's fault query voice command to obtain the text query statement;

[0025] The text query statement is vectorized by calling a text embedding model.

[0026] One possible implementation also includes:

[0027] The fault diagnosis information is synthesized into speech through an edge speech synthesis engine and output through the vehicle speaker.

[0028] And / or, output the fault diagnosis information to the vehicle-mounted maintenance display interface.

[0029] In one possible implementation, the operation and maintenance text fragments in the local knowledge base are obtained by text cleaning and semantic segmentation of operation and maintenance auxiliary materials, which include one or more of the following materials: locomotive equipment maintenance manuals, technical drawings, historical fault cases, maintenance records, and sensor alarm interpretation documents.

[0030] One possible implementation also includes:

[0031] The user's maintenance query information and the locomotive's real-time fault codes are used to generate fault phenomenon information;

[0032] Obtain solution information, which is derived from the fault repair information or a revised version of the fault repair information;

[0033] The fault phenomenon information and the solution information are combined into pairing data, and the pairing data is submitted for review to obtain the review result;

[0034] If the review result indicates that the pairing data has passed the review, the pairing data will be updated to the local knowledge base, and then updated to the local vector library after the pairing data has been vectorized.

[0035] A second aspect of this application provides a locomotive maintenance and repair device, applied to locomotive peripheral equipment, comprising:

[0036] The data acquisition module is used to acquire user maintenance query information and locomotive real-time fault codes, which are obtained from the locomotive control system of the locomotive edge device.

[0037] The first retrieval module is used to accurately match the locomotive's real-time fault code from the local knowledge base to obtain the first maintenance text fragment;

[0038] The second retrieval module is used to vectorize the user's maintenance query information for similarity retrieval in a local vector library, and obtain a second maintenance text fragment based on the retrieval results. The local vector library is obtained by vectorizing the maintenance text fragments in the local knowledge base.

[0039] The fault diagnosis module is used to generate fault diagnosis information based on the user's fault diagnosis query information, the first maintenance text fragment, and the second maintenance text fragment, using a target large language model. The fault diagnosis information includes the fault cause, suggested repair steps, and safety precautions.

[0040] A third aspect of this application provides a computer program product, including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement the locomotive operation and maintenance method described in the first aspect or any implementation thereof.

[0041] A fourth aspect of this application provides an electronic device, including at least one processor and a memory connected to the processor, wherein:

[0042] The memory is used to store computer programs;

[0043] The processor is used to execute the computer program so that the electronic device can implement the locomotive operation and maintenance method of the first aspect or any implementation thereof.

[0044] The fifth aspect of this application provides a computer storage medium carrying one or more computer programs, which, when executed by an electronic device, enable the electronic device to implement the locomotive operation and maintenance method described in the first aspect or any implementation thereof.

[0045] Using the above technical solution, the locomotive maintenance and repair method provided in this application can be applied to locomotive edge devices. To achieve real-time fault analysis, this application can simultaneously acquire the locomotive's real-time fault code while obtaining the user's maintenance query information. Then, it performs precise matching from a local knowledge base based on the locomotive's real-time fault code to obtain a first maintenance text fragment. Furthermore, it vectorizes the user's maintenance query information for similarity retrieval in a local vector library, obtaining a second maintenance text fragment based on the retrieval results. Finally, based on the user's maintenance query information, the first maintenance text fragment, and the second maintenance text fragment, it generates fault repair information using a target large language model. Therefore, this application employs a dual-path retrieval mode, ensuring both accurate acquisition of the maintenance text fragment corresponding to the fault code and semantic-level matching of natural language fault queries, thus improving retrieval accuracy and coverage. Meanwhile, the system performs accurate fault code matching and fault query vector similarity retrieval locally on the locomotive edge device, without relying on the ground data center and the locomotive edge device for wireless transmission. In weak network or no network scenarios such as tunnels, mountains, and Gobi deserts, it can still respond to maintenance needs with low latency and high reliability, significantly improving the real-time performance and stability of locomotive fault inspection on the road.

[0046] Furthermore, this application is built upon a shared local knowledge base and a local vector library, resulting in stronger data consistency, lower storage and retrieval overhead, and better suitability for resource-constrained scenarios at the locomotive's edge devices. It can stably achieve fully offline intelligent operation and maintenance reasoning. Generating fault diagnosis information directly through the target large language model avoids manual labor such as consulting manuals, resulting in higher intelligence, more convenient operation, and effectively improving locomotive fault handling efficiency and operational safety. Attached Figure Description

[0047] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic, and the originals and elements are not necessarily drawn to scale.

[0048] Figure 1 A flowchart illustrating a locomotive maintenance and repair method provided in this application;

[0049] Figure 2 A structural schematic diagram of a locomotive maintenance and repair device provided in this application;

[0050] Figure 3 This is a schematic diagram of the structure of an electronic device provided in this application. Detailed Implementation

[0051] The embodiments of this application are described below with reference to the accompanying drawings. The terminology used in the implementation section of this application is for explaining specific embodiments only and is not intended to limit the scope of this application.

[0052] The embodiments of this application will now be described with reference to the accompanying drawings. Those skilled in the art will recognize that, with technological advancements and the emergence of new scenarios, the technical solutions provided in the embodiments of this application are equally applicable to similar technical problems.

[0053] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms are interchangeable where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion, so that a process, method, system, product, or apparatus that comprises a series of elements is not necessarily limited to those elements, but may include other elements not explicitly listed or inherent to those processes, methods, products, or apparatuses.

[0054] As described in the background section, the current method of performing operational fault analysis via a ground data center heavily relies on wireless transmission between the ground data center and the locomotive edge equipment. In scenarios with weak or no network coverage, such as tunnels, mountainous areas, and deserts, abnormal data transmission may hinder real-time fault diagnosis at the second or even millisecond level, making it difficult to handle emergency faults during locomotive operation. To address this issue, this application provides a locomotive operation and maintenance method applicable to locomotive edge equipment. This method eliminates the need to transmit data to a ground data center, enabling more real-time operational fault analysis, and provides suggested maintenance procedures and safety precautions during the maintenance process.

[0055] Among them, locomotive edge equipment is a type of on-board equipment that is deployed in an integrated manner with the locomotive. More specifically, locomotive edge equipment refers to embedded hardware devices installed on the locomotive for on-board local real-time computing.

[0056] Optionally, the locomotive edge device can be implemented using the locomotive's onboard RK3588 chip.

[0057] Optionally, the locomotive operation and maintenance method provided in this application can be widely applied to the edge equipment of locomotives such as electric locomotives, diesel locomotives, EMUs, and urban rail transit vehicles. It can also be applied to offline operation and maintenance Q&A scenarios such as the digital maintenance work order system of locomotive depots and the mobile workstation for railway emergency rescue.

[0058] To enable those skilled in the art to better understand this application, the locomotive operation and maintenance method of this application will be described in detail below with reference to the accompanying drawings.

[0059] Reference Figure 1 , Figure 1 A flowchart illustrating a locomotive maintenance and repair method provided in this application embodiment is shown below. Figure 1 As shown, the locomotive maintenance and repair method may include:

[0060] Step S101: Obtain user maintenance query information and locomotive real-time fault codes. The locomotive real-time fault codes are obtained from the locomotive control system of the locomotive edge equipment.

[0061] Specifically, when a locomotive experiences a malfunction or abnormality en route, the user can input maintenance query information to inquire about the type of malfunction and the corresponding maintenance method. Here, the user's maintenance query information includes a description of the current malfunction. For example, the user's maintenance query information can be "How to deal with abnormal brake pressure", "Traction motor temperature is too high", "What is the cause of abnormal noise in the running gear", etc.

[0062] Those skilled in the art will understand that a locomotive control system is installed on the edge equipment of the locomotive. This locomotive control system is the core electronic control unit of the locomotive, responsible for collecting, monitoring, and managing the operating status of various locomotive systems, and generating and outputting real-time locomotive fault codes when abnormalities occur. Therefore, this embodiment can also acquire the real-time locomotive fault codes output by the locomotive control system.

[0063] For example, the locomotive edge equipment can reserve a sensor data interface to read real-time fault codes from the locomotive control system through the interface.

[0064] Step S102: Perform precise matching from the local knowledge base based on the locomotive's real-time fault codes to obtain the first maintenance text fragment.

[0065] It is understandable that locomotive real-time fault codes are standardized structured codes generated by the locomotive control system according to industry and equipment manufacturer preset rules. Each fault code corresponds to a unique fault type, fault location, and fault level, possessing strict uniqueness, determinism, and standardization, and there are no semantic ambiguities, polysemy, or near-equivalences. If fuzzy matching methods such as similarity retrieval are used, irrelevant or erroneous maintenance text fragments are easily introduced, leading to fault judgment deviations, and in severe cases, even affecting driving safety and the accuracy of maintenance procedures. To improve the accuracy and reliability of retrieval results, this embodiment can use an exact matching retrieval method for locomotive real-time fault codes, which can more directly and quickly locate the maintenance text fragment uniquely corresponding to the locomotive's real-time fault code.

[0066] The operation and maintenance text fragments in the local knowledge base are obtained by text cleaning and semantic segmentation of operation and maintenance auxiliary materials.

[0067] Optionally, a semantic segmentation strategy with pre-defined semantic coherence within blocks and semantic isolation between blocks can be adopted. At the same time, the block size can be set to 256-512 tokens, and the overlap between blocks can be 15-20%.

[0068] For example, in one possible implementation, semantic segmentation can be performed by a target large language model deployed on the locomotive edge device according to the above semantic segmentation strategy. The semantic segmentation strategy of semantic coherence within blocks and semantic isolation between blocks, the block size of 256-512 tokens, and the block overlap of 15-20% can be constrained in the prompt instruction template.

[0069] Optionally, the aforementioned maintenance and repair auxiliary materials may include one or more of the following materials: locomotive equipment maintenance manual, technical drawings, historical fault cases, maintenance records, and sensor alarm interpretation documents.

[0070] The locomotive equipment maintenance manual records the structural composition, working principle, routine maintenance procedures, troubleshooting methods, and maintenance specifications of each locomotive system, providing a standard operating procedure for fault handling. Technical drawings, including electrical schematics, piping layout diagrams, and mechanical assembly drawings, clarify equipment connections and physical structures, assisting in locating fault locations. Historical fault case studies record various fault phenomena and causes that have occurred during actual locomotive operation, providing reference solutions for similar new faults. Maintenance records document the content of each maintenance operation, information on replaced components, debugging parameters, and fault closure status, forming traceable maintenance data support. Sensor alarm interpretation documents provide a unified explanation of alarm signals, alarm codes, and alarm thresholds collected by various sensors, clarifying the meaning of alarms and corresponding handling requirements, enabling rapid correspondence between alarm information and maintenance strategies.

[0071] In this embodiment, there can be multiple ways to achieve precise matching. The following two methods are provided, but are not limited to them.

[0072] The first method involves storing each maintenance text fragment in the local knowledge base as key-value pairs, where the fault code is the key and the corresponding maintenance text fragment is the value. Therefore, upon obtaining the locomotive's real-time fault code, the locomotive's real-time fault code can be used as the key to retrieve the corresponding maintenance text fragment from the local knowledge base, which becomes the first maintenance text fragment.

[0073] The second approach: It is understood that each fault code corresponds to a unique fault keyword. For example, E102 corresponds to the fault keyword "traction motor overheating," and B015 corresponds to the fault keyword "low brake pressure." Therefore, this embodiment can determine the fault keyword corresponding to the locomotive's real-time fault code and retrieve the maintenance text fragment containing the fault keyword corresponding to the locomotive's real-time fault code from the local knowledge base, using it as the first maintenance text fragment.

[0074] Of course, there are other ways to implement it, which will not be specifically limited here.

[0075] Step S103: Vectorize the user's maintenance query information to perform similarity retrieval in the local vector library, and obtain the second maintenance text fragment based on the retrieval results.

[0076] The local vector library is obtained by vectorizing operation and maintenance text fragments in the local knowledge base.

[0077] In this embodiment, to reduce the hardware requirements of the locomotive edge devices, a similarity retrieval method can be used for user maintenance query information. Specifically, the maintenance text fragments in the local knowledge base are vectorized (optionally, a text embedding model can be used for vectorization) to form a local vector library. Then, the user maintenance query information is vectorized, and the similarity of the obtained query vector is calculated with each text vector in the local vector library. The several text vectors with the highest similarity to the query vector are found, and the maintenance text fragments corresponding to these text vectors are the second maintenance text fragments.

[0078] Optionally, the local vector library can be the LanceDB zero-dependency vector library. LanceDB is an open-source, lightweight vector database that supports local deployment, has high-performance vector retrieval capabilities, and is more suitable for the local offline operation and maintenance of locomotive edge devices. It can efficiently support users' similarity retrieval needs for maintenance query information.

[0079] Step S104: Based on the user's maintenance query information, the first maintenance text fragment, and the second maintenance text fragment, generate fault maintenance information through the target large language model.

[0080] To improve the accuracy of fault diagnosis and repair information, this embodiment deploys a target large language model on the locomotive edge device. This allows the target large language model to perform fault cause analysis and repair analysis based on user repair query information, the first maintenance text fragment, and the second maintenance text fragment, thereby obtaining fault diagnosis and repair information. Here, the fault diagnosis and repair information includes fault cause, repair procedure suggestions, and safety precautions.

[0081] Of course, fault diagnosis information may include other information, which will not be specifically limited here.

[0082] Optionally, the target large language model can be a large language model with a parameter size between 1.5B and 3B (Billion) after being quantized by GGUF (GGML General Use Format).

[0083] Optionally, the target large language model can run on the local NPU (Neural Processing Unit) or CPU (Central Processing Unit) big core of the locomotive edge device, without relying on the vehicle-to-ground wireless network.

[0084] The locomotive maintenance and repair method provided in this application can be applied to locomotive edge devices. To achieve real-time fault analysis, this application can simultaneously acquire locomotive real-time fault codes while obtaining user maintenance query information. Then, it performs precise matching from a local knowledge base based on the locomotive's real-time fault codes to obtain a first maintenance text fragment. Additionally, it vectorizes the user maintenance query information for similarity retrieval in a local vector library, obtaining a second maintenance text fragment based on the retrieval results. Finally, based on the user maintenance query information, the first maintenance text fragment, and the second maintenance text fragment, it generates fault repair information using a target large language model. Therefore, this application employs a dual-path retrieval mode, ensuring both accurate acquisition of the maintenance text fragment corresponding to the fault code and semantic-level matching of natural language fault queries, improving retrieval accuracy and coverage. Furthermore, by performing precise fault code matching and fault query vector similarity retrieval locally on the locomotive edge device, it eliminates the need for wireless transmission between a ground data center and the locomotive edge device. This allows for low-latency and high-reliability responses to maintenance needs even in weak or no-network scenarios such as tunnels, mountainous areas, and deserts, significantly improving the real-time performance and stability of locomotive fault repair in transit.

[0085] Furthermore, this application is built upon a shared local knowledge base and a local vector library, resulting in stronger data consistency, lower storage and retrieval overhead, and better suitability for resource-constrained scenarios at the locomotive's edge devices. It can stably achieve fully offline intelligent operation and maintenance reasoning. Generating fault diagnosis information directly through the target large language model avoids manual labor such as consulting manuals, resulting in higher intelligence, more convenient operation, and effectively improving locomotive fault handling efficiency and operational safety.

[0086] The following embodiment describes the process of step S104 above, "generating fault repair information through a target large language model based on user repair query information, the first maintenance text fragment, and the second maintenance text fragment."

[0087] In this embodiment, considering that the number of first and second maintenance text fragments may be large, in order to improve the efficiency of fault diagnosis and analysis, in one possible implementation, this embodiment can select the maintenance text fragment with the most similar target number from the first and second maintenance text fragments based on the similarity between the maintenance text fragment and the user's maintenance query information, and use it as the target maintenance text fragment.

[0088] For example, assuming the number of targets is 5 (preferably 3-5), and there are a total of 20 first and second maintenance text fragments, the 5 maintenance text fragments that are most similar to the user's maintenance query information can be selected and recorded as the target maintenance text fragments; as another example, if there are a total of 4 first and second maintenance text fragments, no selection is required and these 4 maintenance text fragments can be directly used as the target maintenance text fragments.

[0089] Based on this, this embodiment can further improve the standardization of output and the efficiency of reasoning by using prompt words in an engineered manner.

[0090] In other words, this embodiment can obtain an operation and maintenance (O&M) prompt instruction template. This O&M prompt instruction template includes a text filling slot and a query filling slot. The O&M prompt instruction template is used to instruct the target large language model to perform fault diagnosis and repair analysis based on the content in the text filling slot and the query filling slot to obtain fault diagnosis and repair information. Then, the target O&M text fragment can be filled into the text filling slot, and the user's diagnosis and repair query information can be filled into the query filling slot to obtain the O&M prompt instruction prompt. This prompt instruction is then input into the target large language model to obtain the fault diagnosis and repair information.

[0091] This application effectively reduces the interference of redundant information on model inference by filtering the number of target operation and maintenance text fragments based on similarity and constructing prompts using standardized prompt instruction templates. This allows the target large language model to focus on core reference content and actual user queries, resulting in more standardized, clearer, and more targeted fault diagnosis and repair information output, while also improving inference speed and result reliability.

[0092] In some embodiments of this application, considering that the target large language model requires a large amount of running memory for fault diagnosis and analysis, the locomotive edge device with limited resources may be unable to maintain normal locomotive operation due to insufficient memory.

[0093] To adapt to scenarios where locomotive edge device resources change dynamically and to minimize memory usage during fault diagnosis and analysis, this embodiment can deploy multiple large language models on the locomotive edge device and then select the optimal large language model based on the actual memory situation.

[0094] In other words, this embodiment can obtain the remaining memory value of the locomotive edge device before inputting the operation and maintenance prompt instruction into the target large language model, and then determine the target large language model from multiple pre-deployed large language models based on the remaining memory value.

[0095] Optionally, the process of "determining the target large language model from multiple pre-deployed large language models based on the remaining memory value" may include: comparing the remaining memory value with a preset memory threshold; if the remaining memory value is greater than the memory threshold, it indicates that the current device resources are sufficient, and then any large language model in the first tier from multiple large language models is selected as the target large language model; conversely, if the remaining memory value is less than or equal to the memory threshold, it indicates that the current device resources are tight, and then any large language model in the second tier from multiple large language models is selected as the target large language model.

[0096] In this embodiment, the quantization bits of the large language model in the first gradient are greater than those of the large language model in the second gradient. That is, in this embodiment, the large language model in the first gradient uses higher quantization bits, resulting in higher inference accuracy, but also requiring more memory; the large language model in the second gradient uses lower quantization bits, consuming less memory resources and running faster, thus ensuring the stable execution of the fault diagnosis process even in resource-constrained scenarios.

[0097] This embodiment dynamically selects large language models with different quantization gradients based on the remaining memory value of the locomotive edge device. When device resources are sufficient, a high-quantization bit model can be used to ensure inference accuracy, while automatically switching to a low-quantization bit model when resources are scarce to ensure smooth operation. This achieves a dynamic balance between inference performance and hardware resource consumption, significantly improving the environmental adaptability and operational stability of the method in this application on the locomotive edge device.

[0098] In some other embodiments of this application, the user maintenance query information in step S101 above may be in the form of text input by the user.

[0099] In a preferred implementation, the user's troubleshooting information can be a voice command for troubleshooting. It is understood that voice commands cannot be directly vectorized and need to be converted into text content.

[0100] Based on this, optionally, step S103, which vectorizes the user's maintenance query information, may include: identifying fault wake-up words from the user's fault query voice command through a voice wake-up engine; if a fault wake-up word is identified, calling a voice recognition model to perform voice recognition on the user's fault query voice command to obtain a text query statement; and calling a text embedding model to vectorize the text query statement.

[0101] For example, the voice wake-up engine deployed on the edge device of the locomotive can continuously monitor audio input. When it collects the user's fault query voice command from the fault maintenance personnel in real time, it can identify the preset fault wake-up word from the user's fault query voice command (for example, a fault wake-up word lexicon can be built in advance). The fault wake-up word here can be the same as or different from the fault keywords mentioned above.

[0102] If the fault wake-up word is successfully identified, the in-vehicle voice recognition model is automatically invoked to recognize the user's fault query voice command, converting the voice query content into a text query statement; then, the text query statement is converted into a corresponding query vector through a text embedding model, so as to carry out similarity retrieval in the local vector library.

[0103] Optionally, the aforementioned voice wake-up engine can be a lightweight voice wake-up engine, and the speech recognition model and text embedding model can also be lightweight models.

[0104] For example, the speech recognition model can be an embedded ARM (Advanced RISC Machine) optimized version of Whisper or FunASR Paraformer-zh model, and the text embedding model can be an embedding model quantized with INT8 (8-bit Integer), with an inference latency of less than 50ms on the ARM architecture NPU.

[0105] Optionally, the speech recognition model and text embedding model can also run on the local NPU or CPU core of the locomotive edge device.

[0106] This embodiment realizes voice query vectorization through voice wake-up, voice recognition and text embedding process, which supports fault maintenance personnel to initiate fault queries by voice in scenarios where it is inconvenient to manually input, such as driving and inspection. The operation is more convenient and the response is faster, further improving the real-time and ease of use of locomotive fault handling in transit.

[0107] After obtaining fault diagnosis information, to facilitate quick access to the information by on-site fault repair personnel, this embodiment can also input the fault diagnosis information into an edge speech synthesis (Text-to-Speech, TTS) engine to convert the text-based fault diagnosis information into speech information, which is then broadcast through the vehicle's speakers to achieve intelligent voice-based Q&A. Simultaneously, the fault diagnosis information can also be visualized and output to the vehicle's maintenance display interface in text, list, or other formats, intuitively showing the cause of the fault, repair steps, and safety precautions.

[0108] Optionally, the edge TTS engine can be a lightweight edge TTS engine.

[0109] Optionally, fault diagnosis information can also be stored in a local maintenance log database.

[0110] This embodiment broadcasts fault repair information via voice synthesis and displays it synchronously on the maintenance interface, enabling multi-channel and visual information output. This allows fault repair personnel to quickly obtain key information in complex operating environments, eliminating the need for manuals or typing. This better aligns with the actual working conditions of locomotive maintenance and improves the efficiency of fault diagnosis and handling, as well as operational safety.

[0111] In summary, this application deploys the local knowledge base, local vector library, large language model inference, and voice interaction across the entire chain on the locomotive edge device, completely eliminating the dependence on ground data centers and wireless networks, and still providing stable, low-latency diagnostic services in tunnels, mountainous areas, and areas without network coverage.

[0112] In another possible implementation, in order to achieve continuous iteration and optimization of the local knowledge base and the local vector library, this embodiment also supports an online update and expansion mechanism. Specifically, this embodiment can generate fault phenomenon information based on user maintenance query information and locomotive real-time fault codes, obtain solution information, which is obtained from fault maintenance information or a modified version of fault maintenance information. The fault phenomenon information and solution information are combined into paired data, and the paired data is submitted for review to obtain the review result. If the review result indicates that the paired data has passed the review, the paired data is updated to the local knowledge base, and after vectorizing the paired data, it is updated to the local vector library.

[0113] In other words, this embodiment can combine the user's maintenance query information with the locomotive's real-time fault codes to form fault phenomenon information when the fault maintenance personnel confirm the validity of the diagnosis or correct the fault maintenance information output by the model. The fault maintenance information output by the model, or the more accurate solution corrected by the fault maintenance personnel, is used as solution information. The fault phenomenon information and solution information are paired data, and this paired data is uploaded to the backend for manual review. If the review result is approved, the paired data is updated to the local knowledge base as new maintenance content. Simultaneously, the new content is vectorized and updated to the local vector library, achieving a closed-loop iterative evolution between the vehicle-mounted knowledge base and the vector library.

[0114] In this embodiment, by pairing fault phenomena with solutions and updating the data to the local knowledge base and vector library after review, continuous accumulation and iterative optimization of operation and maintenance knowledge can be achieved. This enables the system to continuously expand the fault coverage and improve the accuracy of retrieval and reasoning in actual use, forming a self-optimizing offline intelligent operation and maintenance capability.

[0115] In another possible implementation, considering that the application scheme requires a large amount of memory to call the large language model, in order to avoid continuing to use the application when memory is insufficient and thus failing to obtain fault repair information in a timely manner, this embodiment can also obtain the remaining memory value of the locomotive edge device in real time after obtaining the user's repair query information in step S101. If the remaining memory value cannot support the normal operation of the target large language model, it will fall back to the fault tree question and answer mode based on keyword retrieval.

[0116] Here, the fault tree question-and-answer model based on keyword retrieval requires the pre-construction of a fault question-and-answer template library. This library stores fault question-and-answer templates corresponding to multiple keywords, each containing the necessary troubleshooting information for resolving the corresponding fault. Following the process described earlier, fault wake-up words can be identified from user troubleshooting queries, used as keywords, and the corresponding fault question-and-answer templates can be retrieved from the fault question-and-answer template library to obtain the fault troubleshooting information.

[0117] Because the fault question-and-answer template library covers a limited number of fault types, it can only be used as a second-best solution when the remaining memory is insufficient to support the normal operation of the target large language model. Compared to this second-best solution, the locomotive operation and maintenance method that calls the target large language model mentioned above can be deployed without a large number of historical fault samples, making it more suitable for high-value locomotive edge devices where fault samples are scarce.

[0118] The above describes a locomotive operation and maintenance method provided by the embodiments of this application. The following will describe the apparatus for performing the above locomotive operation and maintenance method.

[0119] Please see Figure 2 , Figure 2 This is a schematic diagram of the structure of a locomotive maintenance and repair device provided in an embodiment of this application. Figure 2 As shown, the locomotive maintenance and repair device may include:

[0120] Data acquisition module 201 is used to acquire user maintenance query information and locomotive real-time fault codes. The locomotive real-time fault codes are obtained from the locomotive control system of the locomotive edge equipment.

[0121] The first retrieval module 202 is used to accurately match the locomotive's real-time fault codes from the local knowledge base to obtain the first maintenance text fragment;

[0122] The second retrieval module 203 is used to vectorize the user's maintenance query information for similarity retrieval in the local vector library, and obtain the second maintenance text fragment based on the retrieval results. The local vector library is obtained by vectorizing the maintenance text fragment in the local knowledge base.

[0123] The fault diagnosis module 204 is used to generate fault diagnosis information based on the user's fault diagnosis query information, the first maintenance text fragment, and the second maintenance text fragment through the target large language model. The fault diagnosis information includes the fault cause, suggested repair steps, and safety precautions.

[0124] Each module in the aforementioned locomotive maintenance and repair device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the corresponding operations of each module.

[0125] This application also provides an electronic device, which may include at least one processor and a memory connected to the processor, wherein:

[0126] Memory is used to store computer programs;

[0127] The processor is used to execute computer programs so that the electronic device can implement any of the locomotive operation and maintenance methods provided in the embodiments of this application.

[0128] refer to Figure 3 The diagram illustrates a structural schematic suitable for implementing the electronic device in the embodiments of this application. The electronic device in the embodiments of this application may include, but is not limited to, fixed terminals such as mobile phones, laptops, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Figure 3 The electronic device shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0129] like Figure 3 As shown, the electronic device may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage device 608 into a random access memory (RAM) 603. When the electronic device is powered on, the RAM 603 also stores various programs and data required for the operation of the electronic device. The processing unit 601, ROM 602, and RAM 603 are interconnected via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0130] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, memory cards, hard drives, etc.; and communication devices 609. Communication device 609 allows electronic devices to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 3 Electronic devices with various devices are shown, but it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0131] This application also provides a computer program product including computer-readable instructions, which, when executed on an electronic device, cause the electronic device to implement any of the locomotive operation and maintenance methods provided in this application.

[0132] This application also provides a computer-readable storage medium that carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any of the locomotive operation and maintenance methods provided in this application.

[0133] It should also be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. In addition, in the device embodiment drawings provided in this application, the connection relationship between modules indicates that they have a communication connection, which can be implemented as one or more communication buses or signal lines.

[0134] Through the above description of the embodiments, those skilled in the art can clearly understand that this application can be implemented by means of software plus necessary general-purpose hardware, or it can be implemented by special-purpose hardware including application-specific integrated circuits, special-purpose CPUs, special-purpose memory, special-purpose components, etc. Generally, any function performed by a computer program can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be diverse, such as analog circuits, digital circuits, or special-purpose circuits. However, for this application, software program implementation is more often the preferred implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a readable storage medium, such as a computer floppy disk, USB flash drive, mobile hard disk, ROM, RAM, magnetic disk, or optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, training equipment, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0135] In the above embodiments, the implementation can be achieved, in whole or in part, through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented, in whole or in part, in the form of a computer program product.

[0136] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from one website, computer, training device, or data center to another website, computer, training device, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state drives (SSDs)).

Claims

1. A method of locomotive service and repair, characterized by, Applications in locomotive edge devices include: The system obtains user maintenance query information and locomotive real-time fault codes, which are obtained from the locomotive control system of the locomotive edge device. The first maintenance text fragment is obtained by accurately matching the locomotive's real-time fault code with the local knowledge base. The user maintenance query information is vectorized to perform similarity retrieval in a local vector library. Based on the retrieval results, a second maintenance text fragment is obtained. The local vector library is obtained by vectorizing the maintenance text fragments in the local knowledge base. Based on the user's maintenance query information, the first maintenance text fragment, and the second maintenance text fragment, fault maintenance information is generated through the target large language model. The fault maintenance information includes the cause of the fault, suggested maintenance steps, and safety precautions.

2. The locomotive service method of claim 1, wherein, The first maintenance text fragment is obtained by accurately matching the locomotive's real-time fault code from the local knowledge base, including: Using the locomotive's real-time fault code as a key, the corresponding maintenance text fragment is retrieved from the local knowledge base and used as the first maintenance text fragment. And / or, determine the fault keywords corresponding to the locomotive's real-time fault code, and retrieve the maintenance text fragment containing the fault keywords from the local knowledge base as the first maintenance text fragment.

3. The locomotive service method of claim 1, wherein, The step of generating fault repair information based on the user's maintenance query information, the first maintenance text fragment, and the second maintenance text fragment using a target large language model includes: Based on the similarity between the maintenance text fragment and the user's maintenance query information, the maintenance text fragment with the most similar target number is selected from the first maintenance text fragment and the second maintenance text fragment as the target maintenance text fragment; Obtain an operation and maintenance prompt instruction template, which includes a text filling slot and a query filling slot. The operation and maintenance prompt instruction template is used to instruct the target large language model to perform fault repair analysis based on the contents of the text filling slot and the query filling slot to obtain the fault repair information. The target maintenance text fragment is filled into the text filling slot, and the user's maintenance query information is filled into the query filling slot to obtain the maintenance prompt instruction. This instruction is then input into the target large language model to obtain the fault repair information.

4. The locomotive maintenance and repair method according to claim 3, characterized in that, Also includes: Before inputting the maintenance and repair prompt into the target large language model, obtain the remaining memory value of the locomotive edge device; If the remaining memory value is greater than the preset memory threshold, then any large language model in the first gradient among the multiple large language models deployed on the locomotive edge device will be used as the target large language model. If the remaining memory value is less than or equal to the memory threshold, then any large language model in the second gradient among the plurality of large language models is taken as the target large language model, wherein the quantization bits of the large language model in the first gradient are greater than the quantization bits of the large language model in the second gradient.

5. The locomotive maintenance and repair method according to claim 1, characterized in that, The user's maintenance query information is a user's fault query voice command. The step of vectorizing the user's maintenance query information includes: The voice wake-up engine identifies the fault wake-up word from the user's fault query voice command; If the fault wake-up word is detected, the speech recognition model is invoked to perform speech recognition on the user's fault query voice command to obtain the text query statement; The text query statement is vectorized by calling a text embedding model.

6. The locomotive maintenance and repair method according to claim 5, characterized in that, Also includes: The fault diagnosis information is synthesized into speech through an edge speech synthesis engine and output through the vehicle speaker. And / or, output the fault diagnosis information to the vehicle-mounted maintenance display interface.

7. The locomotive maintenance and repair method according to any one of claims 1-6, characterized in that, The operation and maintenance text fragments in the local knowledge base are obtained by text cleaning and semantic segmentation of operation and maintenance auxiliary materials. The operation and maintenance auxiliary materials include one or more of the following materials: locomotive equipment maintenance manual, technical drawings, historical fault cases, maintenance records and sensor alarm interpretation documents.

8. The locomotive maintenance and repair method according to any one of claims 1-6, characterized in that, Also includes: The user's maintenance query information and the locomotive's real-time fault codes are used to generate fault phenomenon information; Obtain solution information, which is derived from the fault repair information or a revised version of the fault repair information; The fault phenomenon information and the solution information are combined into pairing data, and the pairing data is submitted for review to obtain the review result; If the review result indicates that the pairing data has passed the review, the pairing data will be updated to the local knowledge base, and then updated to the local vector library after the pairing data has been vectorized.

9. A locomotive maintenance and repair device, characterized in that, Applications in locomotive edge devices include: The data acquisition module is used to acquire user maintenance query information and locomotive real-time fault codes, which are obtained from the locomotive control system of the locomotive edge device. The first retrieval module is used to accurately match the locomotive's real-time fault code from the local knowledge base to obtain the first maintenance text fragment; The second retrieval module is used to vectorize the user's maintenance query information for similarity retrieval in a local vector library, and obtain a second maintenance text fragment based on the retrieval results. The local vector library is obtained by vectorizing the maintenance text fragments in the local knowledge base. The fault diagnosis module is used to generate fault diagnosis information based on the user's fault diagnosis query information, the first maintenance text fragment, and the second maintenance text fragment, using a target large language model. The fault diagnosis information includes the fault cause, suggested repair steps, and safety precautions.

10. An electronic device, characterized in that, It includes at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the locomotive operation and maintenance method as described in any one of claims 1 to 8.