New energy vehicle diagnosis method, device, equipment and storage medium

By constructing a fault knowledge graph for new energy vehicles, identifying entities and relationships in user queries, and generating diagnostic results, the problem of determining the cause of faults in new energy vehicle fault diagnosis is solved, and maintenance efficiency is improved.

CN119596899BActive Publication Date: 2026-03-31CHERY NEW ENERGY AUTOMOBILE TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-11-18
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In the process of diagnosing faults in new energy vehicles, there is a many-to-many relationship between fault phenomena and fault causes, making it difficult to determine the cause of the fault and making it difficult for maintenance personnel to quickly and accurately find the cause of the fault and the solution.

Method used

A fault knowledge graph based on new energy vehicles is constructed. By acquiring the fault knowledge graph constructed from triples, entities and relationships in user queries are identified, diagnostic results are generated, and multiple ways are provided to provide feedback on the diagnostic results to maintenance personnel.

Benefits of technology

Knowledge graph technology is used to extract knowledge from unstructured experience data, quickly match diagnostic results, assist maintenance personnel in quickly identifying the cause of the fault and the solution, and improve maintenance efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119596899B_ABST
    Figure CN119596899B_ABST
Patent Text Reader

Abstract

The application discloses a new energy vehicle diagnosis method, device and equipment and a storage medium, and belongs to the field of new energy vehicles. The method comprises the following steps: acquiring a fault knowledge graph, wherein the fault knowledge graph is constructed based on triples in experience data of the new energy vehicle, and the triples are used to indicate the association relationship between entities in the experience data; identifying a first entity in a user query sentence and a first association relationship corresponding to the query intention of the user query sentence; and generating reply content of the user query sentence according to a second entity, wherein the second entity comprises an entity in the fault knowledge graph that has the first association relationship with the first entity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of new energy vehicles, and in particular to a diagnostic method, device, equipment and storage medium for new energy vehicles. Background Technology

[0002] New energy vehicles differ greatly from traditional fuel vehicles in principle and structure. They have multiple controllers, which are connected by wiring harnesses and connectors. The connectors are composed of numerous pins, and damage to a single pin can cause the new energy vehicle to malfunction or even fail to work properly.

[0003] During maintenance, technicians need to find the cause of the fault based on the fault symptoms and fault codes. However, there is a many-to-many relationship between the fault symptoms and fault codes and the cause of the fault, making it extremely difficult to determine the cause of the fault. Summary of the Invention

[0004] This application provides a diagnostic method, apparatus, device, and storage medium for new energy vehicles, which can enrich the diagnostic methods for new energy vehicles. The technical solution is as follows:

[0005] According to one aspect of this application, a diagnostic method for new energy vehicles is provided, the method comprising:

[0006] A fault knowledge graph is obtained, which is constructed based on triples in the experience data of the new energy vehicle, and the triples are used to indicate the relationship between entities in the experience data.

[0007] Identify the first entity in the user's query statement, and the first association relationship corresponding to the query intent of the user's query statement;

[0008] The response content for the user's query is generated based on the second entity, which includes entities in the fault knowledge graph that have the first association relationship with the first entity.

[0009] According to another aspect of this application, a diagnostic device for a new energy vehicle is provided, the device comprising:

[0010] The knowledge graph module is used to obtain a fault knowledge graph, which is constructed based on triples in the experience data of the new energy vehicle. The triples are used to indicate the relationship between entities in the experience data.

[0011] The identification module is used to identify the first entity in the user's query statement and the first association relationship corresponding to the query intent of the user's query statement;

[0012] The generation module is used to generate a response to the user's query statement based on a second entity, wherein the second entity includes entities in the fault knowledge graph that have the first association relationship with the first entity.

[0013] According to another aspect of this application, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement the diagnostic method for new energy vehicles as described above.

[0014] According to another aspect of this application, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set, or instruction set is stored therein, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the diagnostic method for new energy vehicles as described above.

[0015] According to another aspect of this application, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the diagnostic method for new energy vehicles provided in various optional implementations of the above aspects.

[0016] The beneficial effects of the technical solution provided in this application include at least the following:

[0017] Based on experience data from new energy vehicle diagnostics, a fault knowledge graph is generated. Knowledge graph technology is used to extract and utilize knowledge from unstructured experience data such as repair cases. Based on the queries from repair personnel, the diagnostic system can quickly match diagnostic results from the fault knowledge graph and provide feedback to repair personnel through various methods. This facilitates repair personnel in quickly identifying the cause of the fault and finding a solution, effectively assisting them in troubleshooting and repair work, and improving repair efficiency. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1This is a schematic diagram of the structure of a computer system provided in an exemplary embodiment of this application;

[0020] Figure 2 This is a flowchart of a diagnostic method for new energy vehicles provided in an exemplary embodiment of this application;

[0021] Figure 3 This is a schematic diagram of a fault knowledge graph provided in an exemplary embodiment of this application;

[0022] Figure 4 This is a schematic diagram of a fault knowledge graph provided in an exemplary embodiment of this application;

[0023] Figure 5 This is a schematic diagram of a diagnostic system provided in an exemplary embodiment of this application;

[0024] Figure 6 This is a flowchart of a diagnostic method for new energy vehicles provided in an exemplary embodiment of this application;

[0025] Figure 7 This is a schematic diagram of an entity relationship extraction model provided in an exemplary embodiment of this application;

[0026] Figure 8 This is a schematic diagram of a matrix provided in an exemplary embodiment of this application;

[0027] Figure 9 This is a schematic diagram of a diagnostic system provided in an exemplary embodiment of this application;

[0028] Figure 10 This is a schematic diagram of a diagnostic system provided in an exemplary embodiment of this application;

[0029] Figure 11 This is a schematic diagram of a response knowledge graph provided in an exemplary embodiment of this application;

[0030] Figure 12 This is a flowchart of a diagnostic method for new energy vehicles provided in an exemplary embodiment of this application;

[0031] Figure 13 This is a schematic diagram of an entity recognition model provided in an exemplary embodiment of this application;

[0032] Figure 14 This is a schematic diagram of a relation classification model provided in an exemplary embodiment of this application;

[0033] Figure 15 This is a schematic diagram of the structure of a diagnostic device for new energy vehicles provided in an exemplary embodiment of this application;

[0034] Figure 16This is a schematic diagram of the structure of a computer device provided in an exemplary embodiment of this application.

[0035] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application. Detailed Implementation

[0036] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0037] Figure 1 A schematic diagram of a computer system provided in an exemplary embodiment of this application is shown. The computer system may include a terminal device 101 and a server 103.

[0038] For example, the diagnostic method for new energy vehicles shown in this application embodiment can be applied to a terminal device 101, which runs an application 102 that supports fault diagnosis functions for new energy vehicles. The terminal device may include an in-vehicle terminal, mobile phone, tablet computer, laptop computer, desktop computer, all-in-one computer, IoT device, intelligent robot workstation, television, set-top box, smart glasses, smartwatch, digital camera, MP4 playback device, MP5 playback device, learning machine, e-reader, e-book reader, electronic dictionary, virtual reality (VR) playback device, or augmented reality (AR) playback device, etc.

[0039] The terminal device 101 includes a first memory and a first processor. The first memory stores a diagnostic program for new energy vehicles; the diagnostic program for new energy vehicles is invoked and executed by the first processor to implement the diagnostic method for new energy vehicles provided in this application. The first memory may include, but is not limited to, the following: Random Access Memory (RAM), Read Only Memory (ROM), Programmable Read-Only Memory (PROM), Erasable Programmable Read-Only Memory (EPROM), and Electrically Erasable Programmable Read-Only Memory (EEPROM).

[0040] The first processor can consist of one or more integrated circuit chips. Optionally, the first processor can be a general-purpose processor, such as a central processing unit (CPU) or a network processor (NP). Optionally, the first processor can implement the diagnostic method for new energy vehicles provided in this application by running programs or code.

[0041] In one alternative embodiment, the terminal device 101 and the server 103 can be interconnected via a wired or wireless network.

[0042] Server 103 is used to provide background services for terminal device 101. Optionally, server 103 undertakes the main computing work and terminal device 101 undertakes the secondary computing work; or, server 103 undertakes the secondary computing work and terminal device 101 undertakes the main computing work; or, server 103 and terminal device 101 use a distributed computing architecture for collaborative computing.

[0043] Server 103 can be a single server, a server cluster consisting of multiple servers, or a cloud computing service center.

[0044] Optionally, server 103 includes a second memory and a second processor. The second memory stores diagnostic programs for new energy vehicles; these diagnostic programs are invoked by the second processor to implement the diagnostic method for new energy vehicles provided in this application. Optionally, the second memory may include, but is not limited to, the following: RAM, ROM, PROM, EPROM, and EEPROM. Optionally, the second processor may be a general-purpose processor, such as a CPU or NP.

[0045] Figure 2 This is a schematic flowchart illustrating a diagnostic method for new energy vehicles provided in an exemplary embodiment of this application. This method can be used for, for example... Figure 1 The terminal device shown. The method includes the following steps.

[0046] Step 210: Obtain the fault knowledge graph, which is constructed based on triples in the experience data of new energy vehicles. Triples are used to indicate the relationships between entities in the experience data.

[0047] A fault knowledge graph is a knowledge graph built using experience data from the field of new energy vehicle repair. A knowledge graph is a structured knowledge base used to store and display information about entities (such as vehicle components, fault symptoms, fault causes, vehicle models, vehicle brands, solutions, fault codes, and fault code meanings) and their relationships. Knowledge graphs are typically represented in the form of a graph, containing nodes (representing entities) and edges (representing relationships between entities). Knowledge graphs organize information into a structure that is easier to understand and analyze.

[0048] The fault knowledge graph is constructed based on triples extracted from empirical data. A triple consists of three parts:

[0049] Subject: Represents an entity, typically a node in a knowledge graph. This entity can be at least one of the following: component unit, fault phenomenon, fault cause, vehicle model, vehicle brand, solution, fault code, and fault code meaning.

[0050] Predicate: Describes the relationship between the subject and the object. In knowledge graphs, the predicate is usually represented as an association or attribute, such as "belongs to," "located in," or "leads to." The predicate defines how the subject and the object are related.

[0051] Object: Represents another entity or a specific attribute value. It is usually another node in the knowledge graph that is connected to the subject through the predicate, or a specific attribute value (such as date, number, etc.).

[0052] The three parts together form a triple, which can be represented as (subject, predicate, object). For example, in a fault knowledge graph, a triple representing the cause of a fault might be (power limit indicator light is on, cause of fault, motor / electric water pump fault), where "power limit indicator light is on" is the entity of the subject, "cause of fault" is the relation of the predicate, and "motor / electric water pump fault" is the entity of the object.

[0053] Therefore, a triple extracted based on empirical data can include: a first entity, a second entity, and the association between the first and second entities; or, a triple can include: a first entity, an attribute of the first entity, and the specific attribute value of that attribute. This embodiment only illustrates the example of the predicate including an association relationship.

[0054] Experience data refers to data related to the repair or diagnosis of new energy vehicles. For example, experience data may include at least one of the following: repair cases, relevant papers, expert experience, technical materials, etc.

[0055] For example, for different systems in new energy vehicles, experience data corresponding to each system can be collected, and a fault knowledge graph corresponding to each single system can be constructed. This reduces the data volume of a single fault knowledge graph and improves fault diagnosis efficiency. For instance, maintenance cases of high-voltage systems in new energy vehicles can be collected to construct a fault knowledge graph corresponding to the high-voltage system, thereby diagnosing faults in the high-voltage system.

[0056] Of course, a fault knowledge graph can also be constructed based on the experience data of all systems of new energy vehicles. This fault knowledge graph can deeply analyze the mutual influence relationship between faults in different systems, which helps to diagnose faults more accurately.

[0057] In an optional embodiment, the terminal device can also display an experience data reporting interface in the user interface of the diagnostic system, guide the user to fill in the triples of experience data in the user interface, and update the fault knowledge graph in real time based on the triples filled in by the user.

[0058] In another optional embodiment, the terminal device can start collecting relevant data of the new energy vehicle after the diagnostic system alarms, such as fault codes, detection data of various systems, etc., until the alarm is resolved and then stop collecting relevant data of the new energy vehicle. The fault codes and relevant data are input into the analysis model to obtain the experience data of this fault. The experience data may include at least one of the above-mentioned entities and the relationship between entities.

[0059] For example, experience data can be natural language text, chart data, or database data. The terminal device can perform natural language understanding on the experience data and extract triples from it; or, the terminal device can call a neural network model to identify triples in the experience data, and then construct a fault knowledge graph based on the triples.

[0060] For example, such as Figure 3 As shown, the entities in the triple can include at least one of the following entity types: vehicle brand 301, vehicle model 302, fault phenomenon 303, fault cause 304, solution 305, component unit 306, fault code 307, and fault code meaning 308. Each entity type can include at least one entity.

[0061] The vehicle brand can include at least one of the following: brand name, brand number, brand logo, or brand abbreviation. The vehicle model refers to the model number of the new energy vehicle, which can be the model name, model identifier, or model code. The fault phenomenon describes the abnormal behavior of the new energy vehicle when a fault occurs; the fault phenomenon can be a textual description or include test data. The fault cause is a textual description of the reason for the fault phenomenon in the new energy vehicle. The solution is the repair measures or solutions taken for the fault phenomenon or the cause of the fault in the new energy vehicle; the solution can be a textual description. Component units refer to the various components or systems that make up the new energy vehicle. These component units include the electric motor, battery pack, electronic control system, charging system, and transmission system. The fault code is fault information detected by the diagnostic system of the new energy vehicle, usually displayed in code form. A fault code can correspond to at least one of the following: fault location, fault cause, fault phenomenon, and solution. The fault code meaning is used to explain the fault code, describing at least one of the following: fault location, fault cause, fault phenomenon, and solution.

[0062] Association relationships include at least one of the following association relationship types:

[0063] The relationship between vehicle model 302 and vehicle brand 301; indicating the vehicle brand to which the vehicle model belongs, with the corresponding edge pointing from the vehicle model to the vehicle brand.

[0064] The relationship between vehicle model 302 and fault phenomenon 303; indicating the vehicle model where the fault phenomenon occurs, with the corresponding edge pointing from the vehicle model to the fault phenomenon.

[0065] The relationship between fault cause 304 and fault phenomenon 303; indicating the fault cause that causes the fault phenomenon, with the corresponding edge pointing from the fault cause to the fault phenomenon.

[0066] The cause-and-effect relationship between fault cause 304; indicating the fault cause that leads to the fault cause, for example, a motor fault leads to a controller fault; its corresponding edge points from the fault cause to the fault cause.

[0067] The relationship between fault cause 304 and solution 305; indicating the solution corresponding to the fault cause, with the corresponding edge pointing from the fault cause to the solution.

[0068] The referencing relationship between fault cause 304 and fault code 307; indicating the fault code referred by the fault cause, with the corresponding edge pointing from the fault cause to the fault code.

[0069] The meaning relationship between fault code 307 and fault code meaning 308; indicating the fault code meaning corresponding to the fault code, with the corresponding edge pointing from the fault code to the fault code meaning.

[0070] The solution position relationship between solution 305 and component unit 306; indicating the firmware unit where the solution is located, with its corresponding edge pointing from the solution to the component unit.

[0071] The relationship between the fault cause 304 and the fault location of component unit 306; indicating the component unit where the fault cause is located, with the corresponding edge pointing from the fault cause to the component unit.

[0072] The alias relationship between component unit 306; indicating another alias (component unit) corresponding to a component unit, whose corresponding edge points from one component unit to another component unit.

[0073] The compositional relationship between component units 306; indicating the compositional relationship between component units, with the corresponding edge pointing from one component unit to another component unit.

[0074] For example, entities are treated as nodes in a fault knowledge graph, and relationships are treated as edges. A fault knowledge graph is constructed by connecting two nodes with a relationship using a triple (entity, relationship, entity). For instance, as shown... Figure 4 As shown, the terminal device can display the user interface of the diagnostic system, which displays the constructed fault knowledge graph 309. Users can click on nodes or edges in the graph to select those nodes or edges, view their detailed information, and information about the nodes or edges connected to them.

[0075] For example, in a fault knowledge graph, nodes of different entity types can be displayed in different styles, such as different colors, shapes, and sizes; edges of different relationship types can also be displayed in different styles, such as different colors, different types of lines, and different thicknesses of lines.

[0076] Step 220: Identify the first entity in the user's query statement and the first association corresponding to the query intent of the user's query statement.

[0077] The terminal device receives user-input queries, which can be either text input by the user or text obtained through speech recognition of the user's input. The user queries are natural language queries seeking diagnostic knowledge for new energy vehicles.

[0078] For example, a user query may include an entity and a relation. For instance, a user might ask why a motor is malfunctioning. This query includes the entity "motor malfunction" and the relation "the relationship between the malfunction phenomenon and its cause." Based on this entity and relation, the terminal device can query the fault knowledge graph for the entity "motor malfunction," the relation "causing relationship," and the connected entity "fault cause," to obtain at least one cause of the motor malfunction.

[0079] The first entity can be any of the entity types mentioned above. For example, the entity name mentioned in the user's query statement may not be exactly the same as the entity name stored in the fault knowledge graph. Therefore, the terminal device can first extract at least one query entity from the user's query statement, and then perform semantic matching between the query entity and the candidate entities in the fault knowledge graph to obtain the entity corresponding to the query entity in the fault knowledge graph.

[0080] The number of entities can be at least one. The user query statement can include at least one entity. The terminal device extracts these entities and the corresponding relationships for each entity. That is, the terminal device extracts at least one set of entities and their corresponding relationships from the user query statement, so as to query another entity in the triple based on one entity and one relationship.

[0081] The first association can be any of the association types mentioned above. The terminal device performs semantic understanding on the user's query and matches it with the association corresponding to the user's query intent. For example, the terminal device can call a classification model to determine the association type corresponding to the user's query; or, the terminal device can call a large language model to determine the association type corresponding to the user's query from at least one candidate association type.

[0082] Step 230: Generate the response content for the user's query statement based on the second entity, which includes entities in the fault knowledge graph that have a first association relationship with the first entity.

[0083] For example, the terminal device matches the corresponding second entity in the fault knowledge graph based on the first entity and the first association relationship. The second entity is connected to the node corresponding to the first entity in the fault knowledge graph through the edge of the first association relationship. The first entity, the first association relationship and the second entity form a triple.

[0084] After obtaining the second entity, the terminal device generates a response to the user's query based on the second entity. The response can take various forms, such as text, audio, or a knowledge graph. For example, the terminal device can invoke a large language model, using the second entity as the answer to the user's query, and request the model to generate the text response. Alternatively, the terminal device can use speech synthesis technology to generate an audio response based on the text. Or, the terminal device can extract portions of the first entity, the first relationship, and the second entity from a fault knowledge graph to obtain a response knowledge graph that is displayed to the user.

[0085] In one optional embodiment, the response content includes a response knowledge graph; the terminal device invokes a query statement to query the first entity and the second entity corresponding to the first association relationship based on the fault knowledge graph; based on the first entity, the first association relationship and the second entity, a response knowledge graph is generated; the response knowledge graph includes a first node corresponding to the first entity, a second node corresponding to the second entity, and a first edge corresponding to the first association relationship, the first edge connecting the first node and the second node.

[0086] Optionally, in response to receiving the operation to view the second node, the terminal device displays at least one third node connected to the second node in the reply knowledge graph; wherein the third node corresponds to a third entity; the third entity has an association relationship with the second entity, or the third entity has a first association relationship with the second entity.

[0087] In another optional embodiment, the response content includes response text; the terminal device invokes a query statement to query the first entity and the second entity corresponding to the first association relationship based on the fault knowledge graph; and invokes a large language model to generate the response text of the user's query statement based on the second entity.

[0088] For example, such as Figure 5As shown, this embodiment provides a diagnostic system for new energy vehicles. The system includes a data acquisition module 401, a knowledge graph construction module 402, a knowledge graph question-and-answer module 403, and an application service module 404. The data acquisition module 401 collects experiential data, such as maintenance data, maintenance cases, expert information, and technical data for new energy vehicles, and provides this experiential data to the knowledge graph construction module to construct a fault indication graph. The knowledge graph construction module 402 extracts entities and relationships from the experiential data, merges similar entities, and generates a fault knowledge graph. The application service module 404 displays the diagnostic page of the new energy vehicle and shows the fault knowledge graph. When a user enters a query on the diagnostic page, the application service module 404 calls the knowledge graph question-and-answer module 403 to parse the query and return the corresponding response. The knowledge graph question-and-answer module 403 identifies the entities and relationships in the user's query, queries the corresponding entities based on the fault knowledge graph constructed by the knowledge graph construction module 402, generates a response based on the entity, and returns it to the application service module 404.

[0089] In summary, the method provided in this embodiment generates a fault knowledge graph based on experience data from new energy vehicle diagnosis. Knowledge graph technology is used to extract and utilize knowledge from unstructured experience data such as repair cases. Based on the inquiries from repair personnel, the diagnostic system can quickly match diagnostic results from the fault knowledge graph and provide feedback to the repair personnel in various ways. For example, it can provide feedback knowledge graphs to repair personnel, visually presenting the diagnostic knowledge of new energy vehicles in the form of a knowledge graph, facilitating quick identification of fault causes and solutions, effectively assisting repair personnel in troubleshooting and repair work, and improving repair efficiency.

[0090] An exemplary embodiment for constructing a fault knowledge graph is provided.

[0091] Figure 6 This is a schematic flowchart illustrating a diagnostic method for new energy vehicles provided in an exemplary embodiment of this application. This method can be used for, for example... Figure 1 The terminal device shown. Based on Figure 2 In the illustrated embodiment, step 210 may include steps 211 to 213.

[0092] Step 211: Invoke the entity relationship extraction model to extract at least one triple from the empirical data; the triple includes two entities that have a relationship, and the relationship between the two entities.

[0093] In one optional embodiment, the terminal device can crawl experience data such as maintenance data and technical documents of new energy vehicles; use regularization and manual assistance to filter the experience data, retaining the experience data of the high-voltage system of new energy vehicles and deleting other irrelevant data. Then, data cleaning and organization are performed to obtain a large amount of complete experience data on the high-voltage system of new energy vehicles. Pointers are used to label entities and relationships in the experience data. The labeled experience data is then divided into training, validation, and test sets. Based on the training, validation, and test sets, the joint entity-relationship model is trained and tested.

[0094] Entity relation extraction model is a neural network model that extracts triples (entity, relation, entity) from input data (empirical data).

[0095] For example, such as Figure 7 As shown, the entity relation extraction model can adopt a RoBERTa-wwm-BiLSTM-GlobalPointer network structure, meaning the model consists of a sequentially connected RoBERTa-wwm network, a BiLSTM network, and a GlobalPointer network. The model is trained using training and validation sets. A pre-trained RoBERTa-wwm language model is used to obtain the vector representation of the input text, which is then fine-tuned with a small amount of labeled corpus to obtain dynamic character vectors. A BiLSTM network is then used to further extract text features, and finally, a GlobalPointer network is employed to complete the decoding task.

[0096] Furthermore, an adversarial training mechanism is introduced to address the overfitting issue that the model is prone to on small sample datasets, thereby improving the model's robustness and generalization ability. For example... Figure 7 As shown, in the adversarial training layer 804, perturbation is added to the output of the embedding layer. The perturbed data is then input into the feature extraction layer for feature extraction, so that the model outputs the perturbed prediction result. Based on the perturbed prediction result, the loss function is calculated to train the model parameters, thereby improving the robustness of the model.

[0097] For example, empirical data is input into the entity relationship extraction model, which outputs an entity relationship matrix 803 and an entity location matrix 802. Figure 8As shown, in the entity position matrix 802, the start and end positions of each entity in the empirical data are marked. For example, if “X brand” is an entity, then the value of the first row and second column of the entity position matrix is ​​1. The first row is the position of the first character of the entity in the empirical data (the first character), and the second column is the position of the last character of the entity in the empirical data (the second character). As another example, if “A car” is an entity, then the value of the third row and fourth column of the entity position matrix is ​​1. The third row represents the position of the first character of the entity in the empirical data (the third character), and the fourth column represents the position of the last character of the entity in the empirical data (the fourth character).

[0098] like Figure 8 As shown, in entity relation matrix 803, the subject and object of two entities with a relationship in the empirical data are labeled. When the subject comes first, a 1 is marked in the corresponding position in the upper right corner of the entity relation matrix 803; when the subject comes second, a 1 is marked in the corresponding position in the lower left corner of the entity relation matrix 803. For example, Figure 8 There exists a triple (Car A, Belongs to, Brand X), where Car A is the subject and Brand X is the object. In the empirical data "Car A of Brand X cannot be charged," the subject follows the object, which is indicated by the index 1 in the first column of the third row and the index 1 in the second column of the fourth row in entity relation matrix 803. The index 1 in the first column of the third row indicates the starting positions of the two entities are the first and third characters respectively, and the index 1 in the second column of the fourth row indicates the ending positions of the two entities are the second and fourth characters respectively. Since the two 1s are located in the lower left corner of entity relation matrix 803, it indicates that the subject comes after the object. However, from... Figure 8 As can be seen, the entity relation matrix 803 is abnormally sparse, which will lead to memory waste. Therefore, mapping the lower left matrix (lower left triangular matrix) to the upper right matrix, and marking the position of the value 1 as 2, indicating that the subject is after the object, we can obtain the following... Figure 8 The entity relationship matrix 803 shown is shown.

[0099] After training, save the trained entity relation extraction model. Test the trained entity relation extraction model using a test set to ensure that the trained entity relation extraction model can achieve good results. Then, use the trained and tested entity relation extraction model to extract triples from the remaining empirical data to complete the extraction of all triples.

[0100] Step 212: Merge entities with similarity higher than a threshold in at least one triplet to obtain a merged set of triplets.

[0101] Taking a triplet that includes a fourth entity and a fifth entity as an example; the terminal device calculates the text similarity between the fourth entity and the fifth entity; calculates the semantic similarity between the fourth entity and the fifth entity; calculates the weighted sum of the text similarity and the semantic similarity; if the weighted sum is higher than a threshold, the fourth entity and the fifth entity are merged.

[0102] For example, cosine similarity is calculated as text similarity, and Jaccard similarity is calculated as semantic similarity. Based on a pre-set threshold, entities with similarity greater than the threshold are merged, and entities with the same similarity are stored in a thesaurus.

[0103] For example, the cosine similarity and Jaccard similarity between the fourth entity A and the fifth entity B are calculated separately. The weight of text similarity (cosine similarity) is set to 0.4, and the weight of semantic similarity (Jaccard similarity) is set to 0.6. The two similarities are then weighted to obtain the final entity similarity, which is calculated as follows: Sim(A,B)=0.4*Simj(A,B)+0.6*Simc(A,B).

[0104] Where Simj(A,B) is the Jaccard similarity, i.e., semantic similarity. Simc(A,B) is the cosine similarity, i.e., textual similarity. Sim(A,B) is the final similarity score.

[0105] The cosine similarity is calculated as: Simc(A,B)=(A·B) / (||A||*||B||).

[0106] Here, A and B are the word frequency vectors of two texts, A·B is the dot product of the vectors, and ||A|| and ||B|| are the magnitudes (i.e. the lengths of the vectors) of vectors A and B, respectively.

[0107] For example, A and B are respectively: A: "The weather is really nice today, and it will be the same tomorrow"; B: "The weather is not bad today, and it will be the same tomorrow." After word segmentation, stop word removal, and word frequency statistics, the word frequency vector is obtained:

[0108] A = [1,2,1,1,1,1,0] (corresponding terms: today, weather, great, tomorrow, also, same, not bad);

[0109] B = [1,1,0,1,1,1,1].

[0110] Then, the dot product and modulus are calculated, and finally, the cosine similarity is obtained as follows: (1×1+2×1+1×0+1×1+1×1+1×1+0×1) / (√(12+12+12+02+12+12+12))=6 / (√10×√6)≈0.816. Since the cosine value is close to 1, it can be determined that A and B are similar.

[0111] The Jaccard similarity is calculated as follows: Simj(A,B)=|A∩B| / |A∪B|.

[0112] Where A and B represent the word sets of two texts, |A∩B| represents the size of the intersection of the two sets, and |A∪B| represents the size of the union of the two sets.

[0113] Suppose we have two texts: Text A: "The weather is really nice today"; Text B: "The weather will be nice tomorrow too." After word segmentation and deduplication, we obtain the following word set:

[0114] A = {Today, the weather is nice};

[0115] B = {Tomorrow, the weather will be nice}.

[0116] Calculate the intersection and union:

[0117] A ∩ B = {Weather} (shared term);

[0118] A ∪ B = {Today, the weather is nice, tomorrow will be good too} (the merged set of terms).

[0119] Therefore, the Jaccard similarity is |A∩B| / |A∪B| = 1 / 5 = 0.2. Since the Jaccard correlation coefficient is relatively small, it can be determined that text A and text B have low similarity.

[0120] Step 213: Based on the set of triples, construct a fault knowledge graph by using the entities in the triples as nodes and the relationships as edges connecting the nodes.

[0121] For example, the set of triples can be imported into the Neo4j graph database to construct a fault knowledge graph for new energy vehicles.

[0122] In summary, the method provided in this embodiment can invoke an entity relation extraction model to extract triples from empirical data, merge identical entities in the triples based on similarity calculation, and construct a fault knowledge graph based on the merged triples. This facilitates maintenance personnel in quickly identifying fault causes and solutions from the fault knowledge graph, effectively assisting them in troubleshooting and repair work, and improving maintenance efficiency.

[0123] An exemplary embodiment for identifying entities and relationships from user queries is provided.

[0124] For example, an automatic question-answering function can be built. This function aims to transform a user's question into a query statement with the same semantics, query the fault knowledge graph, and output the answer. For example... Figure 9As shown, the process includes entity recognition 501, entity matching 502, and intent classification 503.

[0125] Entity recognition 501 refers to identifying keywords (entities) from user-input queries, such as fault symptoms or fault codes. The obtained keywords are also called query entities. The entity recognition task requires accurately identifying the start and end positions of the query entity (its position within the user query) and determining the entity category to which it belongs.

[0126] Entity matching (502) aims to accurately match the query entities identified in a user query to entities in the fault knowledge graph. Because standard entities in the fault knowledge graph may have multiple aliases, a query entity may not necessarily be found in the graph. For example, querying the entities "electric control" and "motor controller" may have different expressions, but the same meaning. The significance of entity matching lies in its ability to match the query entity "electric control" with the entity "motor controller" in the fault knowledge graph and return relevant content for "motor controller".

[0127] The purpose of intent classification (503) is to identify the intent of user queries, i.e., to classify relationships. After linking to an entity, the corresponding triples for that entity can be queried. However, there may be more than one triple associated with the entity, so it is necessary to determine whether there is a triple related to the user's intent. Figure 1 For example, given the question "Why does the instrument panel report EV function limitation?", the question-answering system needs to use intent classification 503 to determine that the intent of the question is to query the cause of the fault of the entity "instrument panel reports EV function limitation".

[0128] For example, such as Figure 10 As shown, when the user query 504 is "Why is the power limit indicator light on the instrument panel lit?", entity recognition 501 and entity matching 502 are performed on the user query to obtain the entity "power limit indicator light lit" corresponding to the query entity "power limit indicator light lit" in the fault knowledge graph. Intent classification 503 is performed on the user query 504 to obtain its corresponding association as the cause of the fault. Based on the identified entities and associations, a Cypher query 505 can be used to query the knowledge that the maintenance personnel expect to obtain from the fault knowledge graph, resulting in the response content "motor / electric water pump fault, motor fault". Optional, such as... Figure 11As shown, the response content can be displayed in the form of a knowledge graph, specifically, the response knowledge graph 506. This graph can display the first entity at the visual focal point and radiate outwards to display at least one second entity. Users can click on nodes or edges in the response knowledge graph to view information related to that node or edge. For example, clicking on a node corresponding to a second entity will display nodes corresponding to at least one entity connected to that second entity.

[0129] Figure 12 This is a schematic flowchart illustrating a diagnostic method for new energy vehicles provided in an exemplary embodiment of this application. This method can be used for, for example... Figure 1 The terminal device shown. Based on Figure 2 In the illustrated embodiment, step 220 may include steps 221 to 224.

[0130] Step 211: Call the entity recognition model to identify the query entities in the user query statement; the entity recognition model is used to output the entities contained in the user query statement, the entity type of the entity, and the location of the entity.

[0131] An entity recognition model is a neural network model trained to extract query entities from user queries. An entity recognition model can output the text of the query entity, its entity type, and the starting position of the query entity in the user query.

[0132] The model structure of an entity recognition model can be arbitrary. For example, an entity recognition model can be an ALBERT-GlobalPointer model, that is, an entity recognition model that includes an ALBERT network and a GlobalPointer network.

[0133] Step 222: Call the relation classification model to output the first association corresponding to the user's query statement; the relation classification model is used to output the association type corresponding to the query intent of the user's query statement.

[0134] A relation classification model is a neural network model trained to output the corresponding relation type based on the user's query intent. The model structure of a relation classification model can be arbitrary; for example, it can be an ALBERT-TextCNN model, meaning it combines the ALBERT and TextCNN networks.

[0135] For example, the training process for the entity recognition model and the relation classification model is as follows. First, the training datasets for the entity recognition model and the relation classification model are constructed. Based on the entities and relationships in the triples extracted from the empirical data in step 210, a partial question corpus is generated to simulate the way maintenance personnel ask questions. This question corpus is then expanded to obtain sufficient question corpus. Using a Python algorithm, the question corpus is further expanded by adding auxiliary verbs, modifiers, and adjuncts, performing synonym replacement, and reconstructing sentence structures. Finally, the entities and relationships in the question corpus are labeled using a Python algorithm to obtain the question entity recognition dataset and the relation classification dataset.

[0136] Subsequently, the entity recognition model and the relation classification model were trained. The question entity recognition dataset and the relation classification dataset were divided into training, validation, and test sets in an 8:1:1 ratio, respectively. Training and testing were performed using the question entity recognition dataset as follows: Figure 13 The ALBERT-GlobalPointer model shown is used, and the trained and tested ALBERT-GlobalPointer models are saved to obtain the entity recognition model. This entity recognition model uses the ALBERT network to obtain the embedding representation 602 based on the input data 601 (user query statement), and uses the GlobalPointer network to output the entity prediction result 603 based on the embedding representation 602. The entity prediction result 603 includes the query entities contained in the user query statement.

[0137] Training and testing using a relation classification dataset, such as... Figure 14 The ALBERT-TextCNN model shown is used, and the trained and tested ALBERT-TextCNN models are saved to obtain a relation classification model. This relation classification model uses the ALBERT network to obtain an embedding representation based on the user's query statement. Then, it passes through a convolutional layer 701, a pooling layer 702, a fully connected layer 703, and a normalization function 704 to perform classification prediction based on the embedding representation, thereby obtaining the relation type corresponding to the user's query statement.

[0138] Step 223: Calculate the similarity score between the query entity and the candidate entities in the fault knowledge graph.

[0139] For each query entity in the user's query statement, the terminal device calculates the similarity score between that query entity and each candidate entity in the fault knowledge graph.

[0140] For example, the terminal device calculates the entity similarity score between the query entity and the candidate entities; calculates the statement similarity score between the user query and the candidate entities; and determines the similarity score by weighting the entity similarity score and the statement similarity score. The entity similarity score is used to indicate the similarity between the entity text of the query entity and the candidate entities, and the statement similarity score is used to indicate the similarity between the user query and the candidate entities.

[0141] Step 224: The first entity with the highest similarity score among the candidate entities is identified as the entity corresponding to the query entity.

[0142] For example, word matching can be used to match query entities with candidate entities in the fault knowledge graph. The score is calculated as: score = α*(2|X∩Y| / (|X|+|Y|-|X∩Y|)) + β*(2|X∩S| / (|X|+|S|-|X∩S|)).

[0143] Where X is the candidate entity, Y is the query entity, S is the user query statement, α and β are parameters, taking values ​​of 0.8 and 0.2 respectively, "a∩b" represents the common characters of a and b, and |*| represents the number of characters. (2|X∩Y| / (|X|+|Y|-|X∩Y|)) is the entity similarity score, and (2|X∩S| / (|X|+|S|-|X∩S|)) is the statement similarity score.

[0144] Calculate the scores for each candidate entity and sort them in descending order. Select the candidate entity with the highest score as the entity that matches the query entity.

[0145] In summary, the method provided in this embodiment can perform entity and relationship recognition on user queries, extracting entities and related relationships from the queries to retrieve diagnostic results from the fault knowledge graph based on these entities and relationships. This facilitates maintenance personnel in quickly identifying fault causes and solutions from the fault knowledge graph, effectively assisting them in troubleshooting and repair work, and improving maintenance efficiency.

[0146] This application provides a knowledge graph-based auxiliary diagnostic method and system for new energy vehicles to address the difficulties in troubleshooting and repairing new energy vehicles. This method can make basic judgments about the causes of faults based on the fault phenomena and fault codes of new energy vehicles; it can also provide more accurate automatic question-and-answer services and knowledge graph visualization functions during the fault diagnosis and repair process for maintenance personnel.

[0147] First, based on ontology reuse and expert knowledge from the automotive repair field, a fault knowledge graph for new energy vehicles is constructed. This process may include the following steps:

[0148] S1. Obtain new energy vehicle repair cases, perform preprocessing and data annotation to obtain deep learning training corpus, and divide it into training set, validation set and test set;

[0149] S2. Based on the training set, validation set, and test set, complete the training and testing of the entity relation extraction model;

[0150] S3. After completing S1 and S2, use the entity relation joint extraction model completed by training and testing to extract triples from the remaining corpus, complete the extraction of all triples in the corpus, and obtain the triple set.

[0151] S4. Combine cosine similarity and Jaccard correlation coefficient to calculate text similarity and semantic similarity. Set a threshold in advance, merge entities with similarity greater than the set threshold, and store the same entity in the synonym entity library.

[0152] S5. Import the set of triples obtained in S3 into the Neo4j graph database to construct a knowledge graph of faults in new energy vehicles.

[0153] The knowledge graph for new energy vehicle faults includes entities and relationships. Entities include brand, model, fault phenomenon, fault cause, solution, fault code, fault code meaning, and component unit. Relationships include belonging to, phenomenon occurring, triggering, causing, location, measure, reporting, and meaning.

[0154] Secondly, an automatic question-answering and graph visualization service is provided, which includes the following steps.

[0155] S6. Construct training datasets for entity recognition and relationship classification models;

[0156] S7. Train the entity recognition model and the relationship classification model;

[0157] S8. Based on the thesaurus entity library obtained in S4, entity links are implemented by word matching.

[0158] S9. Based on the entity recognition model and relationship classification model obtained in S7, and using the entity linking method proposed in S8, an automatic question answering module is built.

[0159] S10. Construct a knowledge graph-based auxiliary diagnostic system for new energy vehicles.

[0160] For example, the embodiments of this application use the entity relation joint extraction method to realize the one-step extraction of knowledge triples, which solves the problems of error accumulation and low degree of automation construction; it provides automatic question answering and graph visualization functions, and maintenance personnel can interact with the auxiliary maintenance system through text and language, which improves work efficiency and reduces the difficulty of maintenance personnel's work.

[0161] It should be noted that this application may display prompt interfaces, pop-ups, or output voice prompts before and during the collection of user data. These prompt interfaces, pop-ups, or voice prompts are used to inform the user that their data is being collected. This ensures that the application only begins the steps for collecting user data after receiving confirmation from the user regarding the prompt interface or pop-up; otherwise (i.e., without user confirmation), the steps for collecting user data end, meaning no user data is collected. In other words, all user data collected in this application is collected with the user's consent and authorization, and the collection, use, and processing of related user data must comply with the relevant laws, regulations, and standards of the relevant countries and regions.

[0162] It should be noted that the order of the method steps provided in the embodiments of this application can be appropriately adjusted, and the steps can also be added or removed as appropriate. Any method variations that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application, and therefore will not be elaborated further.

[0163] Figure 15 This is a schematic diagram of the structure of a diagnostic device for a new energy vehicle provided in an exemplary embodiment of this application. The device includes:

[0164] The knowledge graph module 1001 is used to obtain a fault knowledge graph, which is constructed based on triples in the experience data of the new energy vehicle, and the triples are used to indicate the relationship between entities in the experience data.

[0165] The identification module 1002 is used to identify the first entity in the user's query statement and the first association relationship corresponding to the query intent of the user's query statement;

[0166] The generation module 1003 is used to generate the response content of the user query statement based on the second entity, the second entity including the entity in the fault knowledge graph that has the first association relationship with the first entity.

[0167] In one optional embodiment, the response content includes a response knowledge graph;

[0168] The generation module 1003 is used to call a query statement to query the first entity and the second entity corresponding to the first association relationship based on the fault knowledge graph;

[0169] The generation module 1003 is used to generate the response knowledge graph based on the first entity, the first association relationship, and the second entity; the response knowledge graph includes a first node corresponding to the first entity, a second node corresponding to the second entity, and a first edge corresponding to the first association relationship, wherein the first edge connects the first node and the second node.

[0170] In one optional embodiment, the response content includes response text;

[0171] The generation module 1003 is used to call a query statement to query the first entity and the second entity corresponding to the first association relationship based on the fault knowledge graph;

[0172] The generation module 1003 is used to call the large language model and generate the response text of the user query statement based on the second entity.

[0173] In an optional embodiment, the generation module 1003 is configured to, in response to receiving an operation to view the second node, display at least one third node connected to the second node in the response knowledge graph;

[0174] Wherein, the third node corresponds to the third entity; the third entity has an association relationship with the second entity, or the third entity has the first association relationship with the second entity.

[0175] In one optional embodiment, the entity includes at least one of the following entity types: vehicle brand, vehicle model, fault phenomenon, fault cause, solution, component unit, fault code, and fault code meaning.

[0176] In one optional embodiment, the association relationship includes at least one of the following association relationship types:

[0177] The attribution relationship between vehicle model and vehicle brand;

[0178] The relationship between the vehicle model and the occurrence of the fault phenomenon;

[0179] The causal relationship between the cause of the fault and the described fault phenomenon;

[0180] The cause of the failure and the causal relationship between the cause of the failure;

[0181] The relationship between the causes of the fault and the measures taken by the solution device;

[0182] The referencing relationship between the cause of the fault and the fault code;

[0183] The semantic relationship between the fault codes and their meanings;

[0184] The solution positional relationship between the solution device and the component unit;

[0185] The relationship between the cause of the fault and the location of the fault in the component unit;

[0186] The relationship between the component unit and the alias of the component unit;

[0187] The compositional relationship between the component units.

[0188] In an optional embodiment, the knowledge graph module 1001 is used to invoke an entity relationship extraction model to extract at least one triple from the experience data; the triple includes two entities that have an association relationship, and the association relationship between the two entities;

[0189] The knowledge graph module 1001 is used to merge entities with similarity higher than a threshold in the at least one triplet to obtain a merged triplet set.

[0190] The knowledge graph module 1001 is used to construct the fault knowledge graph based on the set of triples, using the entities in the triples as nodes and the association relationships as edges connecting the nodes.

[0191] In one alternative embodiment, the at least one triple includes a fourth entity and a fifth entity;

[0192] The knowledge graph module 1001 is used to calculate the text similarity between the fourth entity and the fifth entity;

[0193] The knowledge graph module 1001 is used to calculate the semantic similarity between the fourth entity and the fifth entity;

[0194] The knowledge graph module 1001 is used to calculate the weighted sum of the text similarity and the semantic similarity;

[0195] The knowledge graph module 1001 is used to merge the fourth entity and the fifth entity when the weighted sum is higher than a threshold.

[0196] In an optional embodiment, the identification module 1002 is used to call an entity recognition model to identify the query entity in the user query statement; the entity recognition model is used to output the entity contained in the user query statement, the entity type of the entity, and the location of the entity;

[0197] The identification module 1002 is used to call the relationship classification model to output the first association relationship corresponding to the user's query statement; the relationship classification model is used to output the association relationship type corresponding to the query intent of the user's query statement;

[0198] The identification module 1002 is used to sequentially calculate the similarity score between the query entity and the candidate entities in the fault knowledge graph;

[0199] The identification module 1002 is used to identify the first entity with the highest similarity score among the candidate entities as the entity corresponding to the query entity.

[0200] In an optional embodiment, the identification module 1002 is used to calculate the entity similarity score between the query entity and the candidate entity;

[0201] The identification module 1002 is used to calculate the statement similarity score between the user query statement and the candidate entity;

[0202] The identification module 1002 is used to determine the similarity score by weighting the entity similarity score and the statement similarity score.

[0203] It should be noted that the diagnostic device for new energy vehicles provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the diagnostic device for new energy vehicles provided in the above embodiments and the diagnostic method embodiments for new energy vehicles belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0204] Embodiments of this application also provide a computer device, comprising: a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement the diagnostic method for new energy vehicles provided in the above-described method embodiments. This computer device can be implemented as a terminal.

[0205] For example, Figure 16 This is a schematic diagram of the structure of a computer device provided in an exemplary embodiment of this application.

[0206] Typically, computer device 1700 includes a processor 1701 and a memory 1702.

[0207] Processor 1701 may include one or more processing cores, such as a quad-core processor, an octa-core processor, etc. Processor 1701 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 1701 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 1701 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content required to be displayed on the screen. In some embodiments, processor 1701 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.

[0208] The memory 1702 may include one or more computer-readable storage media, which may be non-transitory. The memory 1702 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 1702 is used to store at least one instruction, which is executed by the processor 1701 to implement the diagnostic method for new energy vehicles provided in the method embodiments of this application.

[0209] In some embodiments, the computer device 1700 may also optionally include a peripheral device interface 1703 and at least one peripheral device. The processor 1701, memory 1702, and peripheral device interface 1703 can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface 1703 via a bus, signal line, or circuit board. Specifically, the peripheral device includes at least one of the following: a radio frequency circuit 1704, a display screen 1705, a camera assembly 1706, an audio circuit 1707, and a power supply 1708.

[0210] Peripheral device interface 1703 can be used to connect at least one I / O (Input / Output) related peripheral device to processor 1701 and memory 1702. In some embodiments, processor 1701, memory 1702 and peripheral device interface 1703 are integrated on the same chip or circuit board; in some other embodiments, any one or two of processor 1701, memory 1702 and peripheral device interface 1703 can be implemented on separate chips or circuit boards, and this application embodiment is not limited in this respect.

[0211] The radio frequency (RF) circuit 1704 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The RF circuit 1704 communicates with communication networks and other communication devices via electromagnetic signals. The RF circuit 1704 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals back into electrical signals. Optionally, the RF circuit 1704 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The RF circuit 1704 can communicate with other computer devices via at least one wireless communication protocol. This wireless communication protocol includes, but is not limited to: the World Wide Web, metropolitan area networks, intranets, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or WiFi (Wireless Fidelity) networks. In some embodiments, the RF circuit 1704 may also include circuitry related to NFC (Near Field Communication), which is not limited in this application.

[0212] Display screen 1705 is used to display a UI (User Interface). This UI may include graphics, text, icons, videos, and any combination thereof. When display screen 1705 is a touch display screen, it also has the ability to collect touch signals on or above its surface. These touch signals can be input as control signals to processor 1701 for processing. In this case, display screen 1705 can also be used to provide virtual buttons and / or a virtual keyboard, also known as soft buttons and / or a soft keyboard. In some embodiments, there may be one display screen 1705, positioned on the front panel of computer device 1700; in other embodiments, there may be at least two display screens 1705, respectively positioned on different surfaces of computer device 1700 or in a folded design; in still other embodiments, display screen 1705 may be a flexible display screen, positioned on a curved or folded surface of computer device 1700. Furthermore, display screen 1705 may also be configured as a non-rectangular, irregular shape, i.e., a non-rectangular screen. The display screen 1705 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0213] The camera assembly 1706 is used to acquire images or videos. Optionally, the camera assembly 1706 includes a front-facing camera and a rear-facing camera. Typically, the front-facing camera is located on the front panel of the computer device 1700, and the rear-facing camera is located on the back of the computer device. In some embodiments, there are at least two rear-facing cameras, which are any one of a main camera, a depth-sensing camera, a wide-angle camera, and a telephoto camera, to achieve background blurring by fusion of the main camera and the depth-sensing camera, panoramic shooting by fusion of the main camera and the wide-angle camera, VR (Virtual Reality) shooting, or other fusion shooting functions. In some embodiments, the camera assembly 1706 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cool light flash, which can be used for light compensation at different color temperatures.

[0214] The audio circuit 1707 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, converting them into electrical signals that are input to the processor 1701 for processing, or to the radio frequency circuit 1704 for voice communication. For stereo sound acquisition or noise reduction purposes, multiple microphones may be used, positioned at different locations within the computer device 1700. The microphone may also be an array microphone or an omnidirectional microphone. The speaker is used to convert electrical signals from the processor 1701 or the radio frequency circuit 1704 into sound waves. The speaker may be a conventional diaphragm speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can convert electrical signals not only into audible sound waves but also into inaudible sound waves for purposes such as distance measurement. In some embodiments, the audio circuit 1707 may also include a headphone jack.

[0215] Power supply 1708 is used to supply power to the various components in computer device 1700. Power supply 1708 can be AC ​​power, DC power, a disposable battery, or a rechargeable battery. When power supply 1708 includes a rechargeable battery, the rechargeable battery can be a wired rechargeable battery or a wireless rechargeable battery. A wired rechargeable battery is a battery that is charged via a wired line, and a wireless rechargeable battery is a battery that is charged via a wireless coil. The rechargeable battery can also be used to support fast charging technology.

[0216] In some embodiments, the computer device 1700 further includes one or more sensors 1709. The one or more sensors 1709 include, but are not limited to, an accelerometer 1710, a gyroscope 1711, a pressure sensor 1712, an optical sensor 1713, and a proximity sensor 1714.

[0217] Accelerometer 1710 can detect the magnitude of acceleration along the three coordinate axes of a coordinate system established by computer device 1700. For example, accelerometer 1710 can be used to detect the components of gravitational acceleration along the three coordinate axes. Processor 1701 can control touchscreen display 1705 to display the user interface in landscape or portrait view based on the gravitational acceleration signal acquired by accelerometer 1710. Accelerometer 1710 can also be used for games or for acquiring user motion data.

[0218] The gyroscope sensor 1711 can detect the orientation and rotation angle of the computer device 1700. The gyroscope sensor 1711 can work in conjunction with the accelerometer sensor 1710 to acquire 3D motion data from the user on the computer device 1700. Based on the data acquired by the gyroscope sensor 1711, the processor 1701 can perform the following functions: motion sensing (e.g., changing the UI based on the user's tilt), image stabilization during shooting, game control, and inertial navigation.

[0219] Pressure sensor 1712 can be disposed on the side bezel of computer device 1700 and / or on the lower layer of touch display screen 1705. When pressure sensor 1712 is disposed on the side bezel of computer device 1700, it can detect the user's grip signal on computer device 1700, and processor 1701 can perform left / right hand recognition or quick operation based on the grip signal collected by pressure sensor 1712. When pressure sensor 1712 is disposed on the lower layer of touch display screen 1705, processor 1701 can control operable controls on the UI interface based on the user's pressure operation on touch display screen 1705. Operable controls include at least one of button controls, scroll bar controls, icon controls, and menu controls.

[0220] Optical sensor 1713 is used to collect ambient light intensity. In one embodiment, processor 1701 can control the display brightness of touch display screen 1705 based on the ambient light intensity collected by optical sensor 1713. Specifically, when the ambient light intensity is high, the display brightness of touch display screen 1705 is increased; when the ambient light intensity is low, the display brightness of touch display screen 1705 is decreased. In another embodiment, processor 1701 can also dynamically adjust the shooting parameters of camera assembly 1706 based on the ambient light intensity collected by optical sensor 1713.

[0221] The proximity sensor 1714, also known as a distance sensor, is typically located on the front panel of the computer device 1700. The proximity sensor 1714 is used to detect the distance between the user and the front of the computer device 1700. In one embodiment, when the proximity sensor 1714 detects that the distance between the user and the front of the computer device 1700 is gradually decreasing, the processor 1701 controls the touch display screen 1705 to switch from a screen-on state to a screen-off state; when the proximity sensor 1714 detects that the distance between the user and the front of the computer device 1700 is gradually increasing, the processor 1701 controls the touch display screen 1705 to switch from a screen-off state to a screen-on state.

[0222] Those skilled in the art will understand that Figure 16 The structure shown does not constitute a limitation on the computer device 1700, and may include more or fewer components than shown, or combine certain components, or use different component arrangements.

[0223] This application also provides a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set. When the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor of a computer device, the diagnostic method for new energy vehicles provided in the above-described method embodiments is implemented.

[0224] This application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the diagnostic methods for new energy vehicles provided in the above-described method embodiments.

[0225] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0226] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent switching, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A diagnosis method of a new energy vehicle, characterized in that, The method comprises: acquiring a fault knowledge graph, the fault knowledge graph being constructed based on triples in experience data of the new energy vehicle, the triples being used to indicate association relationships between entities in the experience data; calling an entity recognition model to recognize an inquiry entity in a user inquiry sentence; the entity recognition model being used to output an entity contained in the user inquiry sentence, an entity type of the entity, and a position of the entity; calling a relationship classification model to output a first association relationship corresponding to the user inquiry sentence; the relationship classification model being used to output an association relationship type corresponding to an inquiry intention of the user inquiry sentence; successively calculating similarity scores of the inquiry entity and candidate entities in the fault knowledge graph, including: calculating an entity similarity score of the inquiry entity and the candidate entities; calculating a sentence similarity score of the user inquiry sentence and the candidate entities; and determining a weighted sum of the entity similarity score and the sentence similarity score as the similarity score; determining a first entity with the highest similarity score among the candidate entities as an entity corresponding to the inquiry entity, including: realizing matching of the inquiry entity and the candidate entities in the fault knowledge graph in a word matching manner; the similarity score = a * (2|X∩Y| / (|X|+|Y|-|X∩Y|))+β*(2|X∩S| / (|X|+|S|-|X∩S|)); wherein X is the candidate entity, Y is the inquiry entity, S is the user inquiry sentence, a and β are parameters, and a and β are respectively 0.8 and 0.2, a∩b represents common characters of a and b, |*| represents the number of characters, (2|X∩Y| / (|X|+|Y|-|X∩Y|)) is an entity similarity score, and (2|X∩S| / (|X|+|S|-|X∩S|)) is a sentence similarity score; generating reply content of the user inquiry sentence according to a second entity, the second entity including an entity in the fault knowledge graph that has the first association relationship with the first entity; wherein the reply content includes a reply knowledge graph; and the generating of the reply content of the user inquiry sentence according to the second entity comprises: calling a query statement to query the second entity corresponding to the first entity and the first association relationship based on the fault knowledge graph; generating the reply knowledge graph based on the first entity, the first association relationship, and the second entity; the reply knowledge graph including a first node corresponding to the first entity, a second node corresponding to the second entity, and a first edge corresponding to the first association relationship, the first edge connecting the first node and the second node; and the reply knowledge graph being obtained by intercepting the first entity, the first association relationship, and the second entity from the fault knowledge graph.

2. The method of claim 1, wherein, the reply content includes reply text; the generating of the reply content of the user inquiry sentence according to the second entity comprises: calling a query statement to query the second entity corresponding to the first entity and the first association relationship based on the fault knowledge graph; Call a large language model to generate reply text of the user inquiry statement based on the second entity.

3. The method of claim 1, wherein, The method further includes: In response to receiving the operation of viewing the second node, displaying at least one third node connected with the second node in the reply knowledge graph; The third node corresponds to a third entity; the third entity has an association relationship with the second entity, or the third entity has the first association relationship with the second entity.

4. The method according to any one of claims 1 to 3, characterized in that, The entity includes at least one of the following entity types: vehicle brand, vehicle model, fault phenomenon, fault cause, solution, component unit, fault code, and fault code meaning.

5. The method according to any one of claims 1 to 3, characterized in that, The association relationship includes at least one of the following association relationship types: An ownership relationship between a vehicle model and a vehicle brand; An occurrence relationship between the vehicle model and the fault phenomenon; An initiation relationship between the fault cause and the fault phenomenon; A cause relationship between the fault causes; A measure relationship between the fault cause and the solution; A report relationship between the fault cause and the fault code; A meaning relationship between the fault code and the fault code meaning; A solution location relationship between the solution and the component unit; A fault location relationship between the fault cause and the component unit; An alias relationship between the component units; A composition relationship between the component units.

6. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Calling an entity relationship extraction model to extract at least one triple from the experience data; the triple includes two entities having an association relationship and the association relationship between the two entities; Merging entities in the at least one triple with a similarity higher than a threshold to obtain a merged triple set; Based on the triple set, taking the entities in the triple as nodes and the association relationship as edges connecting the nodes to construct the fault knowledge graph.

7. The method of claim 6, wherein, The at least one triple includes a fourth entity and a fifth entity; The merging of the entities in the at least one triple with a similarity higher than a threshold includes: Calculating the text similarity between the fourth entity and the fifth entity; Calculating the semantic similarity between the fourth entity and the fifth entity; Calculating the weighted sum of the text similarity and the semantic similarity; In the case where the weighted sum is higher than a threshold, merging the fourth entity and the fifth entity.

8. A diagnosis device for a new energy vehicle, characterized in that, The device includes: A knowledge graph module configured to acquire a fault knowledge graph, the fault knowledge graph being constructed based on triples in experience data of a new energy vehicle, the triples being used to indicate association relationships between entities in the experience data; An identification module configured to call an entity identification model to identify inquiry entities in a user inquiry statement; the entity identification model being used to output entities contained in the user inquiry statement, entity types of the entities, and positions of the entities; The identification module is configured to call a relationship classification model to output a first association relationship corresponding to the user inquiry statement; the relationship classification model being used to output an association relationship type corresponding to an inquiry intent of the user inquiry statement. The identification module is configured to sequentially calculate similarity scores of the query entity and candidate entities in the fault knowledge graph, including: calculating an entity similarity score of the query entity and the candidate entity; calculating a sentence similarity score of the user query sentence and the candidate entity; and determining a weighted sum of the entity similarity score and the sentence similarity score as the similarity score. The identification module is configured to determine a first entity with the highest similarity score in the candidate entities as an entity corresponding to the query entity, including: matching the query entity and the candidate entities in the fault knowledge graph in a word matching manner; and the similarity score = a * (2|X∩Y| / (|X|+|Y|-|X∩Y|))+b*(2|X∩S| / (|X|+|S|-|X∩S|)); where X is the candidate entity, Y is the query entity, S is the user query sentence, a and b are parameters, and a and b are 0.8 and 0.2, respectively; a∩b represents the common characters of a and b; |*| represents the number of characters; (2|X∩Y| / (|X|+|Y|-|X∩Y|)) is the entity similarity score; and (2|X∩S| / (|X|+|S|-|X∩S|)) is the sentence similarity score. The generation module is configured to generate reply content of the user query sentence according to a second entity, the second entity including an entity in the fault knowledge graph that has the first association relationship with the first entity. The reply content includes a reply knowledge graph; and the generation of the reply content of the user query sentence according to the second entity includes: querying the first entity and the second entity corresponding to the first association relationship based on the fault knowledge graph according to the query sentence; generating the reply knowledge graph based on the first entity, the first association relationship, and the second entity; the reply knowledge graph includes a first node corresponding to the first entity, a second node corresponding to the second entity, and a first edge corresponding to the first association relationship, the first edge connecting the first node and the second node; and the reply knowledge graph is obtained by intercepting the first entity, the first association relationship, and the second entity from the fault knowledge graph.

9. A computer device, comprising: The computer device includes a processor and a memory, and the memory stores at least one program, which is loaded and executed by the processor to implement the new energy vehicle diagnosis method of any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The readable storage medium stores at least one program, which is loaded and executed by the processor to implement the new energy vehicle diagnosis method of any one of claims 1 to 7.

11. A computer program product, characterised in that, The computer program product includes computer instructions stored in a computer readable storage medium, and the processor of the computer device reads the computer instructions from the computer readable storage medium, and the processor executes the computer instructions to make the computer device execute the new energy vehicle diagnosis method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Industrial equipment fault diagnosis method based on knowledge graph

    CN113723632A

  • Vehicle fault diagnosis and prevention method

    CN116414990A

  • Pump equipment fault diagnosis method and device based on knowledge graph

    CN118861308A