Circuit simulation experiment fault analysis and online guidance method based on knowledge graph and collaborative filtering

By constructing a knowledge graph and using the LightGBM algorithm to identify circuit simulation experiment types, combined with collaborative filtering to predict faults, and providing online guidance, the problem of insufficient student understanding in traditional circuit simulation experiment teaching is solved, thus improving the effectiveness of experimental teaching.

CN119181298BActive Publication Date: 2025-11-21BEIJING UNIV OF POSTS & TELECOMM
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411301410.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-18
Publication Date
2025-11-21
Estimated Expiration
2044-09-18

AI Technical Summary

Technical Problem

In traditional circuit simulation experiment teaching models, students' mastery levels vary, and teachers' guidance is limited to the experimental procedure, resulting in students' inability to deeply understand the experimental principles and analyze problems.

Method used

A fault analysis method for circuit simulation experiments based on knowledge graphs and collaborative filtering is constructed. By identifying student operations, the correct steps are recommended and the principle explanation is provided. The LightGBM algorithm is used to identify the experiment type, the collaborative filtering algorithm is used to predict the fault, and online guidance is provided based on the planning knowledge graph.

Benefits of technology

It improved students' experimental skills and theoretical knowledge, ensured the accuracy and comprehensiveness of fault analysis, reduced the burden of experimental guidance, and enhanced learning efficiency and self-learning ability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119181298B_ABST
    Figure CN119181298B_ABST
Patent Text Reader

Abstract

The application discloses a circuit simulation experiment fault analysis and online guidance method based on a knowledge graph and collaborative filtering, and the method comprises the following steps: collecting historical circuit simulation experiment related files, and constructing a circuit simulation experiment fault knowledge graph; manually constructing a circuit simulation experiment planning knowledge graph according to experiment targets, teaching syllabuses and other related information; performing feature extraction on original student circuit simulation experiment operation data to obtain characteristicized student connection operation sample data; establishing a LightGBM algorithm recognition model to recognize the type of the circuit simulation experiment; predicting the circuit simulation experiment fault by using a collaborative filtering algorithm, and providing fault analysis in combination with the knowledge graph; and providing online guidance for students based on the circuit simulation experiment planning knowledge graph. The circuit simulation experiment fault analysis and online guidance method based on the knowledge graph and the collaborative filtering can help students to systematically learn circuit simulation experiments, and ensure the comprehensiveness of experiment content and the consistency of teaching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of experimental teaching, and in particular to a method for fault analysis and online guidance in circuit simulation experiments based on knowledge graphs and collaborative filtering. Background Technology

[0002] With the development of modern educational technology, more and more experimental teaching content is being conducted through online platforms or virtual laboratories. Among them, circuit simulation experiments, as a basic experiment in electronic engineering, physics and other related disciplines, have high application value and practical demand.

[0003] However, in the traditional teaching model of circuit simulation experiments, the experimental procedure is often as follows: 1. The teacher provides experimental guidance documents; 2. Students prepare for the experiment before class; 3. Students perform the experiment according to the experimental procedure in the guidance documents during class; 4. Students record experimental data and complete data analysis and experimental reports. The shortcomings of this model are that different students have varying levels of understanding of the experimental content, and students often simply imitate the experimental process to complete the report. Furthermore, limited by class time and energy, the guidance provided by teachers during the experiment is often limited to helping students complete the experimental procedure, without providing guidance on problem analysis. This results in students failing to develop a deeper understanding of the experimental principles and problem analysis methods.

[0004] Therefore, if an experimental teaching method can be provided that is based on students' knowledge background and provides targeted principle analysis and guidance according to students' experimental operations, it will more effectively help students understand experimental principles, master experimental methods, and improve students' ability to analyze problems. Summary of the Invention

[0005] This invention provides a method for fault analysis and online guidance in circuit simulation experiments based on knowledge graphs and collaborative filtering. It constructs knowledge graphs by summarizing the background knowledge required in circuit simulation experiment courses and the faults that may occur during the experiment. This identifies student operations and the structure of the circuit simulation experiment. During the student's experiment, the method recommends correct experimental steps based on the circuit simulation experiment fault knowledge graph and explains the principles behind possible errors to help students grasp the experimental principles and avoid experimental faults. Furthermore, it provides students with the next experimental plan based on the circuit simulation experiment planning knowledge graph, offering online guidance to improve students' experimental operation skills and theoretical understanding.

[0006] To achieve the above objectives, the specific solution of the present invention is as follows:

[0007] This invention discloses a method for fault analysis and online guidance in circuit simulation experiments based on knowledge graphs and collaborative filtering, specifically including the following steps:

[0008] Step S101: Collect relevant files from historical circuit simulation experiments and construct a circuit simulation experiment fault knowledge graph. First, entity extraction based on the TF-IDF algorithm and open Chinese entity relation extraction based on dependency parsing are used to extract knowledge entities for circuit simulation experiments. Then, the TransR algorithm is used to vectorize the extracted circuit simulation experiment topics and relations. Finally, a circuit simulation experiment fault knowledge graph containing experiment type, fault type, fault cause, fault consequence and solution is constructed, and the OrientDB database is used to store the circuit simulation experiment fault knowledge graph.

[0009] Step S102: The experiment instructor manually constructs a knowledge graph of circuit simulation experiment planning. The experiment objectives, teaching syllabus and various experimental projects designed by the experiment instructor are input into the circuit simulation experiment course. The result is a knowledge graph of circuit simulation experiment planning that includes experiment types, experiment themes, theme-related knowledge and corresponding experiment lists.

[0010] Step S103: Extract features from the original student circuit simulation experiment operation data. First, collect the original student experiment operation data as input. This data includes the type, model and operation information of the experimental instrument. Then, clean the data and use the one-hot encoding method to construct features from the cleaned data. Output the characteristic student connection operation sample data of the circuit simulation experiment.

[0011] Step S104: Establish a LightGBM algorithm recognition model to identify the type of circuit simulation experiment. The characteristic sample data of the student connection operation of the circuit simulation experiment obtained in step S103 is divided into training sample data and test sample data in a 5:2 ratio as the model input to train the LightGBM algorithm recognition model and finally output the current circuit simulation experiment type.

[0012] Step S105: Use collaborative filtering algorithm to provide students with circuit simulation experiment fault analysis. First, calculate the experimental fault prediction score and sort them. The experimental fault with the highest prediction score is the fault that the student is most likely to encounter. Then, based on the circuit simulation experiment fault knowledge graph, recommend the corresponding fault cause, fault result and fault solution to the student.

[0013] Step S106: Use the knowledge graph-based method of circuit simulation experiment planning to provide students with online guidance for circuit simulation experiments. Input the experiment type and fault cause obtained in steps S104 and S105 into the knowledge graph of circuit simulation experiment planning to match the corresponding type of circuit simulation experiment and related knowledge, so as to provide students with the next step of circuit simulation experiment planning.

[0014] Preferably, the circuit simulation experiment fault analysis and online guidance method based on knowledge graph and collaborative filtering described in step S101 includes the following specific steps:

[0015] Step S201: Extract knowledge entities for circuit simulation experiments using entity extraction based on the TF-IDF algorithm and open Chinese entity relation extraction based on dependency parsing.

[0016] Step S202: Use the TransR algorithm to represent the extracted circuit simulation experiment knowledge entities as vectors;

[0017] Step S203: Construct a circuit simulation experiment fault knowledge graph using circuit simulation experiment knowledge entities and store it using OrientDB.

[0018] Preferably, the entity extraction method based on the TF-IDF algorithm and the open-ended Chinese entity relation extraction method based on dependency parsing described in step S201 are used for knowledge entity extraction in circuit simulation experiments. The specific steps include:

[0019] Step S301: Collect electronic versions of experimental guidance documents from previous circuit simulation experiment courses and electronic versions of experimental reports submitted by students;

[0020] Step S302: Read all the files collected above, remove spaces and other escape characters from the files, and save the sentences into the same CSV or TXT format sentence file. Each line in the sentence file represents a sentence from all the files collected above.

[0021] Step S303: Perform word segmentation on the previously generated sentence file, and record the results of the word segmentation process into a new CSV or TXT format word segmentation file. Each line in the word segmentation file represents the result of word segmentation for each sentence in the sentence file, and the words in the same sentence are separated by commas.

[0022] Step S304: Calculate the TF-IDF value of the word segment. Use the TF-IDF algorithm to calculate the TF and IDF values ​​of each different word in the aforementioned word segmentation file, obtaining a dictionary composed of each different word and its corresponding TF-IDF value; where TF refers to term frequency, that is, the frequency of the word segmentation in the word segmentation file; IDF is the inverse text frequency index, that is, the ratio of the total number of lines in the word segmentation file to the number of lines containing the target word. The specific calculation method of TF-IDF value is as follows:

[0023]

[0024] Among them, TF i ∑ represents the frequency of word segment i in the word segmentation file. j nij The sum of the occurrences of word segment i in the segmentation file represents the total number of times word segment i appears, and j represents the j-th line in the segmentation file. j ∑ k n kj The sum of the occurrences of all words in the segmentation file is represented by , k represents each distinct word in the segmentation file, |D| represents the total number of lines in the segmentation file, and t represents the total number of occurrences of all words in the segmentation file. i Indicates the line number containing the word i;

[0025] Step S305: Sort the words according to the calculated TF-IDF values;

[0026] Step S306: Extract important words based on the results of the word segmentation and sorting, and have the circuit simulation experiment instructor manually review the extracted important words, discard the unimportant words and add important words related to the circuit simulation experiment, and use the important words that have been manually reviewed and processed by the experiment instructor as entities to complete entity extraction.

[0027] Step S307: Use an open Chinese entity relation extraction method based on dependency parsing to extract the relations between entities. By analyzing the dependency relations of different entities in the clauses of the aforementioned clause file, the syntactic collocation relations of different entities are pointed out, and then the triple data in the format of "head entity-relation-tail entity" is extracted.

[0028] Preferably, step S202, which involves using the TransR algorithm to represent the extracted circuit simulation experiment knowledge entities as vectors, specifically includes:

[0029] For each triple (h, r, t) in the format of "head entity-relation-tail entity" of the knowledge entity in the circuit simulation experiment, the head and tail entities are represented in the entity space, and the relations are represented in the relation space. Furthermore, for each relation r, there exists a mapping matrix W. r This matrix maps h,t to the space containing relation r, thus obtaining h. r and t r , make h r +r=t r , where h r and t r The definition is as follows:

[0030] h r =hW r

[0031] t r =tW r

[0032] The scoring functions for entities h and t under relation r are as follows:

[0033]

[0034] Where h represents the head entity and t represents the tail entity, h r and t r Let r represent the head entity and tail entity mapped in the relation space, respectively, and let W represent the relation. r This represents the mapping matrix.

[0035] Furthermore, the most fitting relationship between entities is determined by calculating the scores of entities under different relationships.

[0036] Preferably, step S203, which involves constructing a circuit simulation experiment fault knowledge graph using circuit simulation experiment knowledge entities and storing it in OrientDB, specifically includes:

[0037] Step S501: Construct a knowledge graph ontology model. The first step is to determine the ontology's construction goals and professional scope, i.e., to build an ontology model to cover various fault types and their solutions that may occur in circuit simulation experiments. The second step is to consider ontology reuse, i.e., to analyze whether existing ontologies can be used to save effort. The third step is to list important terms, i.e., entities extracted by the circuit simulation experiment knowledge entity extraction method. The fourth step is to define the class hierarchy, dividing the important terms into five categories based on the terms listed in the third step: "Experiment Type," "Fault Type," "Fault Cause," "Fault Consequence," and "Solution Method." The fifth step is to define class attributes, including the class name, class meaning, and class value. The sixth step is to define attribute constraints. The seventh step is to create instances.

[0038] Step S502: Construct a circuit simulation experiment fault knowledge graph based on the ontology model of the circuit simulation experiment fault knowledge graph and the circuit simulation experiment fault cause knowledge vectors obtained by the TransR algorithm.

[0039] Step S503: Store the constructed knowledge graph in the OrientDB graph database. First, construct entity nodes. Create entity nodes based on the constructed circuit simulation experiment fault knowledge graph and assign values ​​to the entity nodes. The values ​​of the entity nodes include the specific circuit simulation experiment type, fault type, fault cause, fault consequence, and solution. Second, construct the relationship connections between entity nodes. Based on the circuit simulation experiment fault knowledge graph, add corresponding relationship connections between entity nodes. The relationships between entity nodes include fault type, fault cause, fault consequence, and solution.

[0040] Preferably, the knowledge graph for circuit simulation experiment planning manually constructed by the experiment instructor in step S102 specifically includes:

[0041] Experiment types cover different types of circuit simulation experiments; Experiment topics involve different experimental topics for each experiment type, defining the specific goals and methods of the experiment; Topic-related knowledge links to the core knowledge points related to the experiment for each experimental topic; Corresponding experiment list allows students to link to other experiments of the same type or in related fields after completing the fault analysis experiment under guidance.

[0042] Preferably, the feature extraction of the original student circuit simulation experiment operation data in step S103 includes the following steps:

[0043] Step S701: Collect the original student circuit simulation experiment operation data. The experiment operation data includes the type, model, and operation information of circuit components and experimental instruments. The operation information includes the operation type of the experimental instrument and the information of the experimental instrument associated with the current operation. The operation type includes adding, connecting, and deleting experimental instruments.

[0044] Step S702: Data cleaning, parsing the student circuit simulation experiment operation data, extracting all the student's connection operations, filtering out duplicate connections, deleting connections and data reading behaviors, and obtaining the student's valid connection operation data.

[0045] Step S703: Feature construction. The effective connection operation data after extraction and cleaning is encoded using the one-hot encoding method, and the encoded result is used as the type feature of the cleaned data.

[0046] Preferably, step S104, which involves establishing a LightGBM algorithm identification model to identify the type of circuit simulation experiment, includes the following specific steps:

[0047] Step 1: Divide the feature-enhanced sample data into a training sample set and a test sample set in a 5:2 ratio;

[0048] Step 2: Input the training sample set into the LightGBM algorithm model for training and adjust the model parameters;

[0049] Step 3: Use the remaining test sample set to predict the model, and further adjust the model parameters based on the prediction results to obtain the trained LightGBM circuit simulation experiment type recognition model.

[0050] Preferably, step S105, which uses a collaborative filtering algorithm to provide students with fault analysis for circuit simulation experiments, includes the following specific steps:

[0051] Step S901: Calculate circuit similarity. Construct an m×m circuit connection matrix based on the current student's circuit structure and the circuit structures of other students, where m is the number of components used in the circuit. When two components are at opposite ends of the same wire, the corresponding element in the matrix is ​​1; otherwise, the corresponding element in the matrix is ​​0. Convert the calculated circuit connection matrix into an m×m dimensional vector by row, and calculate the cosine similarity between the current student's circuit and the circuits of other students. The specific calculation method is as follows:

[0052]

[0053] Among them, c u and c q Let v represent the circuit for the current student and the circuit for the qth other student, respectively. u and v q Representing circuit c respectively u and c q Based on the transformation of the circuit connection matrix into an m×m dimensional vector, v u,l and v q,l Representing vectors v u and v q The l-th element in;

[0054] Step S902: Calculate the circuit-experimental fault rating matrix. Select the top-N similar circuits based on circuit similarity and calculate the circuit-experimental fault rating matrix. If a certain experimental fault has occurred in a similar circuit, the similar circuit is considered to have a rating of 1 for that experimental fault; if a certain experimental fault has not occurred in a similar circuit, the similar circuit is considered to have a rating of 0 for that experimental fault.

[0055] Step S903: Calculate the experimental fault prediction score. Based on the circuit similarity between the student's current circuit and the top-N similar circuits, and the circuit-experimental fault score matrix, calculate the predicted score P for the f-th experimental fault in the student's current circuit. f The specific calculation method is as follows:

[0056]

[0057] Where N represents the number of similar circuits selected based on the similarity of the circuit connection matrix, and c u The circuit representing the student's current state, c p Let s represent the p-th similar circuit among the aforementioned selected similar circuits. p Circuit c p The sum of scores for all experimental failures, s p,f Circuit c p The score for the f-th experimental failure;

[0058] Step S904: Recommend the experimental principles of the current circuit simulation experiment and the troubleshooting methods for the circuit simulation experiment faults that occur in the current circuit to the student. Sort the experimental fault prediction scores calculated above, and the experimental fault with the highest score is the fault that the student is most likely to encounter. Then, recommend the corresponding fault causes, fault results and fault solutions to the student based on the circuit simulation experiment fault knowledge graph.

[0059] Preferably, step S106, which describes using a knowledge graph-based approach for circuit simulation experiments to provide online guidance for students' circuit simulation experiments, specifically includes:

[0060] The experiment type and fault cause are input into the circuit simulation experiment planning knowledge graph. The corresponding circuit simulation experiment and related knowledge are matched to obtain an experiment list of the corresponding experiment knowledge type. Online guidance is provided to students to help them plan their next circuit simulation experiment.

[0061] Compared with existing circuit simulation experiment teaching methods, this invention has the following advantages:

[0062] 1. This invention utilizes knowledge graphs to assist in fault analysis and online guidance for circuit simulation experiments. By constructing a circuit simulation experiment fault knowledge graph and a circuit simulation experiment planning knowledge graph, information such as experiment types, fault causes, solutions, experiment objectives, and teaching outlines are systematized, providing two complete knowledge networks. This enables rapid querying and association of relevant knowledge, ensuring the accuracy and comprehensiveness of fault analysis and online guidance. Furthermore, the knowledge graph is more structured and dynamic, facilitating expansion and updates, making knowledge management in experiments more intelligent and precise.

[0063] 2. This invention uses the LightGBM algorithm model to identify the types of circuit simulation experiments, which can improve the accuracy of students' identification of circuit simulation experiment operation types. LightGBM has high performance and good generalization ability, and can process large amounts of high-dimensional data, making the experiment identification process more automated and improving the real-time nature and interactivity of experimental teaching.

[0064] 3. This invention uses a collaborative filtering algorithm for fault prediction in student circuit simulation experiments and combines it with a circuit simulation experiment fault knowledge graph to provide students with fault analysis and guidance. By analyzing the circuit simulation experiments of similar students, it helps students quickly and accurately locate problems, avoiding the common delays in fault diagnosis during experiments, and providing students with timely experimental guidance, thereby improving students' learning efficiency.

[0065] 4. This invention provides students with online guidance for planning their next steps in circuit simulation experiments based on a knowledge graph of circuit simulation experiment planning. It dynamically provides personalized online guidance and planning for circuit simulation experiments according to students' operating habits, experiment types, and fault prediction results, ensuring students receive targeted guidance during experiments and improving learning outcomes. Furthermore, this online guidance method is more flexible and adaptable, not only improving students' self-learning ability but also reducing the burden of experimental instruction. Attached Figure Description

[0066] Figure 1 The flowchart illustrates the circuit simulation experiment fault analysis and online guidance method based on knowledge graph and collaborative filtering provided in this embodiment of the invention.

[0067] Figure 2 A flowchart illustrating the method for constructing a fault knowledge graph in circuit simulation experiments, as provided in this embodiment of the invention.

[0068] Figure 3 The flowchart illustrates the knowledge entity extraction method for circuit simulation experiments based on the TF-IDF algorithm and open Chinese entity relation extraction based on dependency parsing, as provided in this embodiment of the invention.

[0069] Figure 4 An example diagram of a fault knowledge graph for circuit simulation experiments provided in an embodiment of the present invention.

[0070] Figure 5 This is an example diagram of a knowledge graph for circuit simulation experiment planning provided in an embodiment of the present invention.

[0071] Figure 6 A flowchart of a feature extraction method for circuit simulation experiment operation data provided in an embodiment of the present invention.

[0072] Figure 7 A flowchart of a circuit simulation experiment fault analysis method based on a collaborative filtering algorithm provided in an embodiment of the present invention. Detailed Implementation

[0073] To make the features and advantages of the present invention more apparent and understandable, the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0074] Figure 1 This is a flowchart of a circuit simulation experiment fault analysis and online guidance method based on knowledge graphs and collaborative filtering, according to an embodiment of the present invention. Figure 1 As shown, this embodiment of the invention provides a method for fault analysis and online guidance in circuit simulation experiments based on knowledge graphs and collaborative filtering. The method includes:

[0075] Step S101: Construct a fault knowledge graph for circuit simulation experiments;

[0076] Step S102: Artificially construct a knowledge graph for circuit simulation experiment planning;

[0077] Step S103: Extract features from the original student circuit simulation experiment operation data;

[0078] Step S104: Establish a LightGBM algorithm recognition model to identify the type of circuit simulation experiment;

[0079] Step S105: Use collaborative filtering algorithm to provide students with fault analysis for circuit simulation experiments;

[0080] Step S106: Based on the knowledge graph of circuit simulation experiment planning, provide students with online guidance for circuit simulation experiments.

[0081] Step S101 provides a method for constructing a fault knowledge graph for circuit simulation experiments, such as... Figure 2 As shown, the specific steps include:

[0082] Step S201: Extract knowledge entities for circuit simulation experiments using entity extraction based on the TF-IDF algorithm and open Chinese entity relation extraction based on dependency parsing.

[0083] Step S202: Use the TransR algorithm to represent the extracted circuit simulation experiment knowledge entities as vectors;

[0084] Step S203: Construct a circuit simulation experiment fault knowledge graph using circuit simulation experiment knowledge entities and store it using OrientDB.

[0085] Step S201 provides a method for extracting knowledge entities from circuit simulation experiments, such as... Figure 3 As shown, the specific steps include:

[0086] Step S301: Collect electronic versions of experimental guidance documents from previous circuit simulation experiment courses and electronic versions of experimental reports submitted by students;

[0087] Step S302: Read all the files collected above, remove spaces and other escape characters from the files, and save the sentences into the same CSV or TXT format sentence file. Each line in the sentence file represents a sentence from all the files collected above.

[0088] Step S303: Perform word segmentation on the previously generated sentence file, and record the results of the word segmentation process into a new CSV or TXT format word segmentation file. Each line in the word segmentation file represents the result of word segmentation for each sentence in the sentence file, and the words in the same sentence are separated by commas.

[0089] Step S304: Calculate the TF-IDF value of the word segment. Use the TF-IDF algorithm to calculate the TF and IDF values ​​of each different word in the aforementioned word segmentation file, obtaining a dictionary composed of each different word and its corresponding TF-IDF value; where TF refers to term frequency, that is, the frequency of the word segmentation in the word segmentation file; IDF is the inverse text frequency index, that is, the ratio of the total number of lines in the word segmentation file to the number of lines containing the target word. The specific calculation method of TF-IDF value is as follows:

[0090]

[0091] Among them, TF i ∑ represents the frequency of word segment i in the word segmentation file. j n ij The sum of the occurrences of word segment i in the segmentation file represents the total number of times word segment i appears, and j represents the j-th line in the segmentation file. j ∑ k n kj The sum of the occurrences of all words in the segmentation file is represented by , k represents each distinct word in the segmentation file, |D| represents the total number of lines in the segmentation file, and t represents the total number of occurrences of all words in the segmentation file. i Indicates the line number containing the word i;

[0092] Step S305: Sort the words according to the calculated TF-IDF values;

[0093] Step S306: Extract important words based on the results of the word segmentation and sorting, and have the circuit simulation experiment instructor manually review the extracted important words, discard the unimportant words and add important words related to the circuit simulation experiment, and use the important words that have been manually reviewed and processed by the experiment instructor as entities to complete entity extraction.

[0094] Step S307: Use an open Chinese entity relation extraction method based on dependency parsing to extract the relations between entities. By analyzing the dependency relations of different entities in the clauses of the aforementioned clause file, the syntactic collocation relations of different entities are pointed out, and then the triple data in the format of "head entity-relation-tail entity" is extracted.

[0095] Step S202 provides a method for representing knowledge entity vectors in circuit simulation experiments based on the TransR algorithm, specifically including:

[0096] For each triple (h,r,t) in the format of "head entity-relation-tail entity" output in step S307, the head and tail entities are represented in the entity space, and the relation is represented in the relation space. Furthermore, for each relation r, there exists a mapping matrix W. r This matrix maps h,t to the space containing relation r, thus obtaining h. rand t r , make h r +r=t r , where h r and t r The definition is as follows:

[0097] h r =hW r

[0098] t r =tW r

[0099] The scoring functions for entities h and t under relation r are as follows:

[0100]

[0101] Where h represents the head entity and t represents the tail entity, h r and t r Let r represent the head entity and tail entity mapped in the relation space, respectively, and let W represent the relation. r This represents the mapping matrix.

[0102] Furthermore, the most fitting relationship between entities is determined by calculating the scores of entities under different relationships.

[0103] Step S203 provides a method for building and storing a circuit simulation experiment fault knowledge graph based on the OrientDB database, specifically including:

[0104] Step S501: Construct a knowledge graph ontology model. The first step is to determine the ontology's construction goals and professional scope, i.e., to build an ontology model to cover various fault types and their solutions that may occur in circuit simulation experiments. The second step is to consider ontology reuse, i.e., to analyze whether existing ontologies can be used to save effort. The third step is to list important terms, i.e., entities extracted by the circuit simulation experiment knowledge entity extraction method. The fourth step is to define the class hierarchy, dividing the important terms into five categories based on the terms listed in the third step: "Experiment Type," "Fault Type," "Fault Cause," "Fault Consequence," and "Solution Method." The fifth step is to define class attributes, including the class name, class meaning, and class value. The sixth step is to define attribute constraints. The seventh step is to create instances.

[0105] Step S502: Construct a circuit simulation experiment fault knowledge graph based on the ontology model of the circuit simulation experiment fault knowledge graph and the circuit simulation experiment fault cause knowledge vectors obtained by the TransR algorithm.

[0106] Step S503: Store the constructed circuit simulation experiment knowledge entity graph in the OrientDB graph database. First, construct entity nodes. Create entity nodes based on the constructed circuit simulation experiment fault knowledge graph and assign values ​​to them. The values ​​of entity nodes include the specific circuit simulation experiment type, fault type, fault cause, fault consequence, and solution. Second, construct the relationship connections between entity nodes. Based on the circuit simulation experiment fault knowledge graph, add corresponding relationship connections between entity nodes. The relationships between entity nodes include fault type, fault cause, fault consequence, and solution. For example... Figure 4 As shown, a circuit simulation experiment fault knowledge graph is finally obtained, which includes the experiment type, fault type, fault cause, fault consequence, and solution.

[0107] Step S102 provides a method for manually constructing a knowledge graph for circuit simulation experiment planning, such as... Figure 5 As shown, it specifically includes:

[0108] Experiment types cover different types of circuit simulation experiments; Experiment topics involve different experimental topics for each experiment type, defining the specific goals and methods of the experiment; Topic-related knowledge links to the core knowledge points related to each experiment topic; Corresponding experiment list allows students to access other experiments of the same type or in related fields after completing the fault analysis experiment under guidance.

[0109] Step S103 provides a feature extraction method for circuit simulation experiment operation data, such as... Figure 6 As shown, the specific steps include:

[0110] Step S701: Collect the original student circuit simulation experiment operation data. The experiment operation data includes the type, model, and operation information of circuit components and experimental instruments. The operation information includes the operation type of the experimental instrument and the information of the experimental instrument associated with the current operation. The operation type includes adding, connecting, and deleting experimental instruments.

[0111] Step S702: Data cleaning, parsing the student circuit simulation experiment operation data, extracting all the student's connection operations, filtering out duplicate connections, deleting connections and data reading behaviors, and obtaining the student's valid connection operation data.

[0112] Step S703: Feature construction. The effective connection operation data after extraction and cleaning is encoded using the one-hot encoding method, and the encoded result is used as the type feature of the cleaned data.

[0113] Step S104 provides a circuit simulation experiment type identification method based on the LightGBM algorithm, specifically including:

[0114] Step 1: Divide the feature-enhanced sample data into a training sample set and a test sample set in a 5:2 ratio;

[0115] Step 2: Input the training sample set into the LightGBM algorithm model for training and adjust the model parameters;

[0116] Step 3: Use the remaining test sample set to predict the model, and further adjust the model parameters based on the prediction results to obtain the trained LightGBM circuit simulation experiment type recognition model.

[0117] Step S105 provides a circuit simulation experiment fault analysis method based on a collaborative filtering algorithm, such as... Figure 7 As shown, the specific steps include:

[0118] Step S901: Calculate circuit similarity. Construct an m×m circuit connection matrix based on the current student's circuit structure and the circuit structures of other students, where m is the number of components used in the circuit. When two components are at opposite ends of the same wire, the corresponding element in the matrix is ​​1; otherwise, the corresponding element in the matrix is ​​0. Convert the calculated circuit connection matrix into an m×m dimensional vector by row, and calculate the cosine similarity between the current student's circuit and the circuits of other students. The specific calculation method is as follows:

[0119]

[0120] Among them, c u and c q Let v represent the circuit for the current student and the circuit for the qth other student, respectively. u and v q Representing circuit c respectively u and c q Based on the transformation of the circuit connection matrix into an m×m dimensional vector, v u,l and v q,l Representing vectors v u and v q The l-th element in;

[0121] Step S902: Calculate the circuit-experimental fault rating matrix. Select the top-N similar circuits based on circuit similarity and calculate the circuit-experimental fault rating matrix. If a certain experimental fault has occurred in a similar circuit, the similar circuit is considered to have a rating of 1 for that experimental fault; if a certain experimental fault has not occurred in a similar circuit, the similar circuit is considered to have a rating of 0 for that experimental fault.

[0122] Step S903: Calculate the experimental fault prediction score. Based on the circuit similarity between the student's current circuit and the top-N similar circuits, and the circuit-experimental fault score matrix, calculate the predicted score P for the f-th experimental fault in the student's current circuit.f The specific calculation method is as follows:

[0123]

[0124] Where N represents the number of similar circuits selected based on the similarity of the circuit connection matrix, and c u The circuit representing the student's current state, c p Let s represent the p-th similar circuit among the aforementioned selected similar circuits. p Circuit c p The sum of scores for all experimental failures, s p,f Circuit c p The score for the f-th experimental failure;

[0125] Step S904: Recommend the experimental principles of the current circuit simulation experiment and the troubleshooting methods for the circuit simulation experiment faults that occur in the current circuit to the student. Sort the experimental fault prediction scores calculated above, and the experimental fault with the highest score is the fault that the student is most likely to encounter. Then, recommend the corresponding fault causes, fault results and fault solutions to the student based on the circuit simulation experiment fault knowledge graph.

[0126] Step S106 provides an online guidance method for circuit simulation experiments based on a knowledge graph of circuit simulation experiment planning, specifically including:

[0127] The experiment type and fault-related knowledge are input into the circuit simulation experiment planning knowledge graph. The corresponding circuit simulation experiments and related knowledge are matched to obtain an experiment list of the corresponding experiment knowledge type. Online guidance is provided to students to help them plan their next circuit simulation experiment.

Claims

1. A method for fault analysis and online guidance in circuit simulation experiments based on knowledge graphs and collaborative filtering, characterized in that, Includes the following steps: Step S101: Collect relevant files from historical circuit simulation experiments and construct a knowledge graph of circuit simulation experiment faults. This knowledge graph includes experiment type, fault type, fault cause, fault consequence and solution. Step S102: The experiment instructor manually constructs a knowledge graph for circuit simulation experiment planning, inputs the experimental objectives and teaching syllabus of the circuit simulation experiment course, and obtains a knowledge graph for circuit simulation experiment planning that includes experiment types, experiment topics, topic-related knowledge, and a list of corresponding types of experiments; Step S103: Extract features from the original student circuit simulation experiment operation data. Collect the original student experiment operation data as input. This data includes the type, model and operation information of the experimental instruments. Output characteristic student connection operation sample data of the circuit simulation experiment. Step S104: Establish a LightGBM algorithm recognition model to identify the type of circuit simulation experiment. Use the characteristic sample data of the student connection operation of the circuit simulation experiment obtained in step S103 as the model input to train the LightGBM recognition model and finally output the current circuit simulation experiment type. Step S105: Use collaborative filtering algorithm to provide students with circuit simulation experiment fault analysis. First, calculate and sort the experimental fault prediction scores to predict circuit simulation experiment faults. Then, based on the circuit simulation experiment fault knowledge graph, recommend the corresponding fault causes, consequences and solutions to students. Step S106: Use the knowledge graph-based method of circuit simulation experiment planning to provide students with online guidance for circuit simulation experiments. Input the experiment type and fault cause obtained in steps S104 and S105 into the knowledge graph of circuit simulation experiment planning to match the corresponding type of circuit simulation experiment and related knowledge, so as to provide students with the next step of circuit simulation experiment planning.

2. The method for fault analysis and online guidance in circuit simulation experiments based on knowledge graphs and collaborative filtering according to claim 1, characterized in that... Step S101, which involves collecting relevant files from historical circuit simulation experiments and constructing a knowledge graph of circuit simulation experiment faults, includes the following specific steps: Step S201: Extract knowledge entities for circuit simulation experiments using entity extraction based on the TF-IDF algorithm and open Chinese entity relation extraction based on dependency parsing. Step S202: Use the TransR algorithm to represent the extracted circuit simulation experiment knowledge entities as vectors; Step S203: Construct a circuit simulation experiment fault knowledge graph using circuit simulation experiment knowledge entities and store it using OrientDB.

3. The method for fault analysis and online guidance in circuit simulation experiments based on knowledge graphs and collaborative filtering according to claim 2, characterized in that... Knowledge entity extraction for circuit simulation experiments is performed using an entity extraction method based on the TF-IDF algorithm and an open-ended Chinese entity relation extraction method based on dependency parsing. The specific steps include: Step S301: Collect electronic versions of experimental guidance documents from previous circuit simulation experiment courses and electronic versions of experimental reports submitted by students; Step S302: Read all the files collected above, remove spaces and other escape characters from the files, and save the sentences into the same CSV or TXT format sentence file. Each line in the sentence file represents a sentence from all the files collected above. Step S303: Perform word segmentation on the previously generated sentence file, and record the results of the word segmentation process into a new CSV or TXT format word segmentation file. Each line in the word segmentation file represents the result of word segmentation for each sentence in the sentence file, and the words in the same sentence are separated by commas. Step S304: Calculate the TF-IDF value of the word segment. Use the TF-IDF algorithm to calculate the TF and IDF values ​​of each different word in the aforementioned word segmentation file, obtaining a dictionary composed of each different word and its corresponding TF-IDF value; where TF refers to term frequency, that is, the frequency of the word segmentation in the word segmentation file; IDF is the inverse text frequency index, that is, the ratio of the total number of lines in the word segmentation file to the number of lines containing the target word. The specific calculation method of TF-IDF value is as follows: Among them, TF i ∑ represents the frequency of word segment i in the word segmentation file. j n ij The sum of the occurrences of word segment i in the segmentation file represents the total number of times word segment i appears, and j represents the j-th line in the segmentation file. j ∑ k n kj The sum of the occurrences of all words in the segmentation file is represented by , k represents each distinct word in the segmentation file, |D| represents the total number of lines in the segmentation file, and t represents the total number of occurrences of all words in the segmentation file. i Indicates the line number containing the word i; Step S305: Sort the words according to the calculated TF-IDF values; Step S306: Extract important words based on the results of the word segmentation and sorting, and have the circuit simulation experiment instructor manually review the extracted important words, discard the unimportant words and add important words related to the circuit simulation experiment, and use the important words that have been manually reviewed and processed by the experiment instructor as entities to complete entity extraction. Step S307: Use an open Chinese entity relation extraction method based on dependency parsing to extract the relations between entities. By analyzing the dependency relations of different entities in the clauses of the aforementioned clause file, the syntactic collocation relations of different entities are pointed out, and then the triple data in the format of "head entity-relation-tail entity" is extracted.

4. The method for fault analysis and online guidance in circuit simulation experiments based on knowledge graphs and collaborative filtering according to claim 2, characterized in that... The TransR algorithm is used to represent the extracted circuit simulation experiment knowledge entities into vectors, specifically including: For each triple (h, r, t) in the format of "head entity-relation-tail entity" of the knowledge entity in the circuit simulation experiment, the head and tail entities are represented in the entity space, and the relations are represented in the relation space. Furthermore, for each relation r, there exists a mapping matrix W. r This matrix maps h,t to the space containing relation r, thus obtaining h. r and t r , make h r +r=t r , where h r and t r The definition format is as follows: h r =hW r t r =tW r The scoring functions for entities h and t under relation r are as follows: Where h represents the head entity and t represents the tail entity, h r and t r Let r represent the head entity and tail entity mapped in the relation space, respectively, and let W represent the relation. r Represents the mapping matrix; Furthermore, the most fitting relationship between entities is determined by calculating the scores of entities under different relationships.

5. The method for fault analysis and online guidance in circuit simulation experiments based on knowledge graphs and collaborative filtering according to claim 2, characterized in that... We construct a circuit simulation experiment fault knowledge graph using circuit simulation experiment knowledge entities and store it using OrientDB. Specifically, this includes: Step S501: Build a knowledge graph ontology model. The first step is to determine the ontology construction goals and professional scope, that is, to build an ontology model to cover various fault types that may occur in circuit simulation experiments and their solutions. The second step is to consider ontology reuse, that is, to analyze whether it is possible to save effort by using existing ontologies. The third step is to list important terms, that is, knowledge entities of circuit simulation experiments. The fourth step is to define the class hierarchy. Based on the important terms listed in the third step, the important terms are divided into five categories: "experiment type", "fault type", "fault cause", "fault consequence", and "solution". The fifth step is to define the attributes of the classes, including the class name, the meaning of the class, and the value of the class. The sixth step is to define the constraints of the attributes. The seventh step is to create instances. Step S502: Construct a circuit simulation experiment fault knowledge graph based on the ontology model of the circuit simulation experiment fault knowledge graph and the circuit simulation experiment fault cause knowledge vectors obtained by the TransR algorithm. Step S503: Store the constructed knowledge graph in the OrientDB graph database. First, construct entity nodes. Create entity nodes based on the constructed circuit simulation experiment fault knowledge graph and assign values ​​to the entity nodes. The values ​​of the entity nodes include the specific circuit simulation experiment type, fault type, fault cause, fault consequence, and solution. Second, construct the relationship connections between entity nodes. Based on the circuit simulation experiment fault knowledge graph, add corresponding relationship connections between entity nodes. The relationships between entity nodes include fault type, fault cause, fault consequence, and solution.

6. The method for fault analysis and online guidance in circuit simulation experiments based on knowledge graphs and collaborative filtering according to claim 1, characterized in that... Step S102, which involves the experimental instructor manually constructing a knowledge graph for circuit simulation experiment planning, specifically includes: Experiment types cover different types of circuit simulation experiments; Experiment topics involve different experimental topics for each experiment type, defining the specific goals and methods of the experiment; Topic-related knowledge links to the core knowledge points related to the experiment for each experimental topic; Corresponding experiment list allows students to link to other experiments of the same type or in related fields after completing the fault analysis experiment under guidance.

7. The method for fault analysis and online guidance in circuit simulation experiments based on knowledge graphs and collaborative filtering according to claim 1, characterized in that... Step S103, which involves feature extraction from the original student circuit simulation experiment data, includes the following specific steps: Step S701: Collect the original student circuit simulation experiment operation data. The experiment operation data includes the type, model, and operation information of circuit components and experimental instruments. The operation information includes the operation type of the experimental instrument and the information of the experimental instrument associated with the current operation. The operation type includes adding, connecting, and deleting experimental instruments. Step S702: Data cleaning, parsing the student circuit simulation experiment operation data, extracting all the student's connection operations, filtering out duplicate connections, deleting connections and data reading behaviors, and obtaining the student's valid connection operation data. Step S703: Feature construction. The effective connection operation data after extraction and cleaning is encoded using the one-hot encoding method, and the encoded result is used as the type feature of the cleaned data.

8. The method for fault analysis and online guidance in circuit simulation experiments based on knowledge graphs and collaborative filtering according to claim 1, characterized in that... Step S104, which involves establishing a LightGBM algorithm identification model to identify the type of circuit simulation experiment, includes the following specific steps: First, the feature sample data is divided into a training sample set and a test sample set in a 5:2 ratio. Second, the training sample set is input into the LightGBM algorithm model for training, and the model parameters are adjusted. Finally, the remaining test sample set is used to predict the model, and the model parameters are further adjusted based on the prediction results to obtain the trained LightGBM circuit simulation experiment type recognition model.

9. The method for fault analysis and online guidance in circuit simulation experiments based on knowledge graphs and collaborative filtering according to claim 1, characterized in that... Step S105, which describes using a collaborative filtering algorithm to provide students with fault analysis for circuit simulation experiments, includes the following specific steps: Step S901: Calculate circuit similarity. Construct an m×m circuit connection matrix based on the current student's circuit structure and the circuit structures of other students, where m is the number of components used in the circuit. When two components are at opposite ends of the same wire, the corresponding element in the matrix is ​​1; otherwise, the corresponding element in the matrix is ​​0. Convert the calculated circuit connection matrix into an m×m dimensional vector by row, and calculate the cosine similarity between the current student's circuit and the circuits of other students. The specific calculation method is as follows: Among them, c u and c q Let v represent the circuit for the current student and the circuit for the qth other student, respectively. u and v q Representing circuit c respectively u and c q Based on the transformation of the circuit connection matrix into an m×m dimensional vector, v u,l and v q,l Representing vectors v u and v q The l-th element in; Step S902: Calculate the circuit-experimental fault rating matrix. Select the top-N similar circuits based on circuit similarity and calculate the circuit-experimental fault rating matrix. If a certain experimental fault has occurred in a similar circuit, the similar circuit is considered to have a rating of 1 for that experimental fault; if a certain experimental fault has not occurred in a similar circuit, the similar circuit is considered to have a rating of 0 for that experimental fault. Step S903: Calculate the experimental fault prediction score. Based on the circuit similarity between the student's current circuit and the top-N similar circuits, and the circuit-experimental fault score matrix, calculate the predicted score P for the f-th experimental fault in the student's current circuit. f The specific calculation method is as follows: Where N represents the number of similar circuits selected based on the similarity of the circuit connection matrix, and c u The circuit representing the student's current state, c p Let s represent the p-th similar circuit among the aforementioned selected similar circuits. p Circuit c p The sum of scores for all experimental failures, s p,f Circuit c p The score for the f-th experimental failure; Step S904: Recommend the experimental principles of the current circuit simulation experiment and the troubleshooting methods for the circuit simulation experiment faults that occur in the current circuit to the student. Sort the experimental fault prediction scores calculated above, and the experimental fault with the highest score is the fault that the student is most likely to encounter. Then, recommend the corresponding fault causes, fault results and fault solutions to the student based on the circuit simulation experiment fault knowledge graph.

10. The method for fault analysis and online guidance in circuit simulation experiments based on knowledge graphs and collaborative filtering according to claim 1, characterized in that... Step S106, which describes using a knowledge graph-based approach for circuit simulation experiments to provide online guidance for students' circuit simulation experiments, specifically includes: The experiment type and fault cause are input into the circuit simulation experiment planning knowledge graph. The corresponding circuit simulation experiment and related knowledge are matched to obtain an experiment list of the corresponding experiment knowledge type. Online guidance is provided to students to help them plan their next circuit simulation experiment.

Citation Information

Patent Citations

  • VR live-action teaching model big data teaching knowledge mining method and system

    CN116596071A

  • Data-mining-based knowledge extraction and visualization of analog / mixed-signal / custom digital circuit design flow

    US20080022232A1