Agricultural machinery fault classification method and device, electronic equipment and readable storage medium

By constructing a vector database of agricultural machinery faults using a large language model, and by querying and clustering fault description vectors and related data, the problem of accuracy in agricultural machinery fault classification is solved, and high-precision fault classification that can quickly adapt to changes in agricultural machinery models and environment is achieved.

CN119179928BActive Publication Date: 2026-08-25LOVOL HEAVY IND CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411250034.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2026-08-25
Estimated Expiration
2044-09-06

AI Technical Summary

Technical Problem

Existing agricultural machinery fault classification methods require a large amount of fault data for training of neural network algorithm models, which cannot quickly adapt to changes in agricultural machinery models and operating environments. This results in a large deviation between the classification results and the actual types of agricultural machinery faults, leading to low accuracy.

Method used

A large language model is used to process fault description data. By constructing an agricultural machinery fault vector database, fault description vectors and related data are used for querying. Combined with preset similarity thresholds and data clustering algorithms, the classification of agricultural machinery faults is determined.

Benefits of technology

This improves the accuracy of agricultural machinery fault classification, making it consistent with the fault descriptions and usage scenarios, thus enhancing the precision of fault classification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119179928B_ABST
    Figure CN119179928B_ABST
Patent Text Reader

Abstract

The application provides a kind of agricultural machinery fault classification method, device, electronic equipment and readable storage medium, obtain the first fault description data and first fault related data of target fault agricultural machinery;Determine the first fault description vector of first fault description data based on first fault description data, large language model and preset model prompt word;Based on the first fault description vector and the first fault related data, a plurality of target candidate records are obtained by inquiring from the agricultural machinery fault vector database;Based on the similarity of the fault description vector corresponding to each target candidate record and the first fault description vector, fault classification vector and preset data clustering algorithm, determine the fault classification of target fault agricultural machinery.This way, based on the large language model processing fault description data, and by querying the agricultural machinery fault vector database based on the large language model, the agricultural machinery fault classification that both meets the agricultural machinery fault description and meets the agricultural machinery use scene is obtained, the accuracy of agricultural machinery fault classification is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, electronic device and readable storage medium for classifying agricultural machinery faults. Background Technology

[0002] With the increasing mechanization of agricultural machinery, a large number of agricultural machines are engaged in various types of agricultural operations in different regions and environments during the busy farming season. Inevitably, different types of malfunctions will occur during these operations, affecting the normal operation of the machinery to varying degrees. The ability to quickly classify agricultural machinery malfunctions based on the operator's description of the symptoms has become a crucial factor in shortening the repair time.

[0003] Existing agricultural machinery fault classification typically employs neural network algorithms. This involves collecting historical data on agricultural machinery faults and classifications, building a multi-layered algorithm model to train a logical relationship between fault descriptions and classifications, and then inputting new fault descriptions into the algorithm model to obtain corresponding fault classification suggestions. However, due to frequent updates and replacements of agricultural machinery products and diverse operating environments, agricultural machinery fault classifications can change significantly with different machinery models, operating environments, and other usage scenarios. Since neural network algorithms require a large amount of fault data for training, they cannot be trained and updated in a timely manner to keep up with rapid changes in machinery models and operating environments. This results in a significant deviation between the fault classification results and the actual fault types, leading to low accuracy in agricultural machinery fault classification. Summary of the Invention

[0004] In view of this, embodiments of this application provide at least one agricultural machinery fault classification method, device, electronic device, and readable storage medium. The fault description data is processed based on a large language model, and by querying an agricultural machinery fault vector database constructed based on the large language model, an agricultural machinery fault classification that conforms to both the agricultural machinery fault description and the agricultural machinery usage scenario is obtained, thereby improving the accuracy of agricultural machinery fault classification.

[0005] This application mainly includes the following aspects:

[0006] In a first aspect, embodiments of this application provide a method for classifying agricultural machinery faults, the method comprising:

[0007] Obtain first fault description data and first fault-related data of the target faulty agricultural machinery; the first fault-related data includes the faulty agricultural machinery type data, fault location data, and fault time data of the target faulty agricultural machinery;

[0008] Based on the first fault description data, the large language model, and the preset model prompt words, determine the first fault description vector of the first fault description data;

[0009] Based on the first fault description vector and the first fault-related data, multiple target candidate records are obtained by querying the agricultural machinery fault vector database; each record in the agricultural machinery fault vector database stores agricultural machinery fault classification vector data model data determined based on the second fault description data, the second fault-related data, and the fault classification data of historical faulty agricultural machinery; the target candidate record is a record whose corresponding fault-related data is the same as or similar to the first fault-related data, and whose corresponding fault description vector has a similarity to the first fault description vector greater than or equal to a preset similarity threshold.

[0010] Based on the similarity between the fault description vector corresponding to each of the target candidate records and the first fault description vector, the fault classification vector corresponding to each of the target candidate records, and a preset data clustering algorithm, the fault classification of the target faulty agricultural machinery is determined.

[0011] Secondly, embodiments of this application also provide an agricultural machinery fault classification device, the agricultural machinery fault classification device comprising:

[0012] The acquisition module is used to acquire first fault description data and first fault-related data of the target faulty agricultural machinery; the first fault-related data includes the faulty agricultural machinery type data, fault location data, and fault time data of the target faulty agricultural machinery.

[0013] The first determining module is used to determine the first fault description vector of the first fault description data based on the first fault description data, the large language model, and the preset model prompt words;

[0014] The hybrid query module is used to query multiple target candidate records from the agricultural machinery fault vector database based on the first fault description vector and the first fault-related data. Each record in the agricultural machinery fault vector database stores agricultural machinery fault classification vector data model data determined based on the second fault description data, the second fault-related data, and the fault classification data of historical faulty agricultural machinery. The target candidate record is a record whose corresponding fault-related data is the same as or similar to the first fault-related data, and whose corresponding fault description vector has a similarity to the first fault description vector greater than or equal to a preset similarity threshold.

[0015] The second determining module is used to determine the fault classification of the target faulty agricultural machinery based on the similarity between the fault description vector corresponding to each of the target candidate records and the first fault description vector, the fault classification vector corresponding to each of the target candidate records, and a preset data clustering algorithm.

[0016] Thirdly, embodiments of this application also provide an electronic device, including: a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory through the bus, and the machine-readable instructions are executed by the processor to perform the steps of the agricultural machinery fault classification method as described above.

[0017] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the agricultural machinery fault classification method as described above.

[0018] This application provides a method, apparatus, electronic device, and readable storage medium for classifying agricultural machinery faults. The method acquires first fault description data and first fault-related data of a target faulty agricultural machinery. The first fault-related data includes fault type data, fault location data, and fault time data of the target faulty agricultural machinery. Based on the first fault description data, a large language model, and preset model prompts, a first fault description vector of the first fault description data is determined. Based on the first fault description vector and the first fault-related data, multiple target candidate records are obtained by querying an agricultural machinery fault vector database. Each record in the agricultural machinery fault vector database stores agricultural machinery fault classification vector data model data determined based on second fault description data, second fault-related data, and fault classification data of historical faulty agricultural machinery. Target candidate records are those whose corresponding fault-related data is the same as or similar to the first fault-related data, and whose corresponding fault description vector has a similarity to the first fault description vector greater than or equal to a preset similarity threshold. Based on the similarity between the fault description vectors corresponding to each target candidate record and the first fault description vector, the fault classification vectors corresponding to each target candidate record, and a preset data clustering algorithm, the fault classification of the target faulty agricultural machinery is determined. In this way, by processing fault description data based on a large language model and querying the agricultural machinery fault vector database built based on the large language model, agricultural machinery fault classifications that conform to both the agricultural machinery fault description and the agricultural machinery usage scenario are obtained, thus improving the accuracy of agricultural machinery fault classification.

[0019] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description

[0020] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of this application and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.

[0021] Figure 1 A flowchart of a method for classifying agricultural machinery faults provided in an embodiment of this application is shown;

[0022] Figure 2 This document illustrates a flowchart of the process for constructing an agricultural machinery fault vector database, as provided in an embodiment of this application.

[0023] Figure 3 This illustration shows one of the functional block diagrams of an agricultural machinery fault classification device provided in an embodiment of this application;

[0024] Figure 4 This is a second functional block diagram of an agricultural machinery fault classification device provided in an embodiment of this application;

[0025] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of this application is shown. Detailed Implementation

[0026] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely represents selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0027] The following is a detailed description of an agricultural machinery fault classification method provided in the embodiments of this application. Please refer to... Figure 1 , Figure 1 This is a flowchart illustrating a method for classifying agricultural machinery faults provided in an embodiment of this application. Figure 1 As shown, the method includes:

[0028] S101, acquire the first fault description data and the first fault-related data of the target faulty agricultural machine; the first fault-related data includes the faulty agricultural machine type data, fault location data and fault time data of the target faulty agricultural machine.

[0029] In this embodiment, the original fault data of the target faulty agricultural machine, recorded and uploaded by customer service personnel based on the description of the agricultural machine operator, is first obtained. This data includes fault description data and fault-related data. The fault description data is the agricultural machine operator's description of the faulty phenomenon, while the fault-related data is the agricultural machine usage scenario information of the target faulty agricultural machine, which is obtained synchronously. This includes data on the type of agricultural machine that is faulty, the location of the fault, and the time of the fault, such as the agricultural machine product line, agricultural machine platform, time of the fault, and province of the fault.

[0030] S102, based on the first fault description data, the large language model, and the preset model prompt words, determine the first fault description vector of the first fault description data.

[0031] In this embodiment, after obtaining the fault description data, the logical reasoning ability, keyword-based text generation ability, and text vectorization ability of the Large Language Model (LLM) are utilized to construct vector data of the fault description using customized preset model prompts. Specifically, the LLM in this embodiment uses the Tongyi Qianwen model; other LLM models can also achieve the functionality of this application, and no specific limitations are imposed here.

[0032] S103, based on the first fault description vector and the first fault-related data, multiple target candidate records are obtained by querying the agricultural machinery fault vector database; each record in the agricultural machinery fault vector database stores agricultural machinery fault classification vector data model data determined based on the second fault description data, the second fault-related data, and the fault classification data of historical faulty agricultural machinery; the target candidate record is a record whose corresponding fault-related data is the same as or similar to the first fault-related data, and whose corresponding fault description vector has a similarity to the first fault description vector greater than or equal to a preset similarity threshold.

[0033] In this embodiment, a hybrid query is performed in the agricultural machinery fault vector database based on two query conditions: fault description vector and fault-related data. The query data is then filtered, and records whose corresponding fault-related data is the same as or similar to the first fault-related data, and whose corresponding fault description vector has a similarity to the first fault description vector greater than or equal to a preset similarity threshold, are selected as candidate records for agricultural machinery fault classification that conform to both the agricultural machinery fault description and the agricultural machinery usage scenario. Each record in the agricultural machinery fault vector database stores fault description data, fault-related data, and fault classification data based on collected historical faulty agricultural machinery. Large language modeling technology is used to construct fault classification vector data models for agricultural machinery fault description and fault classification in real time.

[0034] S104, based on the similarity between the fault description vector corresponding to each of the target candidate records and the first fault description vector, the fault classification vector corresponding to each of the target candidate records, and a preset data clustering algorithm, the fault classification of the target faulty agricultural machinery is determined.

[0035] In this embodiment of the application, since the mixed query of the agricultural machinery fault vector database returns multiple target candidate records, in order to further improve the accuracy of the fault classification results, the target candidate records are reordered based on the similarity between the fault description vector corresponding to each target candidate record and the first fault description vector, the fault classification vector corresponding to each target candidate record, and the preset data clustering algorithm, so as to determine the fault classification of the target faulty agricultural machinery.

[0036] Furthermore, after acquiring the first fault description data and the first fault-related data of the target faulty agricultural machinery, the method further includes:

[0037] The first fault description data is preprocessed based on preset data processing rules.

[0038] In this embodiment, since the fault description data of agricultural machinery malfunctions is mostly verbally described by the operators and manually recorded by customer service personnel, the fault description data lacks a unified standard and format, requiring unified data cleaning. Specifically, the fault description data is preprocessed based on preset data processing rules, which include, but are not limited to: normalizing English capitalization, normalizing numbers, normalizing symbols, correcting typos, and filtering operational-specific identifiers such as marketing activities that are unrelated to the fault description.

[0039] Further, please refer to Figure 2 , Figure 2 This is a flowchart illustrating the construction of an agricultural machinery fault vector database as provided in an embodiment of this application. Figure 2As shown, prior to S101, the agricultural machinery fault vector database is constructed according to the following steps:

[0040] S201, Obtain the second fault description data, second fault related data, and fault classification data of historical agricultural machinery failures.

[0041] In this embodiment of the application, during the construction of the agricultural machinery fault vector database, fault description data, fault-related data, and fault classification data of historical faulty agricultural machinery are collected in real time. The descriptions of the fault description data and fault-related data are the same as those in S101 and will not be repeated here; the fault classification data are the determined agricultural machinery fault classifications of the historical faulty agricultural machinery.

[0042] S202, the second fault description data and the preset model prompt words are input into the large language model, so that the large language model outputs the fault component name and fault phenomenon name in the second fault description data according to the preset model prompt words; the preset model prompt words include role setting information, fault component and fault phenomenon extraction description information, and fault component and fault phenomenon extraction case information.

[0043] In this embodiment, the logical reasoning capability of a large language model is utilized to identify the name of the faulty component and the corresponding faulty phenomenon in the description of agricultural machinery faults by using preset model prompt words extracted from customized faulty components and fault phenomena.

[0044] For example:

[0045] Fault Description Data: The customer reported that the grain auger had no sensor and the vibrating screen was making abnormal noises. On-site inspection revealed that the blocked sensor was malfunctioning and the screen box drive assembly was worn and could not be used normally.

[0046] Extracted faulty component names and fault phenomenon names: Grain auger, blocked; Sensor, malfunction.

[0047] Fault description data: During the busy farming season in 2022, users of the 7G model reported grain spillage, caused by uneven airflow from the blower. Communication with the technical department suggested replacing the impeller with an 8-blade unit.

[0048] The extracted faulty component name and fault phenomenon name are: fan, grain leakage.

[0049] The role of the model prompt is to provide the large language model with contextual information about the input and the model's parameters. When training supervised or unsupervised learning models, the prompt helps the model better understand the intent of the input and respond accordingly. Furthermore, the prompt improves the interpretability and accessibility of the model, providing a "hint" or "guide" to help the large language model better understand and complete the task. In this embodiment, the model prompt includes three parts: role setting information, descriptions of faulty components and fault phenomena, and case information for extracting faulty components and fault phenomena. Specifically, examples of preset model prompts are illustrated below:

[0050] Let's begin with an example:

[0051] "prompt_template":

[0052] "You are a research and development engineer familiar with vehicle structure and components. Please identify the faulty components and symptoms based on the fault description to quickly troubleshoot the problem."

[0053] Please note: 1) The faulty component may consist of pure Chinese characters or a combination of Chinese characters and English letters and numbers. 2) Please strictly follow the output format: "Faulty Component: XX\\nFault Phenomenon: XX\". If it cannot be recognized, please output "Faulty Component: None" or "Fault Phenomenon: None".

[0054] Reference case:\n;

[0055] Example 1:\n;

[0056] Fault description: "The 3HBJ1840 coupling belt is severely worn."

[0057] Faulty component: Band 3HBJ1840;

[0058] Fault symptom: Wear and tear;

[0059] Example 2:\n;

[0060] Fault description: "The belts of augers No. 1 and No. 2 are broken"

[0061] Faulty components: No. 1 auger belt, No. 2 auger belt;

[0062] Fault symptom: breakage\n;

[0063] Example 3:\n;

[0064] Fault description: "Wearing of front and rear guide rails"

[0065] Faulty components: front guide rail, rear guide rail;

[0066] Fault symptom: Wear and tear;

[0067] Example 4:\n;

[0068] Fault description: "Left and right dividers broken"

[0069] Faulty components: Left divider, right divider;

[0070] Fault symptom: breakage\n;

[0071] Now, please process the new fault description: "{fault_desc}"";

[0072] That concludes the example illustration.

[0073] As mentioned above, the following information sets the role: "You are a research and development engineer familiar with vehicle structure and parts. Please identify the faulty components and symptoms based on the fault description for quick troubleshooting." and "Now, please process the new fault description:". The following information extracts descriptive information for the faulty components and symptoms: "Please note: 1) Faulty components may consist of pure Chinese characters or a combination of Chinese characters and English letters and numbers. 2) Please strictly follow the format: \"Faulty Component: XX\\nFault Symptom: XX\". If it cannot be identified, please output "Faulty Component: None" or "Fault Symptom: None". The remaining information extracts case information for the faulty components and symptoms.

[0074] S203, input the fault component name and fault phenomenon name in the second fault description data as keywords into the large language model to obtain the formatted fault description text of the second fault description data.

[0075] In this embodiment, the ability of a large language model to generate text based on keywords is utilized. The names of the faulty components and the names of the faulty phenomena obtained above are used as keywords to re-input into the large language model to obtain formatted fault description text, which facilitates the improvement of the accuracy of the subsequently generated fault description vector.

[0076] As illustrated above:

[0077] Fault Description Data: The customer reported that the grain auger had no sensor and the vibrating screen was making abnormal noises. On-site inspection revealed that the blocked sensor was malfunctioning and the screen box drive assembly was worn and could not be used normally.

[0078] Formatted fault description text: Seed auger blockage sensor failure.

[0079] Fault description data: During the busy farming season in 2022, users of the 7G model reported grain spillage, caused by uneven airflow from the blower. Communication with the technical department suggested replacing the impeller with an 8-blade unit.

[0080] Format the fault description text: The fan is leaking grain.

[0081] S204, input the formatted fault description text of the second fault description data and the fault classification data into the word embedding module of the large language model to obtain the fault description vector and fault classification vector of the historical faulty agricultural machinery.

[0082] In this embodiment, the text vectorization capability of the large language model is utilized to input the newly generated formatted fault description text and fault classification data into the word embedding module of the large language model for vectorization calculation, thereby obtaining the fault description vector and fault classification vector of the historical faulty agricultural machinery. Word embeddings are a common concept in machine learning and natural language processing, typically referring to the process of mapping data to a low-dimensional vector space.

[0083] S205, based on the second fault description data, the second fault-related data, the fault classification data, the fault component name and fault phenomenon name, fault description vector, and fault classification vector in the second fault description data, a fault classification vector data model of the historical faulty agricultural machinery is constructed, and the fault classification vector model data is stored in the sample of the database to obtain the agricultural machinery fault vector database; wherein, the fault classification vector model data includes model metadata and model vector data, the model metadata includes fault-related data, fault component name, fault phenomenon name, fault description text, and fault classification text, and the model vector data includes fault description vector and fault classification vector.

[0084] In this embodiment, based on historical faulty agricultural machinery fault description data, fault-related data, fault classification data, and the faulty component names, fault phenomenon names, fault description vectors, and fault classification vectors calculated above, an agricultural machinery fault classification vector data model is constructed. This model data is then stored in a sample database to obtain an agricultural machinery fault vector database. The fault classification vector model data includes model metadata and model vector data. The model metadata includes fault-related data such as agricultural machinery product line, agricultural machinery platform, fault time, and fault province, as well as faulty component names, fault phenomenon names, fault description texts, and fault classification texts. The model vector data includes fault description vectors and fault classification vectors. This facilitates subsequent mixed queries of agricultural machinery fault classifications based on model metadata and model vector data.

[0085] Furthermore, after acquiring the second fault description data, second fault-related data, and fault classification data of historically faulty agricultural machinery, the method further includes:

[0086] The second fault description data and the fault classification data are preprocessed based on preset data processing rules.

[0087] In this embodiment, since the fault description data of agricultural machinery malfunctions is mostly verbally described by the operators and manually recorded by customer service personnel, the fault description data lacks a unified standard and format, necessitating unified data cleaning. The focus is on cleaning the fault description data and fault classification data. Specifically, the fault description data and fault classification data are preprocessed based on preset data processing rules, including but not limited to: normalizing English case, normalizing numbers, normalizing symbols, correcting typos, and filtering operational-specific identifiers unrelated to the fault description, such as those related to marketing activities.

[0088] Furthermore, S102 specifically includes:

[0089] Step a1: Input the first fault description data and the preset model prompt words into the large language model, so that the large language model outputs the fault component name and fault phenomenon name in the first fault description data according to the preset model prompt words; the preset model prompt words include role setting information, fault component and fault phenomenon extraction description information, and fault component and fault phenomenon extraction case information.

[0090] Step a2: Input the names of the faulty components and the names of the faulty phenomena in the first fault description data as keywords into the large language model to obtain the formatted fault description text of the first fault description data.

[0091] Step a3: Input the formatted fault description text of the first fault description data into the word embedding module of the large language model to obtain the first fault description vector of the first fault description data.

[0092] The descriptions of steps a1 to a3 can be referenced from the descriptions of S202 to S204, and the same technical effects can be achieved, so they will not be elaborated further.

[0093] In one possible implementation, after inputting the first fault description data and the preset model prompt words into the large language model, the method further includes:

[0094] If the large language model fails to output the name of the faulty component or the name of the faulty phenomenon in the first fault description data according to the preset model prompt words, the first fault description data is determined to be invalid data, and a prompt message is output to indicate that the fault description data is invalid and the agricultural machinery fault classification fails.

[0095] In this embodiment of the application, before performing agricultural machinery fault classification queries, it is first necessary to check the quality of the input data to avoid invalid input data leading to incorrect query results or no query results. Specifically, if the large language model fails to output the name of the faulty component or the name of the faulty phenomenon in the fault description data according to the preset model prompt words, it determines that the obtained fault description data is invalid data and outputs a prompt message to indicate that the fault description data is invalid, and the agricultural machinery fault classification fails.

[0096] Furthermore, S103 specifically includes:

[0097] Step b1: Based on the first fault-related data, perform preliminary screening on the records in the agricultural machinery fault vector database to select multiple first candidate records whose corresponding fault-related data is the same as or similar to the target fault-related data.

[0098] In this embodiment, to improve the accuracy and efficiency of retrieval of massive agricultural machinery fault vector data model data, a hybrid query of model metadata and model vector data is performed in the agricultural machinery fault vector database based on constructed query conditions. In the hybrid query, preliminary screening is first performed using model metadata, quickly locating possible candidate sets using the model metadata index. Then, further refined screening is performed using vector data, finding the most similar data objects by calculating the similarity between the query vector and the candidate set vectors. This combines the rapid retrieval capability of model metadata with the precise matching advantage of vector data, improving the accuracy and efficiency of the retrieval.

[0099] Specifically, firstly, based on fault-related data, the records in the agricultural machinery fault vector database are initially screened to select multiple first candidate records whose corresponding fault-related data is the same or similar to the target fault-related data. These are candidate records that meet the agricultural machinery usage scenario, such as the same or similar agricultural machinery model, the same or similar fault time, the same or similar fault province, etc. The accuracy of the specific agricultural machinery usage scenario is set according to the actual situation and is not limited here.

[0100] Step b2: Sort the first candidate records in reverse order of similarity according to the similarity between the target fault description vector and the fault description vectors corresponding to each first candidate record, and determine the first candidate record with a similarity greater than or equal to a preset similarity threshold as the second candidate record.

[0101] Step b3: Determine the plurality of second candidate records as the plurality of target candidate records.

[0102] In this embodiment, the first candidate records are sorted in reverse order based on the similarity between the target fault description vector and the fault description vectors corresponding to each first candidate record. That is, the candidate records corresponding to fault description vectors with high similarity are ranked first. At the same time, a preset similarity threshold is set to limit the number of target candidate records returned. The preset similarity threshold is a preset minimum fault description vector similarity.

[0103] Furthermore, S104 specifically includes:

[0104] Step c1: Based on a preset data clustering algorithm, cluster the fault classification vectors corresponding to each of the target candidate records to obtain multiple clusters.

[0105] In this embodiment, the fault classification vectors corresponding to each target candidate record are clustered to group fault classification vectors of the same or similar fault types into a single cluster. Specifically, the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm can be used to implement density-based unsupervised clustering, or methods such as K-Means (K-Means clustering algorithm) can be used to specify a clustering value greater than the number of returned classifications; no specific restrictions are imposed here.

[0106] Step c2: For each cluster, determine the weight value of the cluster based on the similarity between the fault description vector corresponding to each target candidate sample in the cluster and the first fault description vector, and the similarity between the fault description vector corresponding to all target candidate samples and the first fault description vector.

[0107] In this step, for each cluster t, the similarity S between the fault description vector corresponding to each target candidate sample in the cluster and the first fault description vector is calculated. tj , (j=1…N t ), and the similarity S between the fault description vectors corresponding to all target candidate samples and the first fault description vector. ij (i = 1…Z, j = 1…N) t Determine the weight value W of the cluster. t Specifically, as shown in the following formula:

[0108] Where t is the cluster identifier, Z is the number of clusters, and N is the number of clusters. tdenoted as the number of target candidate samples in cluster t.

[0109] Step c3: For each cluster, determine the credibility of the fault classification type based on the number of target candidate samples with the same fault classification type in the cluster, the total number of target candidate samples in the cluster, and the weight value of the cluster.

[0110] In this step, for each cluster t, the number G of target candidate samples with the same fault classification type g in cluster t is used as the basis for the calculation. tg The number of all target candidate samples in cluster t, N t and the weight value W of the cluster. t Determine the confidence level B of the fault classification type g. g Specifically, as shown in the following formula:

[0111] Where g is the identifier of the same fault classification type in the cluster.

[0112] Step c4: Sort the fault classification types in the multiple target candidate samples according to their confidence level from high to low, and determine the fault classification type with the highest confidence level as the fault classification of the target agricultural machinery.

[0113] In this step, the fault classification type g among multiple target candidate samples is determined according to confidence level B. g Sort the fault categories from highest to lowest and return a preset number of fault classification types g and their confidence level B. g The target agricultural machinery with the malfunction is identified, and the malfunction classification type with the highest credibility is determined as the malfunction classification of the target agricultural machinery.

[0114] This application provides a method for classifying agricultural machinery faults, including: acquiring first fault description data and first fault-related data of a target faulty agricultural machinery; the first fault-related data includes faulty agricultural machinery type data, fault location data, and fault time data of the target faulty agricultural machinery; determining a first fault description vector of the first fault description data based on the first fault description data, a large language model, and preset model prompt words; querying a plurality of target candidate records from an agricultural machinery fault vector database based on the first fault description vector and the first fault-related data; each record in the agricultural machinery fault vector database stores agricultural machinery fault classification vector data model data determined based on second fault description data, second fault-related data, and fault classification data of historical faulty agricultural machinery; target candidate records are records whose corresponding fault-related data is the same or similar to the first fault-related data, and whose corresponding fault description vector has a similarity to the first fault description vector greater than or equal to a preset similarity threshold; determining the fault classification of the target faulty agricultural machinery based on the similarity between the fault description vector corresponding to each target candidate record and the first fault description vector, the fault classification vector corresponding to each target candidate record, and a preset data clustering algorithm. In this way, by processing fault description data based on a large language model and querying the agricultural machinery fault vector database built based on the large language model, agricultural machinery fault classifications that conform to both the agricultural machinery fault description and the agricultural machinery usage scenario are obtained, thus improving the accuracy of agricultural machinery fault classification.

[0115] Based on the same application concept, this application also provides an agricultural machinery fault classification device corresponding to the agricultural machinery fault classification method provided in the above embodiments. Since the principle of the device in this application is similar to the agricultural machinery fault classification method in the above embodiments of this application, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.

[0116] Please see Figure 3 , Figure 3 This is one of the functional block diagrams of an agricultural machinery fault classification device provided in an embodiment of this application. For example... Figure 3 As shown, the agricultural machinery fault classification device 300 includes:

[0117] The acquisition module 310 is used to acquire first fault description data and first fault-related data of the target faulty agricultural machinery; the first fault-related data includes the faulty agricultural machinery type data, fault location data, and fault time data of the target faulty agricultural machinery.

[0118] The first determining module 320 is used to determine the first fault description vector of the first fault description data based on the first fault description data, the large language model and the preset model prompt words;

[0119] The hybrid query module 330 is used to query multiple target candidate records from the agricultural machinery fault vector database based on the first fault description vector and the first fault-related data. Each record in the agricultural machinery fault vector database stores agricultural machinery fault classification vector data model data determined based on the second fault description data, the second fault-related data, and the fault classification data of historical faulty agricultural machinery. The target candidate record is a record whose corresponding fault-related data is the same as or similar to the first fault-related data, and whose corresponding fault description vector has a similarity to the first fault description vector greater than or equal to a preset similarity threshold.

[0120] The second determining module 340 is used to determine the fault classification of the target faulty agricultural machinery based on the similarity between the fault description vector corresponding to each of the target candidate records and the first fault description vector, the fault classification vector corresponding to each of the target candidate records, and a preset data clustering algorithm.

[0121] Further, please refer to Figure 4 , Figure 4 This is one of the functional block diagrams of an agricultural machinery fault classification device provided in an embodiment of this application. For example... Figure 4 As shown, the agricultural machinery fault classification device 300 also includes:

[0122] The preprocessing module 350 is used to perform data preprocessing on the first fault description data based on preset data processing rules.

[0123] Furthermore, before the first determining module 320 acquires the first fault description data and the first fault-related data of the target faulty agricultural machinery, the mixed query module 330 is also used to construct the agricultural machinery fault vector database according to the following steps:

[0124] Acquire the second fault description data, second fault related data, and fault classification data of historical agricultural machinery failures;

[0125] The second fault description data and the preset model prompt words are input into the large language model, so that the large language model outputs the fault component name and fault phenomenon name in the second fault description data according to the preset model prompt words; the preset model prompt words include role setting information, fault component and fault phenomenon extraction description information, and fault component and fault phenomenon extraction case information.

[0126] Input the faulty component name and fault phenomenon name from the second fault description data into the large language model as keywords to obtain the formatted fault description text of the second fault description data.

[0127] The formatted fault description text of the second fault description data and the fault classification data are input into the word embedding module of the large language model to obtain the fault description vector and fault classification vector of the historical faulty agricultural machinery;

[0128] Based on the second fault description data, the second fault-related data, the fault classification data, the fault component names and fault phenomenon names, fault description vectors, and fault classification vectors in the second fault description data, a fault classification vector data model of the historical faulty agricultural machinery is constructed, and the fault classification vector model data is stored in the sample of the database to obtain the agricultural machinery fault vector database; wherein, the fault classification vector model data includes model metadata and model vector data, the model metadata includes fault-related data, fault component names, fault phenomenon names, fault description text, and fault classification text, and the model vector data includes fault description vectors and fault classification vectors.

[0129] Furthermore, after obtaining the second fault description data, second fault-related data, and fault classification data of historical faulty agricultural machinery, the hybrid query module 330 is also used for:

[0130] The second fault description data and the fault classification data are preprocessed based on preset data processing rules.

[0131] Furthermore, when the first determining module 320 determines the first fault description vector of the first fault description data based on the first fault description data, the large language model, and preset model prompt words, the first determining module 320 is specifically used for:

[0132] The first fault description data and the preset model prompt words are input into the large language model, so that the large language model outputs the fault component name and fault phenomenon name in the first fault description data according to the preset model prompt words; the preset model prompt words include role setting information, fault component and fault phenomenon extraction description information, and fault component and fault phenomenon extraction case information.

[0133] Input the names of the faulty components and the names of the faulty phenomena in the first fault description data into the large language model to obtain the formatted fault description text of the first fault description data.

[0134] The formatted fault description text of the first fault description data is input into the word embedding module of the large language model to obtain the first fault description vector of the first fault description data.

[0135] Furthermore, after inputting the first fault description data and the preset model prompt words into the large language model, the first determining module 320 is further configured to:

[0136] If the large language model fails to output the name of the faulty component or the name of the faulty phenomenon in the first fault description data according to the preset model prompt words, the first fault description data is determined to be invalid data, and a prompt message is output to indicate that the fault description data is invalid and the agricultural machinery fault classification fails.

[0137] Furthermore, when the hybrid query module 330 queries multiple target candidate records from the agricultural machinery fault vector database based on the first fault description vector and the first fault-related data, the hybrid query module 330 is specifically used for:

[0138] Based on the first fault-related data, the records in the agricultural machinery fault vector database are initially screened to select multiple first candidate records whose corresponding fault-related data is the same as or similar to the target fault-related data.

[0139] Based on the similarity between the target fault description vector and the fault description vectors corresponding to each of the first candidate records, the first candidate records are sorted in reverse order according to the similarity, and the first candidate records with a similarity greater than or equal to a preset similarity threshold are determined as the second candidate records.

[0140] Multiple second candidate records are identified as the multiple target candidate records.

[0141] Further, when the second determining module 340 determines the fault classification of the target faulty agricultural machinery based on the similarity between the fault description vector corresponding to each of the target candidate records and the first fault description vector, the fault classification vector corresponding to each of the target candidate records, and a preset data clustering algorithm, the second determining module 340 is specifically used for:

[0142] According to a preset data clustering algorithm, the fault classification vectors corresponding to each of the target candidate records are clustered to obtain multiple clusters;

[0143] For each cluster, the weight value of the cluster is determined based on the similarity between the fault description vector corresponding to each target candidate sample in the cluster and the first fault description vector, and the similarity between the fault description vector corresponding to all target candidate samples and the first fault description vector.

[0144] For each cluster, the confidence level of the fault classification type is determined based on the number of target candidate samples with the same fault classification type in the cluster, the total number of all target candidate samples in the cluster, and the weight value of the cluster.

[0145] The fault classification types among the multiple target candidate samples are sorted from high to low confidence, and the fault classification type with the highest confidence is determined as the fault classification of the target agricultural machinery.

[0146] This application provides an agricultural machinery fault classification device, comprising: an acquisition module for acquiring first fault description data and first fault-related data of a target faulty agricultural machinery; the first fault-related data includes faulty agricultural machinery type data, fault location data, and fault time data of the target faulty agricultural machinery; a first determination module for determining a first fault description vector of the first fault description data based on the first fault description data, a large language model, and preset model prompt words; a hybrid query module for querying multiple target candidate records from an agricultural machinery fault vector database based on the first fault description vector and the first fault-related data; each record in the agricultural machinery fault vector database stores agricultural machinery fault classification vector data model data determined based on second fault description data, second fault-related data, and fault classification data of historical faulty agricultural machinery; target candidate records are records whose corresponding fault-related data is the same or similar to the first fault-related data, and whose corresponding fault description vector has a similarity to the first fault description vector greater than or equal to a preset similarity threshold; and a second determination module for determining the fault classification of the target faulty agricultural machinery based on the similarity between the fault description vector corresponding to each target candidate record and the first fault description vector, the fault classification vector corresponding to each target candidate record, and a preset data clustering algorithm. In this way, by processing fault description data based on a large language model and querying the agricultural machinery fault vector database built based on the large language model, agricultural machinery fault classifications that conform to both the agricultural machinery fault description and the agricultural machinery usage scenario are obtained, thus improving the accuracy of agricultural machinery fault classification.

[0147] Based on the same application concept, please refer to Figure 5 , Figure 5 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 5 As shown, the electronic device 500 includes a processor 510, a memory 520, and a bus 530.

[0148] The memory 520 stores machine-readable instructions that can be executed by the processor 510. When the electronic device 500 is running, the processor 510 and the memory 520 communicate through the bus 530. When the machine-readable instructions are executed by the processor 510, the steps of the agricultural machinery fault classification method provided in the above embodiment are executed. For specific implementation methods, please refer to the method embodiment, which will not be repeated here.

[0149] Based on the same concept, this application also provides a computer-readable storage medium storing a computer program. When the computer program is run by a processor, it executes the steps of the agricultural machinery fault classification method provided in the above embodiments. For specific implementation details, please refer to the method embodiments, which will not be repeated here.

[0150] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the above-described apparatus and unit can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0151] In the embodiments provided in this application, it should be understood that the disclosed apparatus and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some communication interfaces; indirect couplings or communication connections between devices or units may be electrical, mechanical, or other forms.

[0152] The units described as separate components may or may not be physically separate. 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 units can be selected to achieve the purpose of this embodiment according to actual needs.

[0153] In addition, the functional units in the embodiments provided in this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0154] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0155] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0156] Finally, it should be noted that the above-described embodiments are merely specific implementations of this application, used to illustrate the technical solutions of this application, and not to limit them. The protection scope of this application is not limited thereto. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this application; and these modifications, changes, 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 this application. All should be covered within the protection scope of this application. Therefore, the protection scope of this application should be determined by the protection scope of the claims.

Claims

1. A method for classifying agricultural machinery faults, characterized in that, The method includes: Obtain first fault description data and first fault-related data of the target faulty agricultural machinery; the first fault-related data includes the faulty agricultural machinery type data, fault location data, and fault time data of the target faulty agricultural machinery; Based on the first fault description data, the large language model, and the preset model prompt words, determine the first fault description vector of the first fault description data; Based on the first fault description vector and the first fault-related data, multiple target candidate records are obtained by querying the agricultural machinery fault vector database; each record in the agricultural machinery fault vector database stores agricultural machinery fault classification vector data model data determined based on the second fault description data, the second fault-related data, and the fault classification data of historical faulty agricultural machinery; the target candidate record is a record whose corresponding fault-related data is the same as or similar to the first fault-related data, and whose corresponding fault description vector has a similarity to the first fault description vector greater than or equal to a preset similarity threshold. Based on the similarity between the fault description vector corresponding to each of the target candidate records and the first fault description vector, the fault classification vector corresponding to each of the target candidate records, and a preset data clustering algorithm, the fault classification of the target faulty agricultural machinery is determined.

2. The agricultural machinery fault classification method according to claim 1, characterized in that, Before obtaining the first fault description data and the first fault-related data of the target faulty agricultural machinery, the agricultural machinery fault vector database is constructed according to the following steps: Acquire the second fault description data, second fault related data, and fault classification data of historical agricultural machinery failures; The second fault description data and the preset model prompt words are input into the large language model, so that the large language model outputs the fault component name and fault phenomenon name in the second fault description data according to the preset model prompt words; The preset model prompts include character setting information, descriptions of faulty components and fault phenomena, and case information of faulty components and fault phenomena extraction. Input the faulty component name and fault phenomenon name from the second fault description data into the large language model as keywords to obtain the formatted fault description text of the second fault description data. The formatted fault description text of the second fault description data and the fault classification data are input into the word embedding module of the large language model to obtain the fault description vector and fault classification vector of the historical faulty agricultural machinery; Based on the second fault description data, the second fault-related data, the fault classification data, the fault component names and fault phenomenon names, fault description vectors, and fault classification vectors in the second fault description data, a fault classification vector data model of the historical faulty agricultural machinery is constructed, and the fault classification vector model data is stored in the sample of the database to obtain the agricultural machinery fault vector database; wherein, the fault classification vector model data includes model metadata and model vector data, the model metadata includes fault-related data, fault component names, fault phenomenon names, fault description text, and fault classification text, and the model vector data includes fault description vectors and fault classification vectors.

3. The agricultural machinery fault classification method according to claim 1, characterized in that, The step of determining the first fault description vector of the first fault description data based on the first fault description data, the large language model, and preset model prompt words includes: The first fault description data and the preset model prompt words are input into the large language model, so that the large language model outputs the fault component name and fault phenomenon name in the first fault description data according to the preset model prompt words; the preset model prompt words include role setting information, fault component and fault phenomenon extraction description information, and fault component and fault phenomenon extraction case information. Input the names of the faulty components and the names of the faulty phenomena in the first fault description data into the large language model to obtain the formatted fault description text of the first fault description data. The formatted fault description text of the first fault description data is input into the word embedding module of the large language model to obtain the first fault description vector of the first fault description data.

4. The agricultural machinery fault classification method according to claim 3, characterized in that, After inputting the first fault description data and the preset model prompt words into the large language model, the method further includes: If the large language model fails to output the name of the faulty component or the name of the faulty phenomenon in the first fault description data according to the preset model prompt words, the first fault description data is determined to be invalid data, and a prompt message is output to indicate that the fault description data is invalid and the agricultural machinery fault classification fails.

5. The agricultural machinery fault classification method according to claim 2, characterized in that, Based on the first fault description vector and the first fault-related data, multiple target candidate records are obtained by querying the agricultural machinery fault vector database, including: Based on the first fault-related data, the records in the agricultural machinery fault vector database are initially screened to select multiple first candidate records whose corresponding fault-related data is the same as or similar to the target fault-related data. Based on the similarity between the target fault description vector and the fault description vectors corresponding to each of the first candidate records, the first candidate records are sorted in reverse order according to the similarity, and the first candidate records with a similarity greater than or equal to a preset similarity threshold are determined as the second candidate records. Multiple second candidate records are identified as the multiple target candidate records.

6. The agricultural machinery fault classification method according to claim 1, characterized in that, The step of determining the fault classification of the target faulty agricultural machinery based on the similarity between the fault description vector corresponding to each of the target candidate records and the first fault description vector, the fault classification vector corresponding to each of the target candidate records, and a preset data clustering algorithm includes: According to a preset data clustering algorithm, the fault classification vectors corresponding to each of the target candidate records are clustered to obtain multiple clusters; For each cluster, the weight value of the cluster is determined based on the similarity between the fault description vector corresponding to each target candidate sample in the cluster and the first fault description vector, and the similarity between the fault description vector corresponding to all target candidate samples and the first fault description vector. For each cluster, the confidence level of the fault classification type is determined based on the number of target candidate samples with the same fault classification type in the cluster, the total number of all target candidate samples in the cluster, and the weight value of the cluster. The fault classification types among the multiple target candidate samples are sorted from high to low confidence, and the fault classification type with the highest confidence is determined as the fault classification of the target agricultural machinery.

7. A fault classification device for agricultural machinery, characterized in that, The agricultural machinery fault classification device includes: The acquisition module is used to acquire first fault description data and first fault-related data of the target faulty agricultural machinery; the first fault-related data includes the faulty agricultural machinery type data, fault location data, and fault time data of the target faulty agricultural machinery. The first determining module is used to determine the first fault description vector of the first fault description data based on the first fault description data, the large language model, and the preset model prompt words; The hybrid query module is used to query multiple target candidate records from the agricultural machinery fault vector database based on the first fault description vector and the first fault-related data. Each record in the agricultural machinery fault vector database stores agricultural machinery fault classification vector data model data determined based on the second fault description data, the second fault-related data, and the fault classification data of historical faulty agricultural machinery. The target candidate record is a record whose corresponding fault-related data is the same as or similar to the first fault-related data, and whose corresponding fault description vector has a similarity to the first fault description vector greater than or equal to a preset similarity threshold. The second determining module is used to determine the fault classification of the target faulty agricultural machinery based on the similarity between the fault description vector corresponding to each of the target candidate records and the first fault description vector, the fault classification vector corresponding to each of the target candidate records, and a preset data clustering algorithm.

8. The agricultural machinery fault classification device according to claim 7, characterized in that, Before obtaining the target fault description data and target fault-related data of the agricultural machinery with the target fault, the hybrid query module also constructs the agricultural machinery fault vector database according to the following steps: Acquire the second fault description data, second fault related data, and fault classification data of historical agricultural machinery failures; The second fault description data and the preset model prompt words are input into the large language model, so that the large language model outputs the fault component name and fault phenomenon name in the second fault description data according to the preset model prompt words; The preset model prompts include character setting information, descriptions of faulty components and fault phenomena, and case information of faulty components and fault phenomena extraction. Input the faulty component name and fault phenomenon name from the second fault description data into the large language model as keywords to obtain the formatted fault description text of the second fault description data. The formatted fault description text of the second fault description data and the fault classification data are input into the word embedding module of the large language model to obtain the fault description vector and fault classification vector of the historical faulty agricultural machinery; Based on the second fault description data, the second fault-related data, the fault classification data, the fault component names and fault phenomenon names, fault description vectors, and fault classification vectors in the second fault description data, a fault classification vector data model of the historical faulty agricultural machinery is constructed, and the fault classification vector model data is stored in the sample of the database to obtain the agricultural machinery fault vector database; wherein, the fault classification vector model data includes model metadata and model vector data, the model metadata includes fault-related data, fault component names, fault phenomenon names, fault description text, and fault classification text, and the model vector data includes fault description vectors and fault classification vectors.

9. An electronic device, characterized in that, include: The device includes a processor, a memory, and a bus. The memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus. The machine-readable instructions are executed by the processor to perform the steps of the agricultural machinery fault classification method as described in any one of claims 1 to 6.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, performs the steps of the agricultural machinery fault classification method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Fault event response method and device, electronic equipment and storage medium

    CN115828112A

  • Information determination method and device, equipment and storage medium

    CN118134501A