Mechanical arm fault diagnosis method and system based on knowledge graph and neural network

By constructing a robotic arm knowledge graph and using cosine similarity calculation to guide the training of the fault diagnosis model, the problem of failing to fully utilize the knowledge graph knowledge in the existing technology is solved, and the accuracy and efficiency of robotic arm fault diagnosis are improved.

CN118917418APending Publication Date: 2024-11-08GUANGDONG UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411032383.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-30
Publication Date
2024-11-08

AI Technical Summary

Technical Problem

Existing neural network-based robotic arm fault diagnosis methods fail to fully tap potential connections and knowledge in the knowledge graph, resulting in insufficient diagnostic accuracy and efficiency.

Method used

Build a robotic arm knowledge graph and use cosine similarity calculation to guide the training of the fault diagnosis model, so that the model can better learn the knowledge in the knowledge graph and improve the accuracy of the diagnosis results.

Benefits of technology

By combining the processing capabilities of the robotic arm fault diagnosis model and the expertise of the knowledge graph, the accuracy and efficiency of robotic arm fault diagnosis are significantly improved, and the potential connections between semantics and fault knowledge can be better explored.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118917418A_ABST
    Figure CN118917418A_ABST
Patent Text Reader

Abstract

According to the mechanical arm fault diagnosis method and system based on the knowledge graph and the neural network, the knowledge in the mechanical arm knowledge graph and the output of the mechanical arm fault diagnosis model are used for cosine similarity calculation, and then training of the mechanical arm fault diagnosis model is guided; the knowledge of the mechanical arm knowledge graph can be better learned by the model, and the potential relation between rich semantics and fault knowledge in the mechanical arm knowledge graph is fully mined; in the fault diagnosis process, the fault data to be diagnosed are input into the trained mechanical arm fault diagnosis model, the fault diagnosis result is obtained, the processing capacity of the mechanical arm fault diagnosis model and professional knowledge of the mechanical arm knowledge graph are combined, and the mechanical arm fault diagnosis result is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field related to robot arm fault diagnosis, and in particular to a robot arm fault diagnosis method and system based on knowledge graph and neural network. Background Art

[0002] The statements in this section merely provide background information related to the present invention and do not necessarily constitute prior art.

[0003] Robotic arms are widely used in industrial production environments due to their high flexibility, high precision, and strong load-bearing capacity. In actual production, the safety and stability of robotic arm systems have always been the focus of industry and academia. With the continuous development of robotic arms, the structure and functions of robotic arms have become more and more complex, and the corresponding fault diagnosis and maintenance have become more and more challenging. Faults can cause the robotic arm to fail, reduce work efficiency, cause significant economic losses, and even endanger personal safety. In the field of robotic arm systems in the past, fault diagnosis has always been a challenging problem. Traditional methods usually rely on rules and experience, cannot provide sufficient accuracy and efficiency, and have extremely high requirements for equipment.

[0004] Most existing methods use the constructed knowledge graph to train the neural network and diagnose the robot arm fault based on the trained neural network. However, in the reasoning process, the existing neural network-based methods have the problem of not fully exploring the potential connections of the knowledge in the knowledge graph and not making full use of the rich knowledge in the knowledge graph. Summary of the invention

[0005] In order to overcome the shortcomings of the above-mentioned prior art, the present invention provides a robotic arm fault diagnosis method and system based on knowledge graph and neural network, which uses the knowledge in the robotic arm knowledge graph and the output of the robotic arm fault diagnosis model to perform cosine similarity calculation, thereby guiding the training of the robotic arm fault diagnosis model, so that the model can better learn the knowledge of the robotic arm knowledge graph and improve the accuracy of subsequent robotic arm diagnosis results.

[0006] To achieve the above object, the first aspect of the present invention provides a method for diagnosing a mechanical arm fault based on a knowledge graph and a neural network, comprising:

[0007] Constructing a knowledge graph of a robotic arm, wherein the knowledge graph of the robotic arm includes: a robotic arm, a joint, a data acquisition device, a fault type, a data acquisition device type, and a joint rotation angle;

[0008] Constructing a training set, and using the training set to train the mechanical arm fault diagnosis model to obtain a trained mechanical arm fault diagnosis model; wherein the training set includes the acquired mechanical arm fault data and the corresponding fault type; in the training process of the mechanical arm fault diagnosis model, using cosine similarity to measure the similarity between the fault feature vector corresponding to the mechanical arm fault data in the mechanical arm knowledge graph and the fault type vector output by the mechanical arm fault diagnosis model, and training the mechanical arm fault diagnosis model as the residual loss;

[0009] Obtain the robot arm fault data to be diagnosed, input the robot arm fault data to the trained robot arm fault diagnosis model, and obtain the corresponding fault type result.

[0010] A second aspect of the present invention provides a mechanical arm fault diagnosis system based on a knowledge graph and a neural network, comprising:

[0011] A construction module is used to construct a knowledge graph of a robotic arm, wherein the knowledge graph of the robotic arm includes: a robotic arm, a joint, a data acquisition device, a fault type, a data acquisition device type, and a joint rotation angle;

[0012] A training module, used to construct a training set, and use the training set to train the mechanical arm fault diagnosis model to obtain a trained mechanical arm fault diagnosis model; wherein the training set includes the acquired mechanical arm fault data and the corresponding fault type; during the training of the mechanical arm fault diagnosis model, the cosine similarity is used to measure the similarity between the fault feature vector corresponding to the mechanical arm fault data in the mechanical arm knowledge graph and the fault type vector output by the mechanical arm fault diagnosis model, and the cosine similarity is used as the residual loss to train the mechanical arm fault diagnosis model;

[0013] The diagnosis module is used to obtain the robot arm fault data to be diagnosed, input the robot arm fault data to be diagnosed into the trained robot arm fault diagnosis model, and obtain the corresponding fault type result.

[0014] The third aspect of the present invention provides a computer device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, a robotic arm fault diagnosis method based on a knowledge graph and a neural network is performed.

[0015] A fourth aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, a robotic arm fault diagnosis method based on a knowledge graph and a neural network is executed.

[0016] One or more of the above technical solutions have the following beneficial effects:

[0017] In the present invention, a robotic arm knowledge graph is constructed, and when a robotic arm fault diagnosis model is trained, cosine similarity calculation is performed using the knowledge in the robotic arm knowledge graph and the output of the robotic arm fault diagnosis model, thereby guiding the training of the robotic arm fault diagnosis model, so that the model can better learn the knowledge of the robotic arm knowledge graph, and the robotic arm fault diagnosis model can fully explore the potential connections between the rich semantics and fault knowledge in the robotic arm knowledge graph; during fault diagnosis, the fault diagnosis result is obtained by inputting the fault data to be diagnosed into the trained robotic arm fault diagnosis model, which combines the processing capability of the robotic arm fault diagnosis model and the professional knowledge of the robotic arm knowledge graph to further improve the robotic arm fault diagnosis result.

[0018] Advantages of additional aspects of the present invention will be given in part in the following description, and in part will become obvious from the following description, or will be learned through practice of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0020] Figure 1 This is a flow chart of a method for diagnosing a mechanical arm fault based on a knowledge graph and a neural network in Embodiment 1 of the present invention;

[0021] Figure 2 This is a schematic diagram of constructing a knowledge graph in Embodiment 1 of the present invention;

[0022] Figure 3 This is a schematic diagram of a neural network structure in Embodiment 1 of the present invention;

[0023] Figure 4 This is a schematic diagram of model deployment in Embodiment 1 of the present invention;

[0024] Figure 5 This is a flow chart of a robotic arm fault diagnosis system based on knowledge graph and neural network in Embodiment 1 of the present invention. DETAILED DESCRIPTION

[0025] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0026] It should be noted that the terms used herein are for describing specific embodiments only and are not intended to be limiting of exemplary embodiments according to the present invention.

[0027] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0028] Embodiment 1

[0029] This embodiment discloses a method for diagnosing a mechanical arm fault based on a knowledge graph and a neural network, including:

[0030] Construct a knowledge graph of the robotic arm, which includes: robotic arm, joints, data acquisition device, fault type; data acquisition device type, joint rotation angle; the robotic arm includes joints, and joint-connected data acquisition devices;

[0031] Construct a training set, and use the training set to train the robot arm fault diagnosis model to obtain a trained robot arm fault diagnosis model; wherein the training set includes the acquired robot arm fault data and the corresponding fault type; during the training process, use cosine similarity to measure the similarity between the fault diagnosis type vector output by the model and the fault feature vector in the knowledge graph, and add the calculated similarity as an additional loss term to the basic loss function for training;

[0032] Obtain the robot arm fault data to be diagnosed, input the robot arm fault data to be diagnosed into the trained robot arm fault diagnosis model, and obtain the corresponding fault type result.

[0033] Combine the following Figure 1 A method for diagnosing a mechanical arm fault based on a knowledge graph and a neural network proposed in this embodiment is described in detail, including:

[0034] Step 1: Collection of fault data set.

[0035] The robotic arm communicates with the embedded device through the TCP protocol, controls the robotic arm to put it in a fault state, and collects data of the robotic arm in the fault state.

[0036] The data acquisition device includes: posture sensor, Hall encoder, camera, ultrasonic sensor, etc.

[0037] The embedded device includes at least one, which is used to undertake the calculation and storage tasks of the embedded device. The embedded device includes an imx6ull microcomputer, and the embedded devices are connected through a wireless network communication mode.

[0038] The raw data transmitted from the data acquisition device is preprocessed, filtered and feature extracted in the embedded device to provide a more accurate input for the neural network model; and the fault data is made into a data set.

[0039] Step 2: Build a knowledge graph of the robotic arm.

[0040] First, the robot assembly parts, assembly processes, and technical specifications are collected, and this information is integrated and modeled into a knowledge graph, including entities, relationships, and attributes.

[0041] like Figure 2 As shown, entities include robotic arms, joints, data acquisition devices, fault types, etc., relationships include "include", "connect", "cause", "process", etc., and attributes include technical parameters of data acquisition devices, joint rotation angles, etc.

[0042] The entities include the robot arm, joints, data acquisition devices, and fault types;

[0043] Relationships include: "include", "connect", "cause", "process", etc. For example, the robotic arm includes joint 1, joint 1 is connected to data acquisition device A, data acquisition device A measures angle values, and a failure of data acquisition device A causes data abnormality in data acquisition device A.

[0044] The attributes include: data acquisition device type, joint rotation angle, such as data acquisition device A type: posture sensor, joint 1 maximum rotation angle: ±160 degrees.

[0045] The fault feature vector of the knowledge graph is the fault feature pre-defined in the knowledge graph. For example, if there are three fault types (A, B, C), the fault feature vector is x = [x A , x B , x C ], where each component x i Represents the relevance of the model to the corresponding fault type, such as the fault feature vector x in the predefined knowledge graph A =[0.8,0.1,0.1], indicating that the correlations of the knowledge graph fault feature vector to fault types A, B, and C are 0.8, 0.1, and 0.1, respectively. Fault type A may be associated with other fault types, so the probability distribution of other faults is not 0.

[0046] Step 3: Build a neural network model and embed the knowledge graph into the neural network model.

[0047] The neural network model was built using the Tensorflow framework, and the neural network model was improved. The improvements include: embedding the robotic arm knowledge graph into the neural network model, establishing a knowledge-enhanced joint model, and building a robotic arm fault diagnosis and reasoning system. The system can use the rich knowledge in the knowledge graph to reason based on the fault phenomena of the robotic arm and find out the possible causes of the fault. It combines the powerful processing capabilities of the neural network model and the expertise of the knowledge graph to provide accurate and effective solutions to help users quickly resolve robotic arm failures.

[0048] Step 31: Represent the information in the knowledge graph in a form that can be used for neural network input, usually using embedding technology to convert entities, relationships, and attributes into low-dimensional vectors, where each entity is represented as a vector, each relationship is represented as a vector, and each attribute and its value is represented as a vector.

[0049] Entity embedding includes vector representations of robotic arms, joints, data acquisition devices, fault types, etc.

[0050] Relation embedding includes vector representations of relationships such as “include”, “connect”, “cause”, and “process”. For example, the robotic arm contains joint 1, joint 1 is connected to data acquisition device A, data acquisition device A measures angle values, and a failure of data acquisition device A causes data abnormality in data acquisition device A.

[0051] Attribute embedding includes: vector representation of attributes such as data acquisition device type and joint rotation angle, such as data acquisition device A type: posture sensor, maximum rotation angle of joint 1: ±160 degrees.

[0052] Treat entities, relations, and attributes as words, and use the Word2Vec model to train to obtain entity embedding, relation embedding, and attribute embedding. The specific steps are as follows:

[0053] Step 311: Extract triple data from the knowledge graph. Each triple consists of (head entity, relationship, tail entity), for example: (robotic arm, contains, joint 1). For attributes and their values, they can also be represented as triples, for example: (joint 1, angle range, ±160 degrees).

[0054] Step 312: Convert the triples into the input format of the Word2Vec model: Convert each triple into a sentence, with entities, relations, attributes and their values ​​as words, for example: sentences = [['robotic arm', 'contains', 'joint 1']].

[0055] Step 313: Train the Word2Vec model: Use the Word2Vec model to train these sentences.

[0056] Step 314: Obtain embedding vectors: Input each entity, each relationship, each attribute and its value into the Word2Vec model to obtain entity embedding vectors, relationship embedding vectors, and attribute and its value embedding vectors.

[0057] Step 32: extracting features from the input data. The input features in the robot arm fault diagnosis task include: fault data collected by each data acquisition device.

[0058] The data collected by the data acquisition device include: the real-time position and speed of each joint, the current and voltage data of the motor, and the surrounding environment information.

[0059] Step 33: Combine the embedding vector in the knowledge graph with the input features, assign different weights to the input features and knowledge graph embeddings, and add them together to form fused input feature data.

[0060] The process of constructing the combined fusion of fault input data and knowledge graph is to assign the importance of the two through weight parameters, and input the combined data into the neural network to be trained. During the training process, the knowledge graph is also used as an additional loss term to optimize the model training process. After the model is trained, the robot arm fault data to be diagnosed is directly input into the trained robot arm fault diagnosis model to obtain the corresponding fault type result without combining with the knowledge graph.

[0061] The steps to fuse the input feature and the knowledge graph embedding vector into new input feature data are as follows, assuming that the input feature vector is X and the knowledge graph embedding vector is K. Then, different weights α and β are assigned to the input feature vector X and the knowledge graph embedding vector K, and then they are added. The specific formula is as follows:

[0062] F=σ(α)X + σ(β)K (1)

[0063] Among them, α and β are the corresponding weight parameters, and σ is the activation function, which ensures that the weight is between 0 and 1.

[0064] Step 4: Train the neural network model.

[0065] Step 41: Match the data in the fault dataset into input feature and label pairs.

[0066] Step 42: Input the fused feature data F, initialize the weight w1 and bias b1, and perform forward propagation calculation on the input feature data. The forward calculation process is to output H=X*w1+b1.

[0067] Step 43: Use the activation function to perform nonlinear transformation on the input signal.

[0068] Step 44: Initialize the weight w2 and bias b2 of the second layer, and perform another layer of forward propagation calculation on the data after nonlinear conversion. The process of this forward calculation is to output Y=H*w2+b2.

[0069] Step 45: Output regularization, convert the value of output Y into probability S, that is, perform Softmax processing on the output. The calculation process of Softmax is: ① Calculate the exponential power of all data with e as the base ② Sum all exponential powers ③ Take the quotient of these exponential powers and the sum respectively. The calculation formula is as follows:

[0070]

[0071] Step 46: The matching degree between the fault result of the fault diagnosis task and the fault feature in the knowledge graph is added to the loss function as a supervisory signal, so as to calculate the loss value loss of the fault diagnosis result.

[0072] Step 47: Adjust the network parameters of the neural network model based on the loss value, continue iterative training until the model converges, and output the trained neural network model.

[0073] The knowledge graph is added as a supervisory signal to the loss function, which includes the following steps, in which the basic loss function of the fault diagnosis task is defined and the cross entropy loss function is selected to measure the performance of the model on the fault diagnosis task.

[0074] The matching degree of fault features in the knowledge graph is introduced as a supervisory signal, which can be achieved by designing a special loss term that measures the matching degree between the fault diagnosis results output by the model and the fault features in the knowledge graph.

[0075] The loss term uses cosine similarity to measure the similarity between two data. Suppose the fault diagnosis result output by the model is represented as vector y, and the fault feature in the knowledge graph is represented as vector x.

[0076] For example, if there are three fault types (A, B, C), the output of the neural network may be a 3D vector y = [y A ,y B ,y C ], where each component y i Indicates the confidence of the model for the corresponding fault type. For example, y = [0.7, 0.2, 0.1] means that the model's prediction confidence for fault types A, B, and C are 0.7, 0.2, and 0.1, respectively, and the model believes that the probability of fault A is the highest.

[0077] The fault feature vector x in the knowledge graph represents the predefined fault feature. For fault types A, B, and C, the feature vector in the knowledge graph may be x A , xB , x C , where each x i Represents the characteristics of the fault, for example, the characteristic vector xA=[0.8, 0.1, 0.1] of fault type A.

[0078] The cosine similarity between them is sim(y,x):

[0079]

[0080] Where y·x is the inner product of vector y and vector x, |y| is the size of vector y, and |x| is the size of vector x.

[0081] The calculated similarity is added as an additional loss term to the basic loss function and weightedly fused with the basic loss function. The formula is as follows:

[0082] Loss total =Loss base +γ·(1-sim(y,x)) (4)

[0083] Among them, Loss tota; is the total loss function, Loss base is the basic loss function, and γ is a weight parameter used to control the importance of the knowledge graph matching loss term.

[0084] Adding the matching degree between the fault results in the fault diagnosis task and the fault features in the knowledge graph as a supervisory signal into the loss function can guide the model to learn the correct rules and improve the robustness of the model.

[0085] Step 5: Deploy the neural network model on the embedded device.

[0086] After the model training is completed, the TensorFlow model is converted to a TensorFlow Lite model. This process can be completed through the conversion tools or APIs provided by TensorFlow. The conversion process will optimize the model structure, reduce the size of the model, and quantize the model parameters so that it can run efficiently on embedded devices.

[0087] Build the Tensorflow Lite environment on the embedded device and deploy the converted TensorFlow Lite model to the embedded device, such as the imx6ull embedded board.

[0088] Step 6: The embedded device reads the real-time fault data of the robotic arm, inputs the data into the trained neural network model, and realizes online automatic detection through the neural network model to identify the cause of the robotic arm failure.

[0089] On embedded devices, the TensorFlow Lite inference engine is responsible for parsing model files, executing forward calculations of the model, and generating prediction results. In the case of robotic arm fault diagnosis, the inference process provides the data from the input data acquisition device to the model, and the model infers based on the input and outputs the robotic arm fault diagnosis results.

[0090] On the computer side, complete the cross-compilation and porting of third-party libraries such as Qt and OpenCV that the application mainly relies on, deploy them to the embedded device, and finally display the results of the robotic arm fault diagnosis on the embedded device.

[0091] This embodiment can avoid the situation where the robot arm device cannot locate the fault section in a short time when an emergency fault occurs. The robot arm fault diagnosis method based on knowledge graph and neural network can help determine the cause of the system or equipment failure and provide appropriate maintenance and repair measures. Through timely diagnosis and processing, the fault can be prevented from further expansion, the system downtime can be reduced, the availability and work efficiency of the equipment can be improved, the impact of the fault on other equipment or systems can be avoided, and unnecessary maintenance costs and parts replacement costs can be reduced.

[0092] Traditional neural network models still have difficulty recalling facts when generating knowledge-based content. To overcome these limitations, we propose to embed knowledge graphs into neural network models, which combines the powerful processing power of neural network models with the expertise of knowledge graphs to incorporate explicit factual knowledge into neural network models, thereby improving their performance in generating text that requires factual knowledge.

[0093] There are a large number of application scenarios based on embedded devices in real life. Therefore, this paper deploys the neural network model to low-power, low-cost embedded devices to solve the problem of extremely high requirements for equipment in robotic arm fault diagnosis.

[0094] Embodiment 2

[0095] The purpose of this embodiment is to provide a mechanical arm fault diagnosis system based on knowledge graph and neural network, including:

[0096] A construction module is used to construct a knowledge graph of a robotic arm, wherein the knowledge graph of the robotic arm includes: a robotic arm, a joint, a data acquisition device, a fault type, a data acquisition device type, and a joint rotation angle;

[0097] A training module, used to construct a training set, and use the training set to train the mechanical arm fault diagnosis model to obtain a trained mechanical arm fault diagnosis model; wherein the training set includes the acquired mechanical arm fault data and the corresponding fault type; during the training of the mechanical arm fault diagnosis model, the cosine similarity is used to measure the similarity between the fault feature vector corresponding to the mechanical arm fault data in the mechanical arm knowledge graph and the fault type vector output by the mechanical arm fault diagnosis model, and the cosine similarity is used as the residual loss to train the mechanical arm fault diagnosis model;

[0098] The diagnosis module is used to obtain the robot arm fault data to be diagnosed, input the robot arm fault data to be diagnosed into the trained robot arm fault diagnosis model, and obtain the corresponding fault type result.

[0099] Embodiment 3

[0100] The purpose of this embodiment is to provide a computing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the program.

[0101] Embodiment 4

[0102] The purpose of this embodiment is to provide a computer-readable storage medium.

[0103] A computer-readable storage medium stores a computer program, which executes the steps of the above method when executed by a processor.

[0104] The steps involved in the apparatuses of the above embodiments 2, 3 and 4 correspond to the method embodiment 1, and the specific implementation methods can refer to the relevant description part of embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood to include any medium that can store, encode or carry an instruction set for execution by a processor and enable the processor to execute any method in the present invention.

[0105] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.

[0106] Although the above describes the specific implementation mode of the present invention in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art on the basis of the technical solution of the present invention without creative work are still within the scope of protection of the present invention.

Claims

1. A method for fault diagnosis of a robotic arm based on knowledge graph and neural network, characterized in that: include: Constructing a knowledge graph of a robotic arm, wherein the knowledge graph of the robotic arm includes: a robotic arm, a joint, a data acquisition device, a fault type, a data acquisition device type, and a joint rotation angle; Construct a training set, and use the training set to train the robot arm fault diagnosis model to obtain a trained robot arm fault diagnosis model; The training set includes the acquired mechanical arm fault data and the corresponding fault type; in the training process of the mechanical arm fault diagnosis model, the cosine similarity is used to measure the similarity between the fault feature vector corresponding to the mechanical arm fault data in the mechanical arm knowledge graph and the fault type vector output by the mechanical arm fault diagnosis model, and the cosine similarity is used as the residual loss to train the mechanical arm fault diagnosis model; Obtain the robot arm fault data to be diagnosed, input the robot arm fault data to the trained robot arm fault diagnosis model, and obtain the corresponding fault type result.

2. A method for diagnosing mechanical arm faults based on knowledge graph and neural network as claimed in claim 1, characterized in that: Each entity, each relationship, each attribute and its value in the robotic arm knowledge graph is input into the trained Word2Vec model to extract the entity embedding vector, relationship embedding vector, attribute embedding vector and the embedding vector of their value; the entity embedding vector, relationship embedding vector, attribute embedding vector and the embedding vector of their value are fused with the robotic arm fault data and input into the robotic arm fault diagnosis model to train the robotic arm fault diagnosis model.

3. A method for diagnosing mechanical arm faults based on knowledge graph and neural network as claimed in claim 2, characterized in that: The embedding vector obtained from the knowledge graph and the robot arm fault data are respectively assigned different weights and then added, and the result of the addition is input into the robot arm fault diagnosis model to train the robot arm fault diagnosis model.

4. A method for diagnosing mechanical arm faults based on knowledge graph and neural network as claimed in claim 2, characterized in that: The entity embedding includes a robotic arm, a joint, a data acquisition device, and a fault type; the relationship embedding includes: includes, connects, causes, and processes; the attribute embedding includes a data acquisition device type and a joint rotation angle.

5. A method for diagnosing mechanical arm faults based on knowledge graph and neural network as claimed in claim 2, characterized in that: Extract triple data from the knowledge graph, each triple consists of (head entity, relationship, tail entity), and convert the triples into the input format of the Word2Vec model, specifically: convert each triple into a sentence, with entities, relationships, attributes and their values ​​as words.

6. A method for diagnosing mechanical arm faults based on knowledge graph and neural network as claimed in claim 1, characterized in that: The residual loss and the cross entropy loss function are weighted and fused to form a final loss function to train the robotic arm fault diagnosis model.

7. A robotic arm fault diagnosis system based on knowledge graph and neural network, characterized in that: include: A construction module is used to construct a knowledge graph of a robotic arm, wherein the knowledge graph of the robotic arm includes: a robotic arm, a joint, a data acquisition device, a fault type, a data acquisition device type, and a joint rotation angle; A training module, used to construct a training set, and use the training set to train the mechanical arm fault diagnosis model to obtain a trained mechanical arm fault diagnosis model; wherein the training set includes the acquired mechanical arm fault data and the corresponding fault type; during the training of the mechanical arm fault diagnosis model, the cosine similarity is used to measure the similarity between the fault feature vector corresponding to the mechanical arm fault data in the mechanical arm knowledge graph and the fault type vector output by the mechanical arm fault diagnosis model, and the cosine similarity is used as the residual loss to train the mechanical arm fault diagnosis model; The diagnosis module is used to obtain the robot arm fault data to be diagnosed, input the robot arm fault data to be diagnosed into the trained robot arm fault diagnosis model, and obtain the corresponding fault type result.

8. A mechanical arm fault diagnosis system based on knowledge graph and neural network as claimed in claim 7, characterized in that: Each entity, each relationship, each attribute and its value in the robotic arm knowledge graph is input into the trained Word2Vec model to extract the entity embedding vector, relationship embedding vector, attribute embedding vector and the embedding vector of their value; the entity embedding vector, relationship embedding vector, attribute embedding vector and the embedding vector of their value are fused with the robotic arm fault data and input into the robotic arm fault diagnosis model to train the robotic arm fault diagnosis model.

9. A computer device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, a method for diagnosing a mechanical arm fault based on a knowledge graph and a neural network as described in any one of claims 1 to 6 is performed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, the method for diagnosing a mechanical arm fault based on a knowledge graph and a neural network as described in any one of claims 1 to 7 is executed.