Electronic note optimization method and system based on knowledge graph
By using a knowledge graph-based approach, a comprehensive evaluation model is constructed using user behavior data and self-assessment data. The graph nodes are dynamically expanded, which solves the problem that traditional electronic note-taking systems cannot identify the inherent connections between knowledge. This enables personalized note optimization and learning suggestions, improving learning efficiency and the semantic coherence of note content.
Patent Information
- Application Number
- CN202510950182.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-10
- Publication Date
- 2025-10-31
AI Technical Summary
Traditional electronic note-taking systems lack the ability to uncover the inherent connections between knowledge and cannot automatically identify and link the hierarchical and causal relationships between concepts. As a result, users may miss semantically related but not directly mentioned note content when searching by keywords.
We employ a knowledge graph-based approach, acquiring users' historical behavior data and self-assessment data to construct a comprehensive evaluation model. We use a BERT pre-trained model to calculate semantic similarity, dynamically expand graph nodes to form primary and secondary domain knowledge graphs, and optimize parameters using a random forest model and Bayesian optimization algorithm to supplement missing knowledge points and enhance the semantic coherence of the notes content.
It enables personalized learning suggestions and note optimization, improves learning efficiency, enhances the semantic coherence and completeness of note content, reduces the workload of manually building knowledge graphs, and improves model training efficiency and computational efficiency.
Smart Images

Figure CN120873161A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent education, specifically providing a knowledge graph-based electronic note-taking optimization method and system. Background Technology
[0002] Digitizing paper notes offers numerous advantages, making them easier to manage, search, and share.
[0003] Traditional electronic note-taking systems typically store notes simply as text, lacking the ability to uncover the inherent connections between pieces of knowledge. For example, when taking notes on the topic of "history," a user might involve multiple related concepts such as "ancient civilizations," "the Renaissance," and "the Industrial Revolution." These concepts may have hierarchical relationships (e.g., "the Renaissance" is an important stage in "European history") and causal relationships ("the Industrial Revolution" led to "changes in social structure"), but traditional systems cannot automatically identify and connect these relationships.
[0004] When users search for notes, simply using keywords might cause them to miss notes that are semantically related to the search term but don't directly mention it. For example, if a user searches for "Industrial Revolution," the system might not find notes that contain "social structural changes" and actually relate to the Industrial Revolution.
[0005] Therefore, current traditional electronic note-taking systems lack the ability to explore the inherent connections between knowledge and cannot automatically identify and associate hierarchical and causal relationships between concepts. This can cause users to miss semantically related notes that do not directly mention the word when searching by keywords. Summary of the Invention
[0006] The purpose of this application is to provide a knowledge graph-based electronic note optimization method and system, so as to at least solve the technical problem that traditional electronic note systems simply store note content in text form, lack the mining of the inherent connections between knowledge, cannot automatically identify and associate the hierarchical and causal relationships between concepts, and cause users to miss semantically related note content that does not directly mention the word when searching by keywords.
[0007] According to one embodiment of this application, a knowledge graph-based electronic note-taking optimization method is provided;
[0008] This electronic note-taking optimization method includes the following steps:
[0009] S101. Obtain the user's historical behavior data in the note-taking system. The historical behavior data includes note content, search history, favorite notes, and test scores.
[0010] S102. Combining historical behavioral data and user self-evaluation data, a comprehensive evaluation model for pruning the domain knowledge graph is constructed. When pruning the domain knowledge graph, a cross-domain knowledge association mechanism is introduced. The semantic similarity between the current domain knowledge point and other domains is calculated using a BERT pre-trained model. Cross-domain association edges are generated based on an adaptive threshold. Combined with the user's historical cross-domain search data, the graph nodes are dynamically expanded to form a primary and secondary domain knowledge graph. The adaptive threshold is dynamically adjusted using a Bayesian optimization algorithm to adjust the semantic similarity threshold. The adaptive threshold is updated adaptively based on the frequency and accuracy of the user's historical cross-domain search data.
[0011] S103. Use the primary and secondary domain knowledge graphs as reference knowledge graphs, and optimize the user's current note text content based on the reference knowledge graphs.
[0012] Preferably, in step S102, feature extraction is performed on the historical behavior data, and the extracted features are behavioral features, including:
[0013] Note-taking frequency: How often a user takes notes on each knowledge point;
[0014] Search frequency: The frequency with which users search for each knowledge point;
[0015] Collection frequency: How often a user collects notes containing each knowledge point;
[0016] Test scores: The user's test scores on each knowledge point;
[0017] Feature extraction is performed on user self-assessment data to obtain self-assessment features, which include the user's self-assessed mastery level, used to represent the user's subjective mastery level rating for each knowledge point.
[0018] Preferably, in step S102, a comprehensive evaluation model is constructed based on the random forest model, fusing behavioral features and self-assessment features, and a feature matrix for knowledge point i is constructed based on the behavioral features and self-assessment features. Represented as:
[0019]
[0020] in, This represents the frequency characteristic of note recording for knowledge point i. This represents the search frequency characteristic of knowledge point i; This represents the frequency of collection of knowledge point i. Indicates the characteristics of test scores; Indicates self-evaluation characteristics; This indicates the time when the user last recorded a note for knowledge point i. This represents the time difference between two notes taken by the user regarding knowledge point i. This indicates the frequency with which a user records notes on knowledge point i within the most recent period (such as a week or month).
[0021] Preferably, for each feature in the feature matrix, the corresponding tree in the random forest model is selected for prediction, as shown below:
[0022]
[0023] in, This represents the feature value of knowledge point i. This represents the target value of knowledge point i, that is, the degree to which the user has mastered the current knowledge point i in terms of the corresponding feature;
[0024] The user's overall grasp of the current knowledge point i Represented as:
[0025]
[0026] In the formula, Let represent the predicted value of the j-th tree for the feature vector Xi, and n represent the number of trees in the random forest;
[0027] A time decay factor is introduced, and by applying the time decay function to historical data, it can be expressed as:
[0028]
[0029] In the formula, t represents the time difference (such as the time from the user's last action to the present). This indicates the attenuation rate.
[0030] Preferably, in the step of determining the domain of the user's current note text, a text parsing tool based on regular expressions is used to extract the title, body text, annotations, and notes from the current note text. Then, the TF-IDF algorithm is used to extract text features, and the Logistic Regression model is used to classify the extracted features, thus classifying the note into the corresponding knowledge domain.
[0031] Preferably, in the random forest model, the parameters of the random forest model are optimized based on the Bayesian optimization algorithm. The parameters to be optimized include: the number of trees, the maximum depth of the trees, the maximum number of features considered when splitting, and the minimum number of samples required for the leaf nodes.
[0032] When tuning the hyperparameters of a random forest model using Bayesian optimization, Bayesian optimization uses a Gaussian process surrogate model for hyperparameter search.
[0033] Preferably, the step of optimizing the parameters of the random forest model based on the Bayesian optimization algorithm includes:
[0034] Determine the hyperparameters that need to be optimized, including the number of trees, the maximum depth of the trees, the maximum number of features to consider when splitting, and the minimum number of samples required for leaf nodes;
[0035] By fitting the surrogate model using a Gaussian process, the objective function can be expressed as:
[0036]
[0037] in, Represents the mean function, Represents the covariance function;
[0038] Using the Upper Confidence Bound (UCB) as the acquisition function, it is expressed as:
[0039]
[0040] in, This represents the mean. Describing covariance, Indicates the weighting parameter;
[0041] Each iteration updates the surrogate model based on the current combination of hyperparameters, thereby obtaining the optimal hyperparameters.
[0042] Preferably, in step S103:
[0043] Use Natural Language Processing (NLP) to parse users' notes and extract key information.
[0044] The extracted knowledge points are matched with the knowledge points in the trimmed reference knowledge graph;
[0045] Based on the association results, supplement the missing knowledge points in the notes.
[0046] Preferably, step S103 further includes a semantic enhancement and optimization step, used to perform semantic association recommendation using semantic similarity calculation, specifically including:
[0047] Use word embedding models (such as Word2Vec, BERT) to calculate the semantic similarity between words and sentences in the note content;
[0048] This invention uses Word2Vec or BERT pre-trained models to map words or sentences to a high-dimensional vector space;
[0049] The cosine similarity between two vectors is calculated as follows:
[0050]
[0051] In the formula, This represents the dot product of vectors A and B. , Let A and B represent the magnitudes of vectors A and B, respectively.
[0052] To assess the semantic similarity of sentences, the average of each word vector in the sentence is calculated to obtain the sentence vector, and then the similarity between the sentence vectors is calculated.
[0053] Based on semantic similarity, we recommend knowledge points that are semantically related to the content of the notes;
[0054] The optimized notes are sorted based on semantic similarity and the importance of the knowledge points.
[0055] According to another embodiment of this application, a knowledge graph-based electronic note-taking optimization system is provided, comprising the following modules:
[0056] The data acquisition module is used to acquire users' historical behavior data in the note-taking system. The historical behavior data includes note content, search history, saved notes, and test scores.
[0057] The evaluation model construction module is used to build a comprehensive evaluation model for pruning domain knowledge graphs by combining historical behavioral data and user self-evaluation data. When pruning the domain knowledge graph, a cross-domain knowledge association mechanism is introduced. The semantic similarity between current domain knowledge points and other domains is calculated using a BERT pre-trained model. Cross-domain association edges are generated based on an adaptive threshold. The graph nodes are dynamically expanded by combining users' historical cross-domain search data to form a primary and secondary domain knowledge graph. The adaptive threshold is dynamically adjusted by a Bayesian optimization algorithm, and the adaptive threshold is updated adaptively according to the frequency and accuracy of users' historical cross-domain search data.
[0058] The note optimization module uses primary and secondary domain knowledge graphs as reference knowledge graphs to optimize the text content of the user's current notes.
[0059] Compared with existing technologies, the advantages of the knowledge graph-based electronic note-taking optimization method and system of this application are as follows:
[0060] First, by analyzing users' historical behavioral data in the note-taking system, including note content, search history, saved notes, and test scores, this application can gain a deeper understanding of users' learning habits and preferences. Combined with user self-assessment data, the model can more accurately evaluate users' mastery of knowledge points, thereby providing more personalized learning suggestions and note optimization.
[0061] Second, this application can automatically identify the domain to which the user's notes text belongs and automatically generate a domain knowledge graph based on this, reducing the workload and time of manually building the knowledge graph, and dynamically trimming the knowledge graph according to the user's mastery of the knowledge points, ensuring that the content of the knowledge graph is highly relevant to the user's current learning needs, thereby improving learning efficiency;
[0062] Third, by using the Bayesian optimization algorithm to optimize the hyperparameters of the random forest model, the optimal parameter combination can be found in fewer iterations, improving the efficiency of model training; by using a Gaussian process as a surrogate model, the objective function is effectively approximated, reducing the number of times the objective function is directly evaluated and lowering the computational cost.
[0063] Fourth, this application enhances the semantic coherence of the notes by calculating the semantic similarity of words and sentences in the notes, making the notes easier to understand and remember; and supplements the missing knowledge points in the notes with the cropped domain knowledge graph, making the notes more complete and richer.
[0064] In summary, the electronic note optimization method proposed in this application addresses the technical problem that traditional electronic note systems simply store note content in text form, lack the ability to mine the inherent connections between knowledge, and cannot automatically identify and associate hierarchical and causal relationships between concepts. This leads to users potentially missing semantically related but not directly mentioned note content when searching by keywords. Attached Figure Description
[0065] The accompanying drawings, which are provided to further illustrate the invention and constitute a part of this invention, are illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an undue limitation of the invention.
[0066] In the attached diagram:
[0067] Figure 1 This is a flowchart illustrating the implementation of a knowledge graph-based electronic note-taking optimization method according to an embodiment of the present invention.
[0068] Figure 2 This is a sub-flowchart of an electronic note-taking optimization method based on knowledge graphs according to the present invention;
[0069] Figure 3 This is a structural block diagram of an electronic note-taking optimization system based on knowledge graphs according to the present invention.
[0070] Figure 4 This invention provides a structural block diagram of an electronic device. Detailed Implementation
[0071] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.
[0072] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) involved in the embodiments of this disclosure are all information and data authorized by the user or fully authorized by all parties.
[0073] The specific implementation of the present invention will be described in detail below with reference to specific embodiments.
[0074] According to an embodiment of the present invention, an embodiment of an electronic note-taking optimization method based on knowledge graphs is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.
[0075] Figure 1 A flowchart illustrating the implementation of a knowledge graph-based electronic note-taking optimization method, as provided in one embodiment of the present invention;
[0076] Please refer to Figure 1 The electronic note-taking optimization method provided in this application includes the following steps:
[0077] S101. Obtain the user's historical behavior data in the note-taking system. The historical behavior data includes note content, search history, favorite notes, and test scores.
[0078] In step S101 of this embodiment, for the note content of historical behavior data, a text parsing tool (such as regular expression) is used to extract the title, body, annotations, and other parts of the note. The note content is represented as Note={Title, Body, Annotations}, where Title represents the title of the note, Body represents the body of the note, and Annotations represents the annotations and comments in the note.
[0079] In this embodiment, for the search history of historical behavior data, this embodiment also uses regular expressions to extract keywords, records the search time, records the search results clicked by the user and their dwell time, and calculates the user's attention to each search result;
[0080] For example, this invention uses dwell time as a weight to represent the degree of attention, uses the BERT model to perform semantic analysis on search keywords, identifies the user's search intent, and determines whether the user is looking for specific knowledge points or concepts.
[0081] This invention analyzes a user's interest in knowledge points by recording the user's saved notes and their tags;
[0082] For historical behavioral data on saved notes, this invention records information such as the ID, saved time, and tags of saved notes, counts the frequency of users saving different notes, and identifies the knowledge points that users focus on; it extracts key knowledge points and concepts from saved notes for subsequent knowledge graph construction.
[0083] Historical behavioral data includes test scores used to record users' knowledge test scores in the system and to assess their mastery of knowledge points.
[0084] For further details, please refer to [link / reference]. Figure 1 The electronic note-taking optimization method provided in this application embodiment further includes the following steps:
[0085] S102. Combining historical behavior data and user self-evaluation data, construct a comprehensive evaluation model for trimming domain knowledge graphs, wherein the domain knowledge graph is automatically generated based on the domain to which the user's current handwriting text belongs;
[0086] When pruning the domain knowledge graph, a cross-domain knowledge association mechanism is introduced. Specifically, a BERT pre-trained model is used to calculate the semantic similarity between the current domain knowledge points and other domains. Cross-domain association edges are generated based on an adaptive threshold. Combined with the user's historical cross-domain search data, the graph nodes are dynamically expanded to form a primary and secondary domain knowledge graph. The adaptive threshold is dynamically adjusted using a Bayesian optimization algorithm, and the adaptive threshold is updated adaptively based on the frequency and accuracy of the user's historical cross-domain search data.
[0087] In this embodiment of the application, the main domain is determined based on the keyword density and semantic centrality of the user's current note text, and the auxiliary domain is determined based on the weight of the cross-domain association edges, thus forming a main and auxiliary domain knowledge graph;
[0088] Specifically, in step S102, feature extraction is performed on the historical behavior data. The extracted features are behavioral features, including:
[0089] Note-taking frequency: How often a user takes notes on each knowledge point;
[0090] Search frequency: The frequency with which users search for each knowledge point;
[0091] Collection frequency: How often a user collects notes containing each knowledge point;
[0092] Test scores: The user's test scores on each knowledge point;
[0093] Feature extraction is performed on user self-assessment data to obtain self-assessment features, which include the user's self-assessed mastery level, used to represent the user's subjective mastery level rating for each knowledge point (e.g., "Mastered" = 1, "Partially Mastered" = 0.5, "Not Mastered" = 0).
[0094] When constructing a comprehensive evaluation model, behavioral characteristics and self-assessment characteristics are integrated and merged into a single feature vector.
[0095] To accurately assess users' mastery of knowledge points, this invention constructs a comprehensive assessment model based on the random forest model that can simultaneously consider user behavior data and self-assessment data.
[0096] Specifically, in one implementation of the comprehensive evaluation model of this invention, a feature matrix of knowledge point i is constructed based on behavioral features and self-assessment features. Represented as:
[0097]
[0098] in, This represents the frequency characteristic of note recording for knowledge point i. This represents the search frequency characteristic of knowledge point i; This represents the frequency of collection of knowledge point i. Indicates the characteristics of test scores; Indicates self-evaluation characteristics;
[0099] In a preferred embodiment, considering the temporal variation characteristics of user preferences, this application further optimizes the comprehensive evaluation model based on random forest. Specifically, in order to better adapt to the dynamic changes in user preferences, the feature matrix of knowledge point i can also be represented as:
[0100]
[0101] In the formula, This indicates the time when the user last recorded a note for knowledge point i. This represents the time difference between two notes taken by the user regarding knowledge point i. This indicates the frequency of a user's notes on knowledge point i within the most recent period (such as a week or month);
[0102] To better capture changes in user preferences, this invention also introduces a time decay factor. Over time, users' interest in certain knowledge points may diminish. This invention simulates this change by applying a time decay function to historical data, expressed as:
[0103]
[0104] In the formula, t represents the time difference (such as the time from the user's last action to the present). This indicates the attenuation rate.
[0105] Furthermore, in the random forest model, the parameters of the random forest model are optimized based on the Bayesian optimization algorithm. The parameters to be optimized include: the number of trees, the maximum depth of the trees, the maximum number of features to be considered when splitting, and the minimum number of samples required for the leaf nodes.
[0106] Specifically, when adjusting the hyperparameters of the random forest model using the Bayesian optimization algorithm, the Bayesian optimization uses a Gaussian process surrogate model to search for hyperparameters to ensure that the model achieves the best performance.
[0107] The Bayesian optimization process is expressed as follows:
[0108] First, determine the hyperparameters that need to be optimized, including the number of trees, the maximum depth of the trees, the maximum number of features to consider when splitting, and the minimum number of samples required for leaf nodes.
[0109] Then, the surrogate model is fitted using a Gaussian process, and the objective function is expressed as: ,in, Represents the mean function, Represents the covariance function;
[0110] Furthermore, using the Upper Confidence Bound (UCB) as the acquisition function, it is expressed as:
[0111]
[0112] in, This represents the mean. Describing covariance, Indicates the weighting parameter;
[0113] Each iteration updates the surrogate model based on the current combination of hyperparameters, thereby obtaining the optimal hyperparameters.
[0114] In specific implementation, in this embodiment of the application, feature extraction is performed first, including the step of extracting user behavior features, such as note recording frequency, search frequency, collection frequency, test scores, etc.; it also includes the step of extracting note content features, such as note length, number of keywords contained, etc.; and it also includes the step of extracting time features, such as the time of the most recent note recording, search time, collection time, etc.
[0115] After feature extraction, the next step is feature selection. In this embodiment, feature importance scoring or correlation analysis using a random forest model is used to select features that have a significant impact on the target variable.
[0116] Furthermore, the Bayesian optimizer is initialized, and the optimization parameters and their ranges are determined. Preferably, the number of trees is set to [50, 500], the maximum depth of the trees is set to [5, 20], the maximum number of features considered during splitting is set to [0.1, 1.0], and the minimum number of samples required for leaf nodes is set to [1, 10].
[0117] Then, select the surrogate model and the acquisition function, where a Gaussian process is used as the surrogate model, the upper confidence bound (UCB) is selected as the acquisition function, and the weight parameter β is set, such as β=2;
[0118] Furthermore, in the optimization loop, the optimizer is first initialized by inputting the initial hyperparameter combination into the random forest model for training, and the model performance is recorded; then, the following steps are performed in each iteration:
[0119] Use the acquisition function to select the next most promising combination of hyperparameters;
[0120] Train a random forest model and calculate its performance metrics on the training or validation set;
[0121] Update the surrogate model by adding new hyperparameter combinations and their corresponding performance metrics to the training data.
[0122] In an optional embodiment, the mean squared error (MSE) is used as the metric when calculating its performance metrics on the training or validation set.
[0123] Furthermore, if the performance improvement in consecutive iterations falls below a set threshold, the iteration is stopped.
[0124] Finally, in this embodiment of the application, the random forest model is retrained using the optimal combination of hyperparameters and all training data;
[0125] When optimizing note content, the user's current note text is input into a trained model to predict the user's mastery of each knowledge point; based on the prediction results, the user's note content is optimized, such as supplementing missing knowledge points and enhancing semantic coherence.
[0126] For each feature in the feature matrix, the corresponding tree in the random forest model is selected for prediction, as follows:
[0127]
[0128] in, This represents the feature value of knowledge point i. This represents the target value of knowledge point i, that is, the degree to which the user has mastered the corresponding feature of the current knowledge point i.
[0129] Furthermore, the user's overall grasp of the current knowledge point i Represented as:
[0130]
[0131] In the formula, Let represent the predicted value of the j-th tree for the feature vector Xi, and n represent the number of trees in the random forest;
[0132] Furthermore, in this embodiment of the invention, in the step of determining the domain of the user's current note text, the invention uses a text parsing tool based on regular expressions to extract the title, body text, annotations, and other parts of the current note text, then uses the TF-IDF algorithm to extract text features, and uses a logistic regression model to classify the extracted features, thus classifying the notes into the corresponding knowledge domain.
[0133] Furthermore, in the step of dynamically expanding the graph nodes by combining users' historical cross-domain search data, the user's historical cross-domain search behavior is first collected from multiple dimensions to extract key features; the extracted features are then transformed into calculable numerical indicators to construct the basic weights of cross-domain related edges; the basic weights are the weighted sum of frequency weights and feedback weights, where the frequency weights are the search frequency based on keyword pairs, and the feedback weights are calculated by integrating click relevance and interaction depth, such as the user's dwell time on the click results, whether they are saved, and whether they are cited in notes, etc.
[0134] The frequency weight is expressed as:
[0135]
[0136] in, This represents the number of searches from domain A to domain B. This represents the total number of searches from domain A to all other domains;
[0137] In addition, the feedback weight is represented as:
[0138]
[0139] in, This indicates the maximum valid stay time set. , , and These are the weighting coefficients; the weighting system is fitted using Bayesian optimization, with initial values... =0.4、 =0.2、 =0.2 and =0.2.
[0140] Considering the time-sensitivity of user interests, time decay and dynamic adjustment factors are introduced to dynamically adjust the basic weights, resulting in the final weight parameters. Set a minimum weight threshold, retain only cross-domain related edges that are greater than the minimum weight threshold, and filter out noisy searches;
[0141] like ≥0.6 (high weight): Treat nodes in domain B as "core auxiliary domain nodes" and establish strong associations with the main domain nodes;
[0142] If 0.3≤ <0.6 (Medium weight): Nodes in domain B are treated as "extended auxiliary domain nodes", with low weights on associated edges, and are only displayed when the user actively expands the domain.
[0143] Finally, the calculation is recalculated every 24 hours based on the newly added cross-domain search data. It automatically updates the weights of the graph's related edges to ensure they are synchronized with the user's recent interests.
[0144] Please continue to refer to Figure 1 In this embodiment of the invention, the provided electronic note-taking optimization method further includes the following steps:
[0145] S103, Note Optimization Module: This module uses the primary and secondary domain knowledge graphs as reference knowledge graphs to optimize the text content of the user's current notes.
[0146] During the optimization of a user's current note text content, missing related knowledge points can be supplemented based on the reference knowledge graph, erroneous knowledge relationships can be corrected, and suggestions for ranking the importance of knowledge points can be generated; while retaining the user's permission to manually adjust the optimization results.
[0147] like Figure 2 As shown, step S103 provided in this embodiment of the invention specifically includes:
[0148] S1031. Use Natural Language Processing (NLP) technology to parse the user's note text and extract the knowledge points;
[0149] S1032. Match the extracted knowledge points with the knowledge points in the trimmed reference knowledge graph;
[0150] S1033. Based on the association results, supplement the missing knowledge points in the notes.
[0151] Furthermore, step S103 of the present invention also includes a semantic enhancement and optimization step, used to perform semantic association recommendation using semantic similarity calculation, thereby enhancing the semantic coherence of the note content; specifically including:
[0152] Use word embedding models (such as Word2Vec, BERT) to calculate the semantic similarity between words and sentences in the note content;
[0153] This invention uses pre-trained models such as Word2Vec or BERT to map words or sentences to a high-dimensional vector space, and then calculates the cosine similarity between two vectors. The value ranges from [-1, 1], and the closer the value is to 1, the more semantically similar the two vectors are. The calculation method is as follows:
[0154]
[0155] In the formula, This represents the dot product of vectors A and B. , Let A and B represent the magnitudes of vectors A and B, respectively. Further, for the semantic similarity of sentences, the average of each word vector in the sentence is calculated to obtain the sentence vector, and then the similarity between the sentence vectors is calculated.
[0156] Based on semantic similarity, we recommend knowledge points that are semantically related to the content of the notes;
[0157] The optimized notes are sorted based on semantic similarity and the importance of the knowledge points.
[0158] Finally, this embodiment of the invention uses a graphical interface to display the optimized note content, which includes the hierarchical structure and relationship graph of knowledge points; optionally, the optimized content, such as supplementary knowledge points and optimized relationship descriptions, is highlighted in text form.
[0159] Please refer to Figure 3 In another embodiment of this application, a knowledge graph-based electronic note-taking optimization system is provided, which includes the following modules:
[0160] The data acquisition module 201 is used to acquire the user's historical behavior data in the note-taking system. The historical behavior data includes note content, search history, favorite notes, and test scores.
[0161] The evaluation model construction module 202 is used to construct a comprehensive evaluation model for pruning the domain knowledge graph by combining historical behavior data and user self-evaluation data. When pruning the domain knowledge graph, a cross-domain knowledge association mechanism is introduced. The semantic similarity between the current domain knowledge points and other domains is calculated using a BERT pre-trained model. Cross-domain association edges are generated based on an adaptive threshold. The graph nodes are dynamically expanded by combining the user's historical cross-domain search data to form a primary and secondary domain knowledge graph. The adaptive threshold is dynamically adjusted by a Bayesian optimization algorithm, and the adaptive threshold is updated adaptively according to the frequency and accuracy of the user's historical cross-domain search data.
[0162] The note optimization module 203 uses the primary and secondary domain knowledge graphs as reference knowledge graphs to optimize the text content of the user's current notes.
[0163] Please refer to Figure 4 In one embodiment, an electronic device is proposed, the electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the knowledge graph-based electronic note-taking optimization method provided in the above embodiments.
[0164] In another embodiment, this application also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the knowledge graph-based electronic note-taking optimization method provided in the above embodiments.
[0165] It should be understood that although the steps in the flowcharts of the various embodiments of the present invention are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the various embodiments may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least a portion of the sub-steps or stages of other steps.
[0166] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0167] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0168] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.
[0169] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A knowledge graph-based electronic note-taking optimization method, characterized in that, This electronic note-taking optimization method includes the following steps: S101. Obtain the user's historical behavior data in the note-taking system. The historical behavior data includes note content, search history, favorite notes, and test scores. S102. Combining historical behavioral data and user self-evaluation data, a comprehensive evaluation model for pruning the domain knowledge graph is constructed. When pruning the domain knowledge graph, a cross-domain knowledge association mechanism is introduced. The semantic similarity between the current domain knowledge point and other domains is calculated using a BERT pre-trained model. Cross-domain association edges are generated based on an adaptive threshold. Combined with the user's historical cross-domain search data, the graph nodes are dynamically expanded to form a primary and secondary domain knowledge graph. The adaptive threshold is dynamically adjusted using a Bayesian optimization algorithm to adjust the semantic similarity threshold. The adaptive threshold is updated adaptively based on the frequency and accuracy of the user's historical cross-domain search data. S103. Use the primary and secondary domain knowledge graphs as reference knowledge graphs, and optimize the user's current note text content based on the reference knowledge graphs.
2. The knowledge graph-based electronic note-taking optimization method according to claim 1, characterized in that, In step S102, feature extraction is performed on the historical behavior data. The extracted features are behavioral features, including: Note-taking frequency: How often a user takes notes on each knowledge point; Search frequency: The frequency with which users search for each knowledge point; Collection frequency: How often a user collects notes containing each knowledge point; Test scores: The user's test scores on each knowledge point; Feature extraction is performed on user self-assessment data to obtain self-assessment features, which include the user's self-assessed mastery level, used to represent the user's subjective mastery level rating for each knowledge point.
3. The knowledge graph-based electronic note-taking optimization method according to claim 2, characterized in that, In step S102, a comprehensive evaluation model is constructed based on the random forest model, fusing behavioral features and self-assessment features. A feature matrix for knowledge point i is then constructed based on the behavioral features and self-assessment features. Represented as: in, This represents the frequency characteristic of note recording for knowledge point i. This represents the search frequency characteristic of knowledge point i; This represents the frequency of collection of knowledge point i. Indicates the characteristics of test scores; Indicates self-evaluation characteristics; This indicates the time when the user last recorded a note for knowledge point i. This represents the time difference between two notes taken by the user regarding knowledge point i. This indicates the frequency with which a user records notes on knowledge point i within the most recent period.
4. The knowledge graph-based electronic note-taking optimization method according to claim 3, characterized in that, For each feature in the feature matrix, the corresponding tree in the random forest model is selected for prediction, as follows: in, This represents the feature value of knowledge point i. This indicates the user's level of mastery over the current knowledge point i; The user's overall grasp of the current knowledge point i Represented as: In the formula, Let represent the predicted value of the j-th tree for the feature vector Xi, and n represent the number of trees in the random forest; Introducing a time decay factor, the time decay function is applied to historical data and expressed as follows: In the formula, t represents the time difference. This indicates the attenuation rate.
5. The knowledge graph-based electronic note-taking optimization method according to claim 4, characterized in that, In the step of determining the domain of the user's current note text, a text parsing tool based on regular expressions is used to extract the title, body text, annotations, and comments from the current note text; Use the TF-IDF algorithm to extract text features; The extracted features are classified using a logistic regression model, and the notes are categorized into the corresponding knowledge domains.
6. The knowledge graph-based electronic note-taking optimization method according to claim 5, characterized in that, In the random forest model, the parameters of the random forest model are optimized based on the Bayesian optimization algorithm. The parameters to be optimized include: the number of trees, the maximum depth of the trees, the maximum number of features considered when splitting, and the minimum number of samples required for the leaf nodes. When adjusting the hyperparameters of the random forest model using the Bayesian optimization algorithm, the hyperparameter search is performed using a Gaussian process surrogate model.
7. The knowledge graph-based electronic note-taking optimization method according to claim 6, characterized in that, The steps for optimizing the parameters of a random forest model based on the Bayesian optimization algorithm include: Determine the hyperparameters that need to be optimized, including the number of trees, the maximum depth of the trees, the maximum number of features to consider when splitting, and the minimum number of samples required for leaf nodes; By fitting the surrogate model using a Gaussian process, the objective function can be expressed as: in, Represents the mean function, Represents the covariance function; Using the confidence upper bound UCB as the acquisition function, it is expressed as: in, This represents the mean. Describing covariance, Indicates the weighting parameter; Each iteration updates the surrogate model based on the current combination of hyperparameters, thereby obtaining the optimal hyperparameters.
8. The knowledge graph-based electronic note-taking optimization method according to claim 7, characterized in that, In step S103: Use Natural Language Processing (NLP) to parse users' notes and extract key information. The extracted knowledge points are matched with the knowledge points in the trimmed reference knowledge graph; Based on the association results, supplement the missing knowledge points in the notes.
9. The knowledge graph-based electronic note-taking optimization method according to claim 8, characterized in that, Step S103 also includes a semantic enhancement and optimization step, used to perform semantic association recommendation using semantic similarity calculation, specifically including: The semantic similarity between words and sentences in the notes is calculated using a word embedding model; Use Word2Vec or BERT pre-trained models to map words or sentences to a high-dimensional vector space; The cosine similarity between two vectors is calculated as follows: In the formula, This represents the dot product of vectors A and B. , Let A and B represent the magnitudes of vectors A and B, respectively. To assess the semantic similarity of sentences, the average of each word vector in the sentence is calculated to obtain the sentence vector, and then the similarity between the sentence vectors is calculated. Based on semantic similarity, we recommend knowledge points that are semantically related to the content of the notes; The optimized notes are sorted based on semantic similarity and the importance of the knowledge points.
10. An optimization system for implementing the knowledge graph-based electronic note-taking optimization method as described in any one of claims 1 to 9, characterized in that, The optimized system includes the following modules: The data acquisition module is used to acquire users' historical behavior data in the note-taking system. The historical behavior data includes note content, search history, saved notes, and test scores. The evaluation model construction module is used to build a comprehensive evaluation model for pruning domain knowledge graphs by combining historical behavioral data and user self-evaluation data. When pruning the domain knowledge graph, a cross-domain knowledge association mechanism is introduced. The semantic similarity between current domain knowledge points and other domains is calculated using a BERT pre-trained model. Cross-domain association edges are generated based on an adaptive threshold. The graph nodes are dynamically expanded by combining users' historical cross-domain search data to form a primary and secondary domain knowledge graph. The adaptive threshold is dynamically adjusted by a Bayesian optimization algorithm, and the adaptive threshold is updated adaptively according to the frequency and accuracy of users' historical cross-domain search data. The note optimization module uses primary and secondary domain knowledge graphs as reference knowledge graphs to optimize the text content of the user's current notes.
