Equipment fault question and answer method, device, computer equipment and medium
By determining the associated entities of industrial equipment failures in the knowledge graph and calculating cosine similarity, a fast and effective maintenance solution is provided, which solves the problem of low maintenance efficiency in the prior art and improves the maintenance efficiency of industrial equipment.
Patent Information
- Application Number
- CN202110843910.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-26
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2041-07-26
AI Technical Summary
Existing industrial equipment failure repair methods are limited by the personal experience of the maintenance engineer, and the equipment search library is difficult to return solutions that are truly relevant to the failure, resulting in inefficient maintenance.
By receiving user input fault problems, the target entity is determined, and the associated entity is determined in the preset knowledge graph, forming a triple for vector representation, and calculating cosine similarity to determine the repair answer.
It improves the maintenance efficiency of industrial equipment by maintenance engineers, quickly feedback related maintenance plans, and reduces the time and energy requirement of maintenance experience.
Smart Images

Figure CN113569026B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of industrial equipment fault maintenance, and in particular to an equipment fault question-and-answer method, device, computer equipment, and medium. Background Art
[0002] During the daily use of industrial equipment (typically, such as household appliances), failures may sometimes occur. Due to the wide range of models and complex structures of industrial equipment, professional maintenance engineers are often required to repair equipment failures.
[0003] Existing maintenance engineers usually require a lot of time and energy to train. Secondly, the speed at which maintenance engineers accumulate equipment knowledge usually cannot keep up with the speed at which industrial equipment is updated in production technology. When maintenance engineers repair equipment failures, they usually rely on their personal maintenance experience; or enter keywords related to the failure in the search library corresponding to the equipment, match the keywords through the search library, and return the solution corresponding to the equipment failure.
[0004] However, the existing maintenance methods have the following problems: fault repair is limited by the personal experience of maintenance engineers; the equipment search library is only used to perform literal searches on keywords, and it is difficult to return solutions that are truly relevant to the equipment failure. Summary of the invention
[0005] The embodiments of the present invention provide a method, a device, a computer device and a medium for answering equipment fault questions, which can improve the maintenance efficiency of maintenance engineers on industrial equipment.
[0006] In a first aspect, an embodiment of the present invention provides a device fault question and answer method, the method comprising:
[0007] receiving a fault problem input by a user for a fault occurring in a target device, and determining, according to the fault problem, at least one target entity included in the fault problem;
[0008] In a preset knowledge graph corresponding to the target device, determining a plurality of associated entities corresponding to the target entity;
[0009] Performing vector representation on the triple formed by the target entity and each associated entity to obtain target vectors corresponding to the target entity and each associated entity respectively;
[0010] The cosine similarity between the target entity and each associated entity is calculated according to the target vectors respectively corresponding to the target entity and each associated entity, and the maintenance answer for the fault problem is determined according to the calculation result of the cosine similarity.
[0011] In a second aspect, an embodiment of the present invention further provides a device fault question and answer device, the device comprising:
[0012] A problem receiving module, configured to receive a fault problem input by a user for a fault occurring in a target device, and determine at least one target entity included in the fault problem according to the fault problem;
[0013] An entity determination module, used to determine a plurality of associated entities corresponding to the target entity in a preset knowledge graph corresponding to the target device;
[0014] A vector representation module, used for performing vector representation on the triple formed by the target entity and each associated entity, and obtaining target vectors corresponding to the target entity and each associated entity respectively;
[0015] The answer determination module is used to calculate the cosine similarity between the target entity and each associated entity according to the target vectors respectively corresponding to the target entity and each associated entity, and determine the maintenance answer for the fault problem according to the calculation result of the cosine similarity.
[0016] In a third aspect, an embodiment of the present invention further provides a computer device, the device comprising:
[0017] one or more processors;
[0018] A storage device for storing one or more programs;
[0019] When the one or more programs are executed by the one or more processors, the one or more processors implement a device fault question and answer method provided by any embodiment of the present invention.
[0020] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, a device fault question and answer method provided by any embodiment of the present invention is implemented.
[0021] The technical solution of the embodiment of the present invention receives a fault problem input by a user for a fault occurring in a target device, determines a target entity included in the fault problem, determines multiple associated entities in a preset knowledge graph, and vectorizes the triple formed by the target entity and each associated entity to obtain a target vector corresponding to the target entity and each associated entity, and then calculates the cosine similarity between the target entity and each associated entity based on the target vector corresponding to the target entity and each associated entity, and finally determines the technical means for the maintenance answer to the fault problem based on the calculation result of the cosine similarity, which can improve the maintenance efficiency of maintenance engineers for industrial equipment. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 is a flow chart of a device fault question-and-answer method in Embodiment 1 of the present invention;
[0023] Figure 2 is a flow chart of a device fault question-and-answer method in Embodiment 2 of the present invention;
[0024] Figure 3 is a flow chart of a device fault question-and-answer method in Embodiment 3 of the present invention;
[0025] Figure 4 It is a structural diagram of a device fault question-and-answer device in Embodiment 4 of the present invention;
[0026] Figure 5 It is a structural diagram of a computer device in Embodiment 5 of the present invention. DETAILED DESCRIPTION
[0027] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0028] Embodiment 1
[0029] Figure 1 This is a flow chart of a device fault question-and-answer method provided in Embodiment 1 of the present invention. This embodiment is applicable to the case where a maintenance plan is recommended to a user based on a device fault problem input by a user. The method can be executed by a device fault question-and-answer device, which can be implemented by software and / or hardware and can generally be integrated in a computer and all intelligent devices (for example, a terminal device or a server) that include a program running function. Specifically, the method includes the following steps:
[0030] Step 110: receiving a fault problem input by a user for a fault occurring in a target device, and determining, based on the fault problem, at least one target entity included in the fault problem.
[0031] In this embodiment, the target device may be a specific industrial device, and typically, the target device may include a household appliance, such as a refrigerator, a washing machine, or a water heater, etc. When a target device fails, the user may input relevant fault questions to the computer device (e.g., a terminal device or a server) integrated with the device fault question-and-answer method in this embodiment, wherein the user may specifically be a maintenance engineer corresponding to the target device.
[0032] In a specific embodiment, the user can input the fault problem to the computer device by text input or voice input. Taking the target device as a refrigerator, if the refrigerator has a water leakage fault, the refrigerator repairman can input the fault problem "How to solve the refrigerator leakage" in text in the problem input interface provided by the computer device; or the refrigerator repairman can also speak the audio "How to solve the refrigerator leakage", and the computer device can obtain the fault problem input by the refrigerator repairman through voice recognition technology.
[0033] In this step, optionally, after receiving the fault problem input by the user, the fault problem can be segmented using word segmentation technology to obtain at least one field segmentation included in the fault problem, and then invalid field segmentations (such as modal particles or adjectives, etc.) are eliminated from all field segmentations to obtain at least one target entity included in the fault problem.
[0034] In a specific embodiment, assuming that the fault problem input by the user is "What should I do if there is an odor in the refrigerator?", the word segmentation technology can be used to segment the fault problem, and the field segmentations included in the fault problem are obtained as "cold storage room", "odor" and "what to do", and then the invalid field segmentations "odor" and "what to do" are removed, and the target entity included in the fault problem is the cold storage room.
[0035] Step 120: Determine multiple associated entities corresponding to the target entity in a preset knowledge graph corresponding to the target device.
[0036] In this embodiment, the knowledge graph may be a pre-established structured graph for recording the relationship between different entities in the target device, and the relationship between each entity and the corresponding attribute. In the knowledge graph, the relationship between different entities, and the relationship between each entity and the corresponding attribute are called graph relationships.
[0037] In this step, optionally, an entity having a graph relationship with the target entity can be searched in the knowledge graph, and the entity can be used as an associated entity corresponding to the target entity.
[0038] In a specific embodiment, taking the target device as a refrigerator, the refrigerator can be divided into components and packaging parts. The components can include entities such as a refrigerator, a condenser, and a press, and the packaging part can include entities such as material and size. Among them, the relationship between entities such as a refrigerator, a condenser, a press, a material, and a size, as well as the relationship between each entity and the corresponding attribute can be recorded in the knowledge graph. For example, when the entity is a material, the attribute corresponding to the entity may include metal material and glass material, etc.
[0039] Step 130: Perform vector representation on the triple formed by the target entity and each associated entity to obtain target vectors corresponding to the target entity and each associated entity.
[0040] In this embodiment, a triple can be formed according to the target entity, the associated entity, and the relationship between the target entity and the associated entity, and then the triple can be vectorized using a preset knowledge graph embedding model to obtain target vectors corresponding to the target entity and the associated entity, respectively.
[0041] The knowledge graph embedding model is used to learn a series of low-dimensional dense vectors to represent semantic information to solve the problem of processing multi-relational data. The knowledge graph embedding model can regard the relationship in each triple (target entity, relationship, associated entity) as a translation from the target entity to the associated entity. The knowledge graph embedding model is obtained by pre-training the knowledge graph. For each triple (target entity, relationship, associated entity), the knowledge graph embedding model can be represented by a set of vectors.
[0042] Step 140: Calculate the cosine similarity between the target entity and each associated entity according to the target vectors respectively corresponding to the target entity and each associated entity, and determine a maintenance answer for the fault problem according to the calculation result of the cosine similarity.
[0043] In this embodiment, the cosine value of the angle between the target vector corresponding to the target entity and the target vector corresponding to the associated entity can be calculated, and the cosine value of the angle can be used to represent the cosine similarity between the target entity and the associated entity. Specifically, each target vector can be plotted into the vector space according to the coordinate value to calculate the angle between each target vector.
[0044] Among them, the smaller the angle between the target vector corresponding to the target entity and the target vector corresponding to the associated entity, and the closer the cosine value is to 1, the more consistent the direction of the target vector corresponding to the target entity is with the direction of the target vector corresponding to the associated entity, that is, the more similar the target entity and the associated entity are.
[0045] In a specific embodiment, assuming that the target vector corresponding to the target entity is A, the target vector corresponding to the associated entity is B, n is the dimension of the target vector, and the cosine value of the angle between the target vector corresponding to the target entity and the target vector corresponding to the associated entity is cos(θ), then:
[0046]
[0047] In this step, after calculating the cosine similarity between the target entity and each associated entity, the associated entity corresponding to the highest cosine similarity can be obtained, and the maintenance plan corresponding to the associated entity can be obtained in the knowledge graph, and this maintenance plan is used as the maintenance answer to the fault problem.
[0048] In a specific embodiment, assuming that the target entity in the fault problem is a cold storage room, and the associated entity with the highest cosine similarity corresponding to the target entity is a condenser, the maintenance plan corresponding to the condenser can be obtained in the knowledge graph, and this maintenance plan can be fed back to the user as a maintenance answer.
[0049] In the existing industrial equipment maintenance methods, fault repair is usually limited by the personal experience of maintenance engineers. There is no unified maintenance method, and qualified maintenance engineers usually need a lot of time and energy to train. The maintenance experience information is scattered and cannot be effectively accumulated for other engineers. In this embodiment, by determining the associated entity corresponding to the target entity in the knowledge graph, and determining the maintenance answer based on the cosine similarity between the target entity and the associated entity, the maintenance plan can be quickly fed back to the maintenance engineer, which is convenient for engineers with less maintenance experience to quickly complete the maintenance of industrial equipment through the method provided by this implementation; secondly, compared with the literal search of keywords in the equipment search library in the prior art, this embodiment can feedback the maintenance plan most relevant to the fault problem by finding the knowledge language most similar to the fault problem in the knowledge graph, thereby improving the effectiveness of the maintenance answer.
[0050] The technical solution of the embodiment of the present invention receives a fault problem input by a user for a fault occurring in a target device, determines a target entity included in the fault problem, determines multiple associated entities in a preset knowledge graph, and vectorizes the triple formed by the target entity and each associated entity to obtain a target vector corresponding to the target entity and each associated entity, and then calculates the cosine similarity between the target entity and each associated entity based on the target vector corresponding to the target entity and each associated entity, and finally determines the technical means for the maintenance answer to the fault problem based on the calculation result of the cosine similarity, which can improve the maintenance efficiency of maintenance engineers for industrial equipment.
[0051] Embodiment 2
[0052] This embodiment is a further refinement of the above embodiment. The explanation of terms that are the same or corresponding to those in the above embodiment will not be repeated in this embodiment. Figure 2 This is a flow chart of a device fault question and answer method provided in the second embodiment. In this embodiment, the technical solution of this embodiment can be combined with one or more methods in the solutions of the above embodiments, such as Figure 2 As shown, the method provided in this embodiment may also include:
[0053] Step 210: Receive a fault problem input by a user regarding a fault occurring in a target device.
[0054] Step 220: input the fault problem into a pre-trained entity recognition model, and obtain at least one target entity output by the entity recognition model.
[0055] In this embodiment, the entity recognition model may be a named entity recognition model (NER). The NER model may be trained using multiple fault problems as training samples. The advantage of such a setting is that the target entity included in the fault problem may be accurately and quickly obtained, thereby improving the maintenance efficiency of maintenance engineers for industrial equipment.
[0056] In a specific embodiment, assuming that the fault problem input by the user is “What should I do if the refrigerator compartment does not cool?”, after inputting this fault problem into the NER model, the target entities output by the NER model may be the refrigerator and the refrigerator compartment.
[0057] Step 230: In the preset knowledge graph corresponding to the target device, determine whether there are multiple entities that have a graph relationship with the target entity. If so, execute step 240; if not, execute steps 250-270.
[0058] Step 240: multiple entities in the knowledge graph that have a graph relationship with the target entity are used as multiple associated entities corresponding to the target entity.
[0059] Step 250: Calculate the target entity and the word embedding vectors corresponding to each entity included in the knowledge graph respectively.
[0060] In this embodiment, if there are no multiple entities in the knowledge graph that have a graph relationship with the target entity, the target entity and the word embedding vectors corresponding to each entity included in the knowledge graph can be calculated separately by word embedding technology.
[0061] Step 260: Calculate the similarity between the target entity and each entity included in the knowledge graph based on the word embedding vector corresponding to the target entity and the word embedding vector corresponding to each entity included in the knowledge graph.
[0062] In this step, optionally, the vector space distance (such as Euclidean distance or cosine distance, etc.) between the word embedding vector corresponding to the target entity and the word embedding vector corresponding to each entity in the knowledge graph can be calculated. The shorter the vector space distance between two entities, the higher the similarity between the two entities.
[0063] Step 270: Select multiple associated entities corresponding to the target entity in the knowledge graph based on the similarity between the target entity and each entity included in the knowledge graph.
[0064] In this embodiment, based on the similarity between the target entity and each entity in the knowledge graph, each entity in the knowledge graph can be arranged in order from high to low similarity, and then multiple entities with the highest arrangement order are selected as multiple associated entities corresponding to the target entity.
[0065] Step 280: Perform vector representation on the triple formed by the target entity and each associated entity to obtain target vectors corresponding to the target entity and each associated entity.
[0066] Step 290: Calculate the cosine similarity between the target entity and each associated entity according to the target vectors corresponding to the target entity and each associated entity, and determine the maintenance answer for the fault problem according to the calculation result of the cosine similarity.
[0067] The technical solution of the embodiment of the present invention receives a fault problem input by a user, obtains a target entity output by an entity recognition model for the fault problem, and then determines whether there are multiple entities having a graph relationship with the target entity in the knowledge graph. If so, the multiple entities having a graph relationship with the target entity in the knowledge graph are used as multiple associated entities corresponding to the target entity. If not, the word embedding vectors corresponding to the target entity and each entity included in the knowledge graph are calculated respectively, so as to calculate the similarity between the target entity and each entity included in the knowledge graph according to the word embedding vector, and select multiple associated entities corresponding to the target entity in the knowledge graph according to the similarity calculation result, and then the triple formed by the target entity and each associated entity is vectorized to obtain the target vectors corresponding to the target entity and each associated entity respectively. Finally, according to the target vectors corresponding to the target entity and each associated entity respectively, the cosine similarity between the target entity and each associated entity is calculated, and according to the calculation result of the cosine similarity, the technical means for determining the maintenance answer to the fault problem can improve the maintenance efficiency of maintenance engineers for industrial equipment.
[0068] Embodiment 3
[0069] This embodiment is a further refinement of the above embodiment. The explanation of terms that are the same or corresponding to those in the above embodiment will not be repeated in this embodiment. Figure 3 This is a flow chart of a device fault question and answer method provided in the third embodiment. In this embodiment, the technical solution of this embodiment can be combined with one or more methods in the solutions of the above embodiments, such as Figure 3 As shown, the method provided in this embodiment may also include:
[0070] Step 310: Receive a fault problem input by a user for a fault occurring in a target device, and determine at least one target entity included in the fault problem according to the fault problem.
[0071] Step 320: Determine multiple associated entities corresponding to the target entity in a preset knowledge graph corresponding to the target device.
[0072] Step 330: Input the target entity and the associated entity into a pre-trained Gaussian embedding model KG2E for the knowledge graph, and obtain the target vectors output by the KG2E model corresponding to the target entity and the associated entity respectively.
[0073] In this embodiment, the Gaussian embedding model (Learning to Represent Knowledge Graphs with Gaussian Embedding, KG2E) uses Gaussian distribution to represent entities and relationships, where the mean of the Gaussian distribution represents the central position of the entity or relationship in the semantic space, and the covariance of the Gaussian distribution represents the uncertainty of the entity or relationship.
[0074] In the prior art, the commonly used knowledge graph embedding model is the translation distance model (Translate, TransE), in which the TransE model focuses on learning the relationship between the previous and next entities in the knowledge graph, while the KG2E model focuses on learning the relationship between entities in the knowledge graph and global entities. Compared with the TransE model, the KG2E model can improve the accuracy of relationship prediction and triple classification problems. Therefore, by inputting the target entity and the associated entity into the pre-trained KG2E model, it can be ensured that the target vector output by the KG2E model can more accurately reflect the relationship between entities, thereby improving the accuracy of the subsequent maintenance answer determination results.
[0075] In a specific embodiment, the KG2E model is obtained by pre-training the knowledge graph. For each triple (target entity, relationship, related entity), the KG2E model can be represented by a set of vectors V:
[0076] V = KG2E (target entity, relationship, associated entity)
[0077] Step 340: Calculate the cosine similarity between the target entity and the associated entity according to the target vector corresponding to the target entity, the target vector corresponding to the associated entity, and a preset weight ratio.
[0078] In this embodiment, the cosine value of the angle between the target vector corresponding to the target entity and the target vector corresponding to the associated entity can be calculated according to a preset weight ratio, and the cosine value of the angle can be used to represent the cosine similarity between the target entity and the associated entity.
[0079] The weight assigned to the associated entity in the weight ratio is greater than the weight assigned to the target entity. The advantage of this setting is that the associated entity most similar to the target entity can be accurately obtained to improve the accuracy of the subsequent maintenance answer determination result.
[0080] In a specific embodiment, assuming that the target vector corresponding to the target entity is A, the target vector corresponding to the associated entity is B, the weight assigned to the target entity is Wa, the weight assigned to the associated entity is Wb, and the cosine value of the angle between the target vector corresponding to the target entity and the target vector corresponding to the associated entity is cos(θ), then:
[0081]
[0082] In a specific embodiment, the weight assigned to the associated entity in the weight ratio may be 0.8, and the weight assigned to the target entity may be 0.2; or, the weight assigned to the associated entity may be 0.7, and the weight assigned to the target entity may be 0.3. The specific weight ratio is preset according to the actual situation, and this embodiment does not limit this.
[0083] Step 350: According to the cosine similarity between the target entity and each associated entity, the target associated entity corresponding to the highest cosine similarity is selected.
[0084] In this step, after calculating the cosine similarity between the target entity and each associated entity, the associated entity corresponding to the highest cosine similarity can be obtained as the target associated entity.
[0085] Step 360: In the preset knowledge graph corresponding to the target device, obtain the maintenance plan corresponding to the target associated entity, and feed back the maintenance plan to the user as a maintenance answer to the fault problem.
[0086] The technical solution of the embodiment of the present invention receives a fault problem input by a user, determines a target entity included in the fault problem, determines multiple associated entities corresponding to the target entity in the knowledge graph, inputs the target entity and the associated entity into a pre-trained KG2E model, obtains target vectors corresponding to the target entity and the associated entity respectively, and then calculates the cosine similarity between the target entity and the associated entity according to the target vector corresponding to the target entity, the target vector corresponding to the associated entity, and a preset weight ratio. Finally, according to the cosine similarity between the target entity and each associated entity, the target associated entity corresponding to the highest cosine similarity is selected, and a maintenance plan corresponding to the target associated entity is obtained in the knowledge graph. This technical means of feeding back the maintenance plan to the user as a maintenance answer can improve the maintenance efficiency of maintenance engineers for industrial equipment.
[0087] Embodiment 4
[0088] Figure 4 This is a structural diagram of a device fault question and answer device provided in Embodiment 4 of the present invention, the device includes: a question receiving module 410, an entity determination module 420, a vector representation module 430 and an answer determination module 440.
[0089] The problem receiving module 410 is used to receive a fault problem input by a user for a fault occurring in a target device, and determine at least one target entity included in the fault problem according to the fault problem;
[0090] An entity determination module 420, configured to determine a plurality of associated entities corresponding to the target entity in a preset knowledge graph corresponding to the target device;
[0091] A vector representation module 430 is used to perform vector representation on the triple formed by the target entity and each associated entity to obtain a target vector corresponding to the target entity and each associated entity;
[0092] The answer determination module 440 is used to calculate the cosine similarity between the target entity and each associated entity according to the target vectors respectively corresponding to the target entity and each associated entity, and determine the maintenance answer for the fault problem according to the calculation result of the cosine similarity.
[0093] The technical solution of the embodiment of the present invention receives a fault problem input by a user for a fault occurring in a target device, determines a target entity included in the fault problem, determines multiple associated entities in a preset knowledge graph, and vectorizes the triple formed by the target entity and each associated entity to obtain a target vector corresponding to the target entity and each associated entity, and then calculates the cosine similarity between the target entity and each associated entity based on the target vector corresponding to the target entity and each associated entity, and finally determines the technical means for the maintenance answer to the fault problem based on the calculation result of the cosine similarity, which can improve the maintenance efficiency of maintenance engineers for industrial equipment.
[0094] Based on the above embodiments, the question receiving module 410 may include:
[0095] The problem input unit is used to input the fault problem into a pre-trained entity recognition model to obtain at least one target entity output by the entity recognition model.
[0096] The entity determination module 420 may include:
[0097] An entity judgment unit, used to judge whether there are multiple entities having a graph relationship with the target entity in a preset knowledge graph corresponding to the target device;
[0098] an associated entity determination unit, configured to, when there are multiple entities having a graph relationship with the target entity in a preset knowledge graph corresponding to the target device, use the multiple entities having a graph relationship with the target entity in the knowledge graph as multiple associated entities corresponding to the target entity;
[0099] A word embedding vector calculation unit, configured to respectively calculate the target entity and the word embedding vectors corresponding to each entity included in the knowledge graph when there are no multiple entities having a graph relationship with the target entity in the preset knowledge graph corresponding to the target device;
[0100] A similarity calculation unit, configured to calculate the similarity between the target entity and each entity included in the knowledge graph according to the word embedding vector corresponding to the target entity and the word embedding vector corresponding to each entity included in the knowledge graph;
[0101] An entity selection unit is used to select multiple associated entities corresponding to the target entity in the knowledge graph based on the similarity between the target entity and each entity included in the knowledge graph.
[0102] The vector representation module 430 may include:
[0103] The entity input unit is used to input the target entity and the associated entity into a pre-trained Gaussian embedding model KG2E for the knowledge graph, and obtain the target vectors output by the KG2E model corresponding to the target entity and the associated entity respectively.
[0104] The answer determination module 440 may include:
[0105] A cosine similarity calculation unit, configured to calculate the cosine similarity between the target entity and the associated entity according to a target vector corresponding to the target entity, a target vector corresponding to the associated entity, and a preset weight ratio;
[0106] A target associated entity selection unit, used for selecting the target associated entity corresponding to the target associated entity with the highest cosine similarity according to the cosine similarity between the target entity and each associated entity;
[0107] A maintenance solution acquisition unit is used to acquire a maintenance solution corresponding to the target associated entity in a preset knowledge graph corresponding to the target device, and feed back the maintenance solution to the user as a maintenance answer to the fault problem.
[0108] The device for equipment fault question and answer provided in the embodiment of the present invention can execute the device fault question and answer method provided in any embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method.
[0109] Embodiment 5
[0110] Figure 5 A schematic diagram of the structure of a computer device provided in Embodiment 5 of the present invention is shown in FIG. Figure 5 As shown, the computer device includes a processor 510, a memory 520, an input device 530, and an output device 540; the number of the processor 510 in the computer device can be one or more. Figure 5 A processor 510 is taken as an example; the processor 510, the memory 520, the input device 530 and the output device 540 in the computer device can be connected via a bus or other means. Figure 5 In the example, the connection via a bus is taken. The memory 520, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to a device fault question and answer method in any embodiment of the present invention (for example, a question receiving module 410, an entity determination module 420, a vector representation module 430 and an answer determination module 440 in a device fault question and answer device). The processor 510 executes various functional applications and data processing of the computer device by running the software programs, instructions and modules stored in the memory 520, that is, implements the above-mentioned device fault question and answer method. That is, when the program is executed by the processor, it implements:
[0111] receiving a fault problem input by a user for a fault occurring in a target device, and determining, according to the fault problem, at least one target entity included in the fault problem;
[0112] In a preset knowledge graph corresponding to the target device, determining a plurality of associated entities corresponding to the target entity;
[0113] Performing vector representation on the triple formed by the target entity and each associated entity to obtain target vectors corresponding to the target entity and each associated entity respectively;
[0114] The cosine similarity between the target entity and each associated entity is calculated according to the target vectors respectively corresponding to the target entity and each associated entity, and the maintenance answer for the fault problem is determined according to the calculation result of the cosine similarity.
[0115] The memory 520 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 520 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 520 may further include a memory remotely arranged relative to the processor 510, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and a combination thereof. The input device 530 may be used to receive input digital or character information, and to generate key signal input related to user settings and function control of the computer device, and may include a keyboard and a mouse, etc. The output device 540 may include a display device such as a display screen.
[0116] Embodiment 6
[0117] Embodiment 6 of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the method described in any embodiment of the present invention is implemented. Of course, a computer-readable storage medium provided by an embodiment of the present invention can perform the relevant operations in a device fault question-and-answer method provided by any embodiment of the present invention. That is, when the program is executed by a processor, the following is implemented:
[0118] receiving a fault problem input by a user for a fault occurring in a target device, and determining, according to the fault problem, at least one target entity included in the fault problem;
[0119] In a preset knowledge graph corresponding to the target device, determining a plurality of associated entities corresponding to the target entity;
[0120] Performing vector representation on the triple formed by the target entity and each associated entity to obtain target vectors corresponding to the target entity and each associated entity respectively;
[0121] The cosine similarity between the target entity and each associated entity is calculated according to the target vectors respectively corresponding to the target entity and each associated entity, and the maintenance answer for the fault problem is determined according to the calculation result of the cosine similarity.
[0122] Through the above description of the implementation methods, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software and necessary general hardware, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory (FLASH), hard disk or optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0123] It is worth noting that in the embodiment of the above-mentioned equipment fault question and answer device, the various units and modules included are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of the present invention.
[0124] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A device fault question and answer method, characterized in that: include: receiving a fault problem input by a user for a fault occurring in a target device, and determining, according to the fault problem, at least one target entity included in the fault problem; In a preset knowledge graph corresponding to the target device, determining a plurality of associated entities corresponding to the target entity; Performing vector representation on the triple formed by the target entity and each associated entity to obtain a target vector corresponding to the target entity and each associated entity respectively; wherein the triple includes the target entity, the associated entity, and the relationship between the target entity and the associated entity; Calculating the cosine similarity between the target entity and each associated entity according to the target vectors respectively corresponding to the target entity and each associated entity, and determining a maintenance answer for the fault problem according to the calculation result of the cosine similarity; Wherein, determining the maintenance answer for the fault problem according to the calculation result of the cosine similarity includes: According to the cosine similarity between the target entity and each associated entity, selecting the target associated entity corresponding to the target associated entity with the highest cosine similarity; In a preset knowledge graph corresponding to the target device, a maintenance plan corresponding to the target associated entity is obtained, and the maintenance plan is fed back to the user as a maintenance answer to the fault problem.
2. The method according to claim 1, characterized in that Determining, according to the fault problem, at least one target entity included in the fault problem, comprising: The fault problem is input into a pre-trained entity recognition model to obtain at least one target entity output by the entity recognition model.
3. The method according to claim 1, characterized in that In a preset knowledge graph corresponding to the target device, a plurality of associated entities corresponding to the target entity are determined, including: In a preset knowledge graph corresponding to the target device, determining whether there are multiple entities having a graph relationship with the target entity; If so, multiple entities in the knowledge graph that have a graph relationship with the target entity are used as multiple associated entities corresponding to the target entity.
4. The method according to claim 3, characterized in that: After determining whether there are multiple entities having a graph relationship with the target entity in a preset knowledge graph corresponding to the target device, the method further includes: If not, respectively calculate the target entity and the word embedding vectors corresponding to each entity included in the knowledge graph; Calculate the similarity between the target entity and each entity included in the knowledge graph based on the word embedding vector corresponding to the target entity and the word embedding vector corresponding to each entity included in the knowledge graph; According to the similarity between the target entity and each entity included in the knowledge graph, multiple associated entities corresponding to the target entity are selected in the knowledge graph.
5. The method according to claim 1, characterized in that The triple formed by the target entity and the associated entity is represented by a vector to obtain target vectors corresponding to the target entity and the associated entity, respectively, including: The target entity and the associated entity are jointly input into a pre-trained Gaussian embedding model KG2E for the knowledge graph, and the target vectors output by the KG2E model corresponding to the target entity and the associated entity are obtained.
6. The method according to claim 1, characterized in that Calculating the cosine similarity between the target entity and the associated entity according to the target vectors respectively corresponding to the target entity and the associated entity, including: The cosine similarity between the target entity and the associated entity is calculated according to the target vector corresponding to the target entity, the target vector corresponding to the associated entity, and a preset weight ratio.
7. A device for equipment fault question and answer, characterized in that: include: A problem receiving module, configured to receive a fault problem input by a user for a fault occurring in a target device, and determine at least one target entity included in the fault problem according to the fault problem; An entity determination module, used to determine a plurality of associated entities corresponding to the target entity in a preset knowledge graph corresponding to the target device; A vector representation module, used for performing vector representation on the triple formed by the target entity and each associated entity, and obtaining a target vector corresponding to the target entity and each associated entity respectively; wherein the triple includes the target entity, the associated entity, and the relationship between the target entity and the associated entity; An answer determination module, used to calculate the cosine similarity between the target entity and each associated entity according to the target vectors respectively corresponding to the target entity and each associated entity, and determine the maintenance answer for the fault problem according to the calculation result of the cosine similarity; Wherein, the answer determination module includes: A target associated entity selection unit, configured to select, according to the cosine similarity between the target entity and each associated entity, the target associated entity corresponding to the target associated entity having the highest cosine similarity; A maintenance solution acquisition unit is used to acquire a maintenance solution corresponding to the target associated entity in a preset knowledge graph corresponding to the target device, and feed back the maintenance solution to the user as a maintenance answer to the fault problem.
8. A computer device comprising: one or more processors; A storage device for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the device fault question and answer method as described in any one of claims 1 to 6 when executing the programs.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the device fault question and answer method as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Fault discrimination reasoning method based on knowledge graph
CN112269901A
Electric power communication system defect fault order sending method and device based on knowledge graph
CN112699681A