Circuit simulation experiment fault analysis and online guiding method based on knowledge graph and collaborative filtering
By constructing a circuit simulation experiment fault knowledge graph and planning knowledge graph, combined with a collaborative filtering algorithm, personalized online guidance is provided, which solves the problem of insufficient understanding of students in traditional circuit simulation experiment teaching, and improves experimental operation and theoretical level.
Patent Information
- Application Number
- CN202411301410.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-18
- Publication Date
- 2024-12-24
- Estimated Expiration
- 2044-09-18
AI Technical Summary
In the traditional circuit simulation experiment teaching model, students often follow the test reports and cannot deeply understand the experimental principles and problem analysis methods. Teacher guidance is also limited to the experimental process and does not involve analytical problems, resulting in students' experimental ability and theoretical level. insufficient.
Using a method based on knowledge graph and collaborative filtering, by constructing circuit simulation experiment fault knowledge graphs and planning knowledge graphs, identifying errors in students' operations and providing principle descriptions, combining students' operating habits and fault prediction, provide students with personalized online Guide and improve experimental operation and theoretical level.
It realizes intelligent guidance for students' experimental process, improves students' experimental operation ability and theoretical level, ensures the accuracy and comprehensiveness of fault analysis, reduces the burden of teacher guidance, and improves learning efficiency and independent learning ability.
Smart Images

Figure CN119181298A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of experimental teaching, and in particular to a circuit simulation experiment fault analysis and online guidance method based on knowledge graph and collaborative filtering. Background Art
[0002] With the development of modern educational technology, more and more experimental teaching contents are conducted through online platforms or virtual laboratories. Among them, circuit simulation experiments, as basic experiments in related disciplines such as electronic engineering and physics, have high application value and practical needs.
[0003] However, in the traditional circuit simulation experiment teaching mode, the experimental process is often as follows: 1. The teacher provides experimental guidance documents; 2. Students preview the experiment before class; 3. Students perform experimental operations according to the experimental process in the experimental guidance documents during class; 4. Students record experimental data and complete data analysis and experimental reports. The disadvantage of this model is that different students have different levels of mastery of experimental content, and in order to complete the experimental report, students often follow the experimental process. In addition, due to limited class time and energy, the guidance provided by teachers to students during the experiment is often limited to helping students complete the experimental process, and does not provide guidance on problem analysis, resulting in students being unable to have a deep understanding of experimental principles and problem analysis methods.
[0004] Therefore, if we can provide an experimental teaching method that is based on students' knowledge background and conducts targeted principle analysis and guidance according to students' experimental operations, it will more effectively help students understand experimental principles, master experimental methods, and improve their ability to analyze problems. Summary of the invention
[0005] The present invention provides a circuit simulation experiment fault analysis and online guidance method based on knowledge graph and collaborative filtering. The method constructs a knowledge graph by summarizing the background knowledge required in the circuit simulation experiment course and the faults that may occur during the experiment, identifies the student operation and the circuit simulation experiment structure, recommends the correct experimental operation steps to the students according to the circuit simulation experiment fault knowledge graph during the students' experimental operation, and explains the principles of the errors that may occur in the students' operation to help the students master the experimental principles and avoid experimental faults. The method also provides the students with the next experimental plan according to the circuit simulation experiment planning knowledge graph, and provides online guidance, thereby improving the students' experimental operation ability and theoretical level.
[0006] To achieve the above object, the specific scheme of the present invention is as follows:
[0007] The present invention discloses a circuit simulation experiment fault analysis and online guidance method based on knowledge graph and collaborative filtering, which specifically includes the following steps:
[0008] Step S101: Collect historical circuit simulation experiment related files and construct a circuit simulation experiment fault knowledge graph. First, entity extraction based on TF-IDF algorithm and open Chinese entity relationship extraction method based on dependency syntax analysis are used to extract circuit simulation experiment knowledge. Then, the TransR algorithm is used to vectorize the extracted circuit simulation experiment topics and relationships. Finally, a circuit simulation experiment fault knowledge graph including experiment category, fault category, fault cause, fault consequence and solution is constructed, and the circuit simulation experiment fault knowledge graph is stored in the OrientDB database.
[0009] Step S102: The experimental instructor manually constructs a circuit simulation experiment planning knowledge graph, inputs the experimental objectives, teaching outline, and various experimental projects designed by the experimental instructor of the circuit simulation experiment course, and obtains a circuit simulation experiment planning knowledge graph including experimental categories, experimental topics, topic-related knowledge, and a list of corresponding types of experiments;
[0010] Step S103: extracting features from the original student circuit simulation experiment operation data. First, collect the original student experiment operation data as input. The data includes the type, model and operation information of the experimental instrument. Then, perform data cleaning. Use the unique hot encoding method to construct features for the cleaned data. Output the characterized circuit simulation experiment student connection operation sample data.
[0011] Step S104: Establish a LightGBM algorithm recognition model to identify the type of circuit simulation experiment, divide the characteristic sample data of the student connection operation of the circuit simulation experiment obtained in step S103 into training sample data and test sample data in a ratio of 5:2 as model input, train the LightGBM algorithm recognition model, and finally output the type of the current circuit simulation experiment;
[0012] Step S105: Using collaborative filtering algorithm to provide students with circuit simulation experiment fault analysis, first calculate the experimental fault prediction score and sort it, the experimental fault with the highest prediction score is the most likely fault for the student, and then recommend the corresponding fault cause, fault result and fault solution to the student based on the circuit simulation experiment fault knowledge graph;
[0013] Step S106: Use a method based on the circuit simulation experiment planning knowledge graph to provide students with online guidance for circuit simulation experiments. Input the experiment categories and fault causes obtained in steps S104 and S105 into the circuit simulation experiment planning knowledge graph to match the corresponding categories of circuit simulation experiments and related knowledge, and provide students with the next step of circuit simulation experiment planning.
[0014] Preferably, the construction technology of the circuit simulation experiment fault knowledge graph in step S101 specifically includes the following steps:
[0015] Step S201: extracting circuit simulation experiment knowledge using entity extraction based on TF-IDF algorithm and an open Chinese entity relationship extraction method based on dependency syntax analysis;
[0016] Step S202: using the TransR algorithm to vectorize the extracted circuit simulation experiment knowledge;
[0017] Step S203: construct a circuit simulation experiment fault knowledge graph and use OrientDB to store it.
[0018] Preferably, the circuit simulation experiment knowledge extraction method of entity extraction based on TF-IDF algorithm and open Chinese entity relationship extraction based on dependency syntax analysis in step S201 specifically comprises the following steps:
[0019] Step S301: Collecting electronic versions of experimental instruction documents of previous circuit simulation experimental courses and electronic versions of experimental report documents submitted by students;
[0020] Step S302: Read all the files collected above, delete escape characters such as spaces in the files, and save the sentences into the same sentence file in csv format or txt format, wherein each line in the sentence file represents a sentence of all the files collected above;
[0021] Step S303: performing word segmentation processing on the sentence file generated above, and recording the result of the word segmentation processing into a new word segmentation file in csv format or txt format, wherein each line in the word segmentation file represents the result of the word segmentation processing on each sentence in the sentence file, and the word segments of the same sentence are separated by commas;
[0022] Step S304: Calculate the TF-IDF value of the word segmentation. Use the TF-IDF algorithm to calculate the TF value and IDF value of each different word segmentation in the aforementioned word segmentation file, and obtain a dictionary consisting of each different word segmentation and its corresponding TF-IDF value. TF refers to the word 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 segmentation. The specific calculation method of the TF-IDF value is as follows:
[0023]
[0024] Among them, TF i Indicates the frequency of word i appearing in the word segmentation file, ∑ j n ij represents the total number of occurrences of word i in the word segmentation file, j represents the jth line in the word segmentation file, ∑ j ∑ k nkj represents the total number of occurrences of all words in the word segmentation file, k represents each different word in the word segmentation file, |D| represents the total number of lines in the word segmentation file, and t i Indicates the number of rows containing word i;
[0025] Step S305: sorting according to the calculated TF-IDF values of the word segments;
[0026] Step S306: extracting important words according to the results of the above-mentioned word segmentation sorting, and letting the circuit simulation experiment instructor manually review the extracted important words, discarding the unimportant words and supplementing the important words related to the circuit simulation experiment, and taking the important words manually reviewed and processed by the experiment instructor as entities to complete entity extraction;
[0027] Step S307: Use an open Chinese entity relationship extraction method based on dependency syntactic analysis to extract the relationship between entities. By analyzing the dependency relationships between the extracted different entities in the clauses in the aforementioned clause file, the syntactic collocation relationship between different entities is pointed out, and then triple data in the format of "head entity-relationship-tail entity" is extracted.
[0028] Preferably, the circuit simulation experiment knowledge vector representation method based on the TransR algorithm in step S202 specifically includes:
[0029] For each triple (h, r, t) in the format of "head entity-relationship-tail entity" outputted in claim 3, the head and tail entities are represented in the entity space, the relationship is represented in the relationship space, and for each relationship r, there is a mapping matrix W r , through this matrix, h, t are mapped to the space where the relationship r is located, and h is obtained r and t r , so that h r +r=t r , where h r and t r is defined as follows:
[0030] h r =hW r
[0031] t r =tW r
[0032] The scoring functions of the corresponding entities h and t under the relationship r are as follows:
[0033]
[0034] Among them, h represents the head entity, t represents the tail entity, and h r and tr They represent the head entity and tail entity mapped in the relational space, r represents the relation, and W r Represents the mapping matrix.
[0035] Furthermore, the most appropriate relationship between entities is obtained by calculating the scores of entities under different relationships.
[0036] Preferably, step S203 constructs a circuit simulation experiment fault knowledge graph and uses OrientDB to store it, specifically including:
[0037] Step S501: Build a knowledge graph ontology model. The first step is to determine the ontology construction goal and professional scope, that is, to build an ontology model to cover various types of faults that may occur in circuit simulation experiments and their solutions; the second step is to consider the reuse of the ontology, that is, to analyze whether it is possible to save energy by using the existing ontology; the third step is to list important terms, that is, the entities extracted by the circuit simulation experiment knowledge extraction method described in claim 3; the fourth step is to define the class hierarchy, and according to the important terms listed in the third step, the important terms are divided into five categories: "experimental category", "fault category", "fault cause", "fault consequence", and "solution"; the fifth step is to define the attributes of the class, including the name of the class, 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 an instance;
[0038] Step S502: constructing a circuit simulation experiment fault knowledge graph according to the constructed ontology model of the circuit simulation experiment fault knowledge graph and the circuit simulation experiment fault cause knowledge vector obtained by the TransR algorithm;
[0039] Step S503: Store the constructed knowledge graph in the graph database of OrientDB. First, construct entity nodes. Create entity nodes according to 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 category, fault category, fault cause, fault consequence and solution. Secondly, construct relationship connections between entity nodes. According to the circuit simulation experiment fault knowledge graph, add corresponding relationship connections between entity nodes. The relationships between entity nodes include fault category, fault cause, fault consequence and solution.
[0040] Preferably, the circuit simulation experiment planning knowledge graph described in step S102 is manually constructed, and the knowledge graph includes the experimental objectives, teaching outline, and various experimental projects designed by the experimental instructor of the circuit simulation experiment course, specifically including:
[0041] Experimental categories, covering different types of circuit simulation experiments, such as basic circuit experiments, analog circuit experiments, and digital circuit experiments; experimental topics, each experimental category will involve different experimental topics, defining the specific goals and methods of the experiment, such as Ohm's law verification in basic circuits, charging and discharging experiments in capacitor circuits; topic-related knowledge, each experimental topic will be linked to the core knowledge points related to the experiment, such as Ohm's law, formulas, and fault diagnosis methods; a list of experiments of the corresponding type, after students complete the fault experiment under the guidance of fault analysis, they can link to other experiments of the same type or in related fields.
[0042] Preferably, the feature extraction technology of the circuit simulation experiment operation data in step S103 specifically comprises the following steps:
[0043] Step S701: Collecting original student circuit simulation experiment operation data, wherein the experiment operation data includes circuit components and experiment instrument categories, models and operation information; wherein the operation information includes the operation type of the experiment instrument and the information of the experiment instrument associated with the current operation; the operation type includes adding, connecting and deleting operations of the experiment instrument;
[0044] Step S702: Data cleaning, analyzing the student circuit simulation experiment operation data, extracting all the student connection operations, filtering out repeated connections, deleting connections and data reading behaviors, and obtaining the student's valid connection operation data;
[0045] Step S703: feature construction, using a one-hot encoding method to encode the extracted and cleaned valid connection operation data, and using the encoded result as the categorical feature of the cleaned data.
[0046] Preferably, the circuit simulation experiment type identification technology based on the LightGBM algorithm in step S104 specifically comprises the following steps:
[0047] Step 1: Divide the characterized sample data obtained in claim 7 into a training sample set and a test sample set in a ratio of 5:2;
[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 sets to predict the model, further adjust the model parameters according to the prediction results, and obtain the trained LightGBM circuit simulation experiment type recognition model.
[0050] Preferably, the circuit simulation experiment fault analysis method based on collaborative filtering algorithm described in step S105 specifically comprises the following steps:
[0051] Step S901: Calculate circuit similarity. According to the circuit structure of the current student and the circuit structure of other students, construct a circuit connection matrix of size m×m, where m is the number of components used in the circuit. When two components are at the two 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 circuit of the current student and the circuit of other students. The specific calculation method is as follows:
[0052]
[0053] Among them, c u and c q represent the circuit of the current student and the circuit of the qth other student, respectively, v u and v q Respectively represent circuit c u and c q According to the circuit connection matrix conversion m×m dimensional vector, v u,l and v q,l Respectively represent the vector v u and v q The lth element in ;
[0054] Step S902: Calculate the circuit-experimental fault score matrix, select TOP-N similar circuits according to the circuit similarity, calculate the circuit-experimental fault score matrix, if a certain experimental fault has occurred in the similar circuit, it is considered that the score of the similar circuit for the experimental fault is 1; if a certain experimental fault has not occurred in the similar circuit, it is considered that the score of the similar circuit for the experimental fault is 0;
[0055] Step S903: Calculate the experimental fault prediction score. According to the circuit similarity between the student's current circuit and the TOP-N similar circuits and the circuit-experimental fault score matrix, calculate the prediction score P of the current student circuit when the fth experimental fault occurs. f , the specific calculation method is as follows:
[0056]
[0057] Where N represents the number of similar circuits selected according to the similarity of the circuit connection matrix, c u represents the student's current circuit, c p represents the pth similar circuit among the similar circuits selected above, s p Represents circuit c p The sum of the scores for all experimental failures, s p,f Represents circuit c p The score for the fth experimental failure;
[0058] Step S904: recommend to students 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, sort the experimental fault prediction scores calculated above, and the experimental fault with the highest score is the most likely fault for the students; then recommend the corresponding fault causes, fault results and troubleshooting methods to students based on the circuit simulation experiment fault knowledge graph.
[0059] Preferably, the online guidance method based on the circuit simulation experiment planning knowledge graph described in step S106 specifically includes:
[0060] The experimental category obtained from claim 8 and the fault-related knowledge obtained from claim 9 are input into the circuit simulation experiment planning knowledge graph, and the corresponding categories of circuit simulation experiments and related knowledge are matched to obtain an experimental list of the corresponding experimental knowledge type, so as to guide students online and provide students with the next step of circuit simulation experiment planning.
[0061] Compared with the existing circuit simulation experiment teaching method, the present invention has the following advantages:
[0062] 1. The present invention uses knowledge graphs to assist in the fault analysis and online guidance of circuit simulation experiments. By constructing knowledge graphs for circuit simulation experiment faults and knowledge graphs for circuit simulation experiment planning, the information such as experiment categories, fault causes, solutions, experimental objectives, and syllabus is systematized, providing two complete knowledge networks that can quickly query and associate relevant knowledge, ensuring the accuracy and comprehensiveness of fault analysis and online guidance. In addition, the knowledge graph is more structured and dynamic, easy to expand and update, and makes knowledge management in experiments more intelligent and precise.
[0063] 2. The present invention uses the LightGBM algorithm model to identify the type of circuit simulation experiments, which can improve the accuracy of students' circuit simulation experiment operation type identification. LightGBM has high performance and good generalization ability, can process a large amount of high-dimensional data, makes the process of experimental identification more automated, and improves the real-time and interactivity of experimental teaching.
[0064] 3. The present invention uses a collaborative filtering algorithm to predict the faults of students' circuit simulation experiments, and combines the knowledge map of circuit simulation experiment faults to provide students with fault analysis and guidance. By analyzing the circuit simulation experiment situations of similar students, it helps students locate problems quickly and accurately, avoids the common troubleshooting delays in experiments, and provides students with timely experimental guidance, thereby improving students' learning efficiency.
[0065] 4. The present invention provides students with online guidance for the next step of experimental planning based on the knowledge graph of circuit simulation experiment planning. According to the students' operating habits, experimental types and fault prediction results, it dynamically provides personalized online guidance and planning for circuit simulation experiments, ensuring that students receive targeted guidance in the experiment and improving learning effects. In addition, this online guidance method is more flexible and adaptable, which not only improves students' autonomous learning ability, but also reduces the burden of experimental guidance. BRIEF DESCRIPTION OF THE DRAWINGS
[0066] Figure 1 A flow chart of a circuit simulation experiment fault analysis and online guidance method based on knowledge graph and collaborative filtering provided in an embodiment of the present invention.
[0067] Figure 2 A flow chart of a method for constructing a circuit simulation experiment fault knowledge graph provided in an embodiment of the present invention.
[0068] Figure 3 A flow chart of a circuit simulation experiment knowledge extraction method for entity extraction based on the TF-IDF algorithm and open Chinese entity relationship extraction based on dependency syntax analysis provided in an embodiment of the present invention.
[0069] Figure 4 This is an example diagram of a circuit simulation experiment fault knowledge graph provided in an embodiment of the present invention.
[0070] Figure 5 An example diagram of a circuit simulation experiment planning knowledge graph provided in an embodiment of the present invention.
[0071] Figure 6 A flow chart of a method for extracting features from circuit simulation experiment operation data provided by an embodiment of the present invention.
[0072] Figure 7 A flow chart of a circuit simulation experiment fault analysis method based on a collaborative filtering algorithm provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0073] In order to make the features and advantages of the present invention more obvious and understandable, the present invention is described in detail below with reference to the accompanying drawings and specific embodiments.
[0074] Figure 1 This is a flow chart of a circuit simulation experiment fault analysis and online guidance method based on knowledge graph and collaborative filtering according to an embodiment of the present invention. Figure 1 As shown, an embodiment of the present invention provides a circuit simulation experiment fault analysis and online guidance method based on knowledge graph and collaborative filtering, the method comprising:
[0075] Step S101: constructing a circuit simulation experiment fault knowledge graph;
[0076] Step S102: manually constructing a circuit simulation experiment planning knowledge graph;
[0077] Step S103: extracting features from the original student circuit simulation experiment operation data;
[0078] Step S104: establishing a LightGBM algorithm recognition model to identify the type of circuit simulation experiment;
[0079] Step S105: using collaborative filtering algorithm to provide students with circuit simulation experiment fault analysis;
[0080] Step S106: Providing students with online guidance for circuit simulation experiments based on the circuit simulation experiment planning knowledge graph.
[0081] Step S101 provides a method for constructing a circuit simulation experiment fault knowledge graph, such as Figure 2 As shown, the specific steps include:
[0082] Step S201: extracting circuit simulation experiment knowledge using entity extraction based on TF-IDF algorithm and an open Chinese entity relationship extraction method based on dependency syntax analysis;
[0083] Step S202: using the TransR algorithm to vectorize the extracted circuit simulation experiment knowledge;
[0084] Step S203: construct a circuit simulation experiment fault knowledge graph and use OrientDB to store it.
[0085] Step S201 provides a circuit simulation experiment knowledge extraction method, such as Figure 3 As shown, the specific steps include:
[0086] Step S301: Collecting electronic versions of experimental instruction documents of previous circuit simulation experimental courses and electronic versions of experimental report documents submitted by students;
[0087] Step S302: Read all the files collected above, delete escape characters such as spaces in the files, and save the sentences into the same sentence file in csv format or txt format, wherein each line in the sentence file represents a sentence of all the files collected above;
[0088] Step S303: performing word segmentation processing on the sentence file generated above, and recording the result of the word segmentation processing into a new word segmentation file in csv format or txt format, wherein each line in the word segmentation file represents the result of the word segmentation processing on each sentence in the sentence file, and the word segments of the same sentence are separated by commas;
[0089] Step S304: Calculate the TF-IDF value of the word segmentation. Use the TF-IDF algorithm to calculate the TF value and IDF value of each different word segmentation in the aforementioned word segmentation file, and obtain a dictionary consisting of each different word segmentation and its corresponding TF-IDF value. TF refers to the word 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 segmentation. The specific calculation method of the TF-IDF value is as follows:
[0090]
[0091]
[0092] Among them, TF i Indicates the frequency of word i appearing in the word segmentation file, ∑ j n ij represents the total number of occurrences of word i in the word segmentation file, j represents the jth line in the word segmentation file, ∑ j ∑ k n kj represents the total number of occurrences of all words in the word segmentation file, k represents each different word in the word segmentation file, |D| represents the total number of lines in the word segmentation file, and t i Indicates the number of rows containing word i;
[0093] Step S305: sorting according to the calculated TF-IDF values of the word segments;
[0094] Step S306: extracting important words according to the results of the above-mentioned word segmentation sorting, and letting the circuit simulation experiment instructor manually review the extracted important words, discarding the unimportant words and supplementing the important words related to the circuit simulation experiment, and taking the important words manually reviewed and processed by the experiment instructor as entities to complete entity extraction;
[0095] Step S307: Use an open Chinese entity relationship extraction method based on dependency syntactic analysis to extract the relationship between entities. By analyzing the dependency relationships between the extracted different entities in the clauses in the aforementioned clause file, the syntactic collocation relationship between different entities is pointed out, and then triple data in the format of "head entity-relationship-tail entity" is extracted.
[0096] Step S202 provides a circuit simulation experiment knowledge vector representation method based on the TransR algorithm, specifically including:
[0097] For each triple (h, r, t) in the format of "head entity-relationship-tail entity" output in step S307, the head and tail entities are represented in the entity space, and the relationship is represented in the relationship space. Moreover, for each relationship r, there is a mapping matrix W r, through this matrix, h, t are mapped to the space where the relationship r is located, and h is obtained r and t r , so that h r +r=t r , where h r and t r is defined as follows:
[0098] h r =hW r
[0099] t r =tW r
[0100] The scoring functions of the corresponding entities h and t under the relationship r are as follows:
[0101]
[0102] Among them, h represents the head entity, t represents the tail entity, and h r and t r They represent the head entity and tail entity mapped in the relational space, r represents the relation, and W r Represents the mapping matrix.
[0103] Furthermore, the most appropriate relationship between entities is obtained by calculating the scores of entities under different relationships.
[0104] Step S203 provides a method for building and storing a circuit simulation experiment fault knowledge graph based on the OrientDB database, specifically including:
[0105] Step S501: Build a knowledge graph ontology model. The first step is to determine the ontology construction goal and professional scope, that is, to build an ontology model to cover various types of faults that may occur in circuit simulation experiments and their solutions; the second step is to consider the reuse of the ontology, that is, to analyze whether it is possible to save energy by using the existing ontology; the third step is to list important terms, that is, the entities extracted by the circuit simulation experiment knowledge extraction method described in claim 3; the fourth step is to define the class hierarchy, and according to the important terms listed in the third step, the important terms are divided into five categories: "experimental category", "fault category", "fault cause", "fault consequence", and "solution"; the fifth step is to define the attributes of the class, including the name of the class, 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 an instance;
[0106] Step S502: constructing a circuit simulation experiment fault knowledge graph according to the constructed ontology model of the circuit simulation experiment fault knowledge graph and the circuit simulation experiment fault cause knowledge vector obtained by the TransR algorithm;
[0107] Step S503: Store the constructed circuit simulation experiment knowledge graph in the graph database of OrientDB. First, construct entity nodes. Create entity nodes according to 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 category, fault category, fault cause, fault consequence and solution. Secondly, construct the relationship connection between entity nodes. According to the circuit simulation experiment fault knowledge graph, add corresponding relationship connection between entity nodes. The relationship between entity nodes includes fault category, fault cause, fault consequence and solution. Figure 4 As shown, a circuit simulation experiment fault knowledge graph including experiment category, fault category, fault cause, fault consequence and solution is finally obtained.
[0108] Step S102 provides a method for manually constructing a circuit simulation experiment planning knowledge graph, such as Figure 5 As shown, specifically including:
[0109] Experimental categories, covering different types of circuit simulation experiments, such as basic circuit experiments, analog circuit experiments, and digital circuit experiments; experimental topics, each experimental category will involve different experimental topics, defining the specific goals and methods of the experiment, such as Ohm's law verification in basic circuits, charging and discharging experiments in capacitor circuits; topic-related knowledge, each experimental topic will be linked to the core knowledge points related to the experiment, such as Ohm's law, formulas, and fault diagnosis methods; a list of experiments of the corresponding type, after students complete the fault experiment under the guidance of fault analysis, they can link to other experiments of the same type or in related fields.
[0110] Step S103 provides a method for extracting features of circuit simulation experiment operation data, such as Figure 6 As shown, the specific steps include:
[0111] Step S701: Collecting original student circuit simulation experiment operation data, the experiment operation data includes circuit components and experiment instrument categories, models and operation information; wherein the operation information includes the operation type of the experiment instrument and the information of the experiment instrument associated with the current operation; the operation type includes adding, connecting and deleting operations of the experiment instrument;
[0112] Step S702: Data cleaning, analyzing the student circuit simulation experiment operation data, extracting all the student connection operations, filtering out repeated connections, deleting connections and data reading behaviors, and obtaining the student's valid connection operation data;
[0113] Step S703: feature construction, using a one-hot encoding method to encode the extracted and cleaned valid connection operation data, and using the encoded result as the categorical feature of the cleaned data.
[0114] Step S104 provides a circuit simulation experiment type identification method based on the LightGBM algorithm, which specifically includes:
[0115] Step 1: Divide the characterized sample data obtained in claim 7 into a training sample set and a test sample set in a ratio of 5:2;
[0116] Step 2: Input the training sample set into the LightGBM algorithm model for training and adjust the model parameters;
[0117] Step 3: Use the remaining test sample sets to predict the model, further adjust the model parameters according to the prediction results, and obtain the trained LightGBM circuit simulation experiment type recognition model.
[0118] Step S105 provides a circuit simulation experiment fault analysis method based on collaborative filtering algorithm, such as Figure 7 As shown, the specific steps include:
[0119] Step S901: Calculate circuit similarity. According to the circuit structure of the current student and the circuit structure of other students, construct a circuit connection matrix of size m×m, where m is the number of components used in the circuit. When two components are at the two 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 circuit of the current student and the circuit of other students. The specific calculation method is as follows:
[0120]
[0121] Among them, c u and c q represent the circuit of the current student and the circuit of the qth other student, respectively, v u and v q Respectively represent circuit c u and c q According to the circuit connection matrix conversion m×m dimensional vector, v u,l and v q,l Respectively represent the vector v u and v q The lth element in ;
[0122] Step S902: Calculate the circuit-experimental fault score matrix, select TOP-N similar circuits according to the circuit similarity, calculate the circuit-experimental fault score matrix, if a certain experimental fault has occurred in the similar circuit, it is considered that the score of the similar circuit for the experimental fault is 1; if a certain experimental fault has not occurred in the similar circuit, it is considered that the score of the similar circuit for the experimental fault is 0;
[0123] Step S903: Calculate the experimental fault prediction score. According to the circuit similarity between the student's current circuit and the TOP-N similar circuits and the circuit-experimental fault score matrix, calculate the prediction score P of the current student circuit when the fth experimental fault occurs. f , the specific calculation method is as follows:
[0124]
[0125] Where N represents the number of similar circuits selected according to the similarity of the circuit connection matrix, c u represents the student's current circuit, c p represents the pth similar circuit among the similar circuits selected above, s p Represents circuit c p The sum of the scores for all experimental failures, s p,f Represents circuit c p The score for the fth experimental failure;
[0126] Step S904: recommend to students 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, sort the experimental fault prediction scores calculated above, and the experimental fault with the highest score is the most likely fault for the students; then recommend the corresponding fault causes, fault results and troubleshooting methods to students based on the circuit simulation experiment fault knowledge graph.
[0127] Step S106 provides a circuit simulation experiment online guidance method based on the circuit simulation experiment planning knowledge graph, which specifically includes:
[0128] The experimental category obtained from claim 8 and the fault-related knowledge obtained from claim 9 are input into the circuit simulation experiment planning knowledge graph, and the corresponding categories of circuit simulation experiments and related knowledge are matched to obtain an experimental list of the corresponding experimental knowledge type, so as to guide students online and provide students with the next step of circuit simulation experiment planning.
Claims
1. Circuit simulation experiment fault analysis and online guidance method based on knowledge graph and collaborative filtering, characterized in that: The following steps are involved: Step S101: Collect relevant files of historical circuit simulation experiments and construct a knowledge graph of circuit simulation experiment failures. This knowledge graph includes experiment categories, failure categories, failure causes, failure consequences, and solutions. Step S102: The experimental instructor manually constructs a circuit simulation experiment planning knowledge graph, inputs the experimental objectives and syllabus of the circuit simulation experiment course, and obtains a circuit simulation experiment planning knowledge graph including experimental categories, experimental topics, topic-related knowledge, and a list of corresponding types of experiments; Step S103: extracting features from the original student circuit simulation experiment operation data, collecting the original student experiment operation data as input, which includes the type, model and operation information of the experimental instrument, and outputting the characterized 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, train the LightGBM recognition model, and finally output the type of the current circuit simulation experiment; Step S105: using collaborative filtering algorithm to provide students with circuit simulation experiment failure analysis, firstly calculating and ranking the experimental failure prediction scores, predicting circuit simulation experiment failures, and then recommending corresponding failure causes, consequences and solutions to students based on the circuit simulation experiment failure knowledge graph; Step S106: Use a method based on the circuit simulation experiment planning knowledge graph to provide students with online guidance for circuit simulation experiments. Input the experiment categories and fault causes obtained in steps S104 and S105 into the circuit simulation experiment planning knowledge graph to match the corresponding categories of circuit simulation experiments and related knowledge, and provide students with the next step of circuit simulation experiment planning.
2. The circuit simulation experiment fault analysis and online guidance method based on knowledge graph and collaborative filtering according to claim 1 is characterized in that The construction technology of the circuit simulation experiment fault knowledge graph described in step S101 specifically includes the following steps: Step S201: extracting circuit simulation experiment knowledge using entity extraction based on TF-IDF algorithm and an open Chinese entity relationship extraction method based on dependency syntax analysis; Step S202: using the TransR algorithm to vectorize the extracted circuit simulation experiment knowledge; Step S203: construct a circuit simulation experiment fault knowledge graph and use OrientDB to store it.
3. The circuit simulation experiment fault knowledge graph construction technology according to claim 2 is characterized in that The circuit simulation experiment knowledge extraction method based on TF-IDF algorithm entity extraction and open Chinese entity relationship extraction based on dependency syntax analysis includes the following specific steps: Step S301: Collecting electronic versions of experimental instruction documents of previous circuit simulation experimental courses and electronic versions of experimental report documents submitted by students; Step S302: Read all the files collected above, delete escape characters such as spaces in the files, and save the sentences into the same sentence file in csv format or txt format, wherein each line in the sentence file represents a sentence of all the files collected above; Step S303: performing word segmentation processing on the sentence file generated above, and recording the result of the word segmentation processing into a new word segmentation file in csv format or txt format, wherein each line in the word segmentation file represents the result of the word segmentation processing on each sentence in the sentence file, and the word segments of the same sentence are separated by commas; Step S304: Calculate the TF-IDF value of the word segmentation. Use the TF-IDF algorithm to calculate the TF value and IDF value of each different word segmentation in the aforementioned word segmentation file, and obtain a dictionary consisting of each different word segmentation and its corresponding TF-IDF value. TF refers to the word 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 segmentation. The specific calculation method of the TF-IDF value is as follows: Among them, TF i Indicates the frequency of word i appearing in the word segmentation file, ∑ j n ij represents the total number of occurrences of word i in the word segmentation file, j represents the jth line in the word segmentation file, ∑ j ∑ k n kj represents the total number of occurrences of all words in the word segmentation file, k represents each different word in the word segmentation file, |D| represents the total number of lines in the word segmentation file, and t i Indicates the number of rows containing word i; Step S305: sorting according to the calculated TF-IDF values of the word segments; Step S306: extracting important words according to the results of the above-mentioned word segmentation sorting, and letting the circuit simulation experiment instructor manually review the extracted important words, discarding the unimportant words and supplementing the important words related to the circuit simulation experiment, and taking the important words manually reviewed and processed by the experiment instructor as entities to complete entity extraction; Step S307: Use an open Chinese entity relationship extraction method based on dependency syntactic analysis to extract the relationship between entities. By analyzing the dependency relationship between the extracted different entities in the clauses in the aforementioned clause file, the syntactic collocation relationship between different entities is pointed out, and then the triple data in the format of "head entity-relationship-tail entity" is extracted.
4. The circuit simulation experiment fault knowledge graph construction technology according to claim 2 is characterized in that The circuit simulation experiment knowledge vector representation method based on the TransR algorithm specifically includes: For each triple (h, r, t) in the format of "head entity-relationship-tail entity" outputted in claim 3, the head and tail entities are represented in the entity space, the relationship is represented in the relationship space, and for each relationship r, there is a mapping matrix W r , through this matrix, h, t are mapped to the space where the relationship r is located, and h is obtained r and t r , so that 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 of the corresponding entities h and t under the relationship r are as follows: Among them, h represents the head entity, t represents the tail entity, and h r and t r They represent the head entity and tail entity mapped in the relational space, r represents the relation, and W r Represents the mapping matrix. Furthermore, the most appropriate relationship between entities is obtained by calculating the scores of entities under different relationships.
5. The circuit simulation experiment fault knowledge graph construction technology according to claim 2 is characterized in that Construct a circuit simulation experiment fault knowledge graph and use OrientDB to store it, including: Step S501: Build a knowledge graph ontology model. The first step is to determine the ontology construction goal and professional scope, that is, to build an ontology model to cover various types of faults that may occur in circuit simulation experiments and their solutions; the second step is to consider the reuse of the ontology, that is, to analyze whether it is possible to save energy by using the existing ontology; the third step is to list important terms, that is, the entities extracted by the circuit simulation experiment knowledge extraction method described in claim 3; the fourth step is to define the class hierarchy, and according to the important terms listed in the third step, the important terms are divided into five categories: "experimental category", "fault category", "fault cause", "fault consequence", and "solution"; the fifth step is to define the attributes of the class, including the name of the class, 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 an instance; Step S502: constructing a circuit simulation experiment fault knowledge graph according to the constructed ontology model of the circuit simulation experiment fault knowledge graph and the circuit simulation experiment fault cause knowledge vector obtained by the TransR algorithm; Step S503: Store the constructed knowledge graph in the graph database of OrientDB. First, construct entity nodes. Create entity nodes according to 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 category, fault category, fault cause, fault consequence and solution. Secondly, construct relationship connections between entity nodes. According to the circuit simulation experiment fault knowledge graph, add corresponding relationship connections between entity nodes. The relationships between entity nodes include fault category, fault cause, fault consequence and solution.
6. The circuit simulation experiment fault analysis and online guidance method based on knowledge graph and collaborative filtering according to claim 1 is characterized in that Step S102 is the manual construction of the circuit simulation experiment planning knowledge graph, which contains the experimental objectives, teaching outlines and various experimental projects designed by the experimental instructor of the circuit simulation experiment course, including: Experimental categories, covering different types of circuit simulation experiments, such as basic circuit experiments, analog circuit experiments, and digital circuit experiments; experimental topics, each experimental category will involve different experimental topics, defining the specific goals and methods of the experiment, such as Ohm's law verification in basic circuits, charging and discharging experiments in capacitor circuits; topic-related knowledge, each experimental topic will be linked to the core knowledge points related to the experiment, such as Ohm's law, formulas, and fault diagnosis methods; a list of experiments of the corresponding type, after students complete the fault experiment under the guidance of fault analysis, they can link to other experiments of the same type or in related fields.
7. The circuit simulation experiment fault analysis and online guidance method based on knowledge graph and collaborative filtering according to claim 1 is characterized in that The feature extraction technology of the circuit simulation experiment operation data in step S103 specifically comprises the following steps: Step S701: Collecting original student circuit simulation experiment operation data, wherein the experiment operation data includes circuit components and experiment instrument categories, models and operation information; wherein the operation information includes the operation type of the experiment instrument and the information of the experiment instrument associated with the current operation; the operation type includes adding, connecting and deleting operations of the experiment instrument; Step S702: Data cleaning, analyzing the student circuit simulation experiment operation data, extracting all the student connection operations, filtering out repeated connections, deleting connections and data reading behaviors, and obtaining the student's valid connection operation data; Step S703: feature construction, using a one-hot encoding method to encode the extracted and cleaned valid connection operation data, and using the encoded result as the categorical feature of the cleaned data.
8. The circuit simulation experiment fault analysis and online guidance method based on knowledge graph and collaborative filtering according to claim 1 is characterized in that The circuit simulation experiment type identification technology based on the LightGBM algorithm described in step S104 specifically comprises the following steps: first, dividing the characterized sample data obtained in claim 7 into a training sample set and a test sample set in a ratio of 5:2; secondly, inputting the training sample set into the LightGBM algorithm model for training and adjusting the model parameters; finally, using the remaining test sample set to predict the model, further adjusting the model parameters according to the prediction results, and obtaining a trained LightGBM circuit simulation experiment type identification model.
9. The circuit simulation experiment fault analysis and online guidance method based on knowledge graph and collaborative filtering according to claim 1 is characterized in that The circuit simulation experiment fault analysis method based on collaborative filtering algorithm described in step S105 specifically comprises the following steps: Step S901: Calculate circuit similarity. According to the circuit structure of the current student and the circuit structure of other students, construct a circuit connection matrix of size m×m, where m is the number of components used in the circuit. When two components are at the two 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 circuit of the current student and the circuit of other students. The specific calculation method is as follows: Among them, c u and c q represent the circuit of the current student and the circuit of the qth other student, respectively, v u and v q Respectively represent circuit c u and c q According to the circuit connection matrix conversion m×m dimensional vector, v u,l and v q,l Respectively represent the vector v u and v q The lth element in ; Step S902: Calculate the circuit-experimental fault score matrix, select TOP-N similar circuits according to the circuit similarity, calculate the circuit-experimental fault score matrix, if a certain experimental fault has occurred in the similar circuit, it is considered that the score of the similar circuit for the experimental fault is 1; if a certain experimental fault has not occurred in the similar circuit, it is considered that the score of the similar circuit for the experimental fault is 0; Step S903: Calculate the experimental fault prediction score. According to the circuit similarity between the student's current circuit and the TOP-N similar circuits and the circuit-experimental fault score matrix, calculate the prediction score P of the current student circuit when the fth experimental fault occurs. f , the specific calculation method is as follows: Where N represents the number of similar circuits selected according to the similarity of the circuit connection matrix, c u represents the student's current circuit, c p represents the pth similar circuit among the similar circuits selected above, s p Represents circuit c p The sum of the scores for all experimental failures, s p,f Represents circuit c p The score for the fth experimental failure; Step S904: recommend to students 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, sort the experimental fault prediction scores calculated above, and the experimental fault with the highest score is the most likely fault for the students; then recommend the corresponding fault causes, fault results and troubleshooting methods to students based on the circuit simulation experiment fault knowledge graph.
10. The circuit simulation experiment fault analysis and online guidance method based on knowledge graph and collaborative filtering according to claim 1 is characterized in that The online guidance method based on the circuit simulation experiment planning knowledge graph described in step S106 specifically includes: The experimental category obtained from claim 8 and the fault-related knowledge obtained from claim 9 are input into the circuit simulation experiment planning knowledge graph, and the corresponding categories of circuit simulation experiments and related knowledge are matched to obtain an experimental list of the corresponding experimental knowledge type, so as to guide students online and provide students with the next step of circuit simulation experiment planning.
Citation Information
Patent Citations
Trustworthy structural synthesis and expert knowledge extraction with application to analog circuit design
CA2666027A1
Scientific experiment simulation method based on generative adversarial network, system and equipment
CN113470448A
Experimental simulation method and device and computer program product
CN114781116A
VR live-action teaching model big data teaching knowledge mining method and system
CN116596071A
Three-dimensional simulation training system for power grid automation equipment
CN118135878A
