Value-oriented content selection model establishment method in ideological and political education plan
By combining neural network structures with a hybrid learning framework, the problem of maintaining the consistency of value logic across paragraphs in long texts in ideological and political education lesson plans is solved. This achieves the coherence and accuracy of value judgments in long texts and introduces logical rules to improve the interpretability of the model.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-16
- Publication Date
- 2026-03-31
AI Technical Summary
Existing technologies struggle to effectively model the consistency of value logic across paragraphs in long texts during the evaluation of value orientation in ideological and political education lesson plans, leading to unpredictable and error-prone model judgments.
By employing a neural network structure, combining a long-term dependency modeling algorithm based on temporal memory pools and a hybrid learning framework based on neural symbolic reasoning, selective memory updates are achieved by constructing an external memory storage structure and a forgetting gating unit. Furthermore, a value-oriented content selection model is established by combining a sparse attention mechanism and a sliding window segmented encoding strategy.
It enables the association of value concepts across thousands of words in long texts, maintains the coherence and accuracy of value judgments, and explicitly integrates human logical rules into the neural network learning process, making the model's judgments interpretable.
Smart Images

Figure CN121766413A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of neural network model technology, and specifically, it relates to a method for establishing a content selection model for value orientation in ideological and political education lesson plans. Background Technology
[0002] In the field of content review and quality assessment of ideological and political education lesson plans, traditional value-oriented analysis methods mainly rely on manual paragraph-by-paragraph review or keyword retrieval technology based on shallow semantic matching. These methods compare the content's value orientation with a pre-set value dictionary. However, in current intelligent assessment practices of ideological and political education lesson plans, because lesson plan texts are often lengthy and value statements are scattered across multiple paragraphs, existing neural network models are limited by fixed-length context windows. When processing long texts exceeding several thousand words, they cannot maintain memory of preceding value concepts, resulting in models only making isolated judgments on local paragraphs while ignoring the overall logical coherence of the value structure. Furthermore, existing models lack a mechanism to integrate human-summarized value logic rules into the learning process, making model judgments difficult to interpret and prone to errors contradicting common sense. In other words, existing technologies suffer from the technical problem of effectively modeling the consistency of value logic across paragraphs in long texts during the value-oriented assessment of ideological and political education lesson plans. Summary of the Invention
[0003] In view of this, the present invention provides a method for establishing a content selection model for value orientation in ideological and political education lesson plans, which can solve the technical problem in the prior art that it is difficult to effectively model the consistency of value logic across paragraphs of long texts in the process of evaluating the value orientation of ideological and political education lesson plans.
[0004] This invention is implemented as follows: It provides a method for establishing a value-oriented content selection model in ideological and political education lesson plans. The method involves collecting and preprocessing the text corpus of ideological and political education lesson plans, segmenting and labeling the text corpus according to paragraph levels, extracting value keywords from each paragraph, establishing a value labeling system, constructing a training dataset, selecting value-oriented ideological and political education lesson plan texts as positive samples, and selecting those with deviated or missing value orientations as negative samples. The positive and negative samples are then subjected to hierarchical vector quantization compression to establish a value-oriented content selection model. This model employs a neural network structure, which includes an input layer, multiple hidden layers, and an output layer. Long-term dependency modeling based on a temporal memory pool is embedded in the multiple hidden layers. The algorithm and a hybrid learning framework based on neural symbolic reasoning preserve the semantic vectors of historical text segments by constructing an external memory storage structure, retrieve relevant memory segments using a content addressing mechanism, achieve selective memory updates using forgetting gating units, establish a symbolic knowledge base to store value logic rules and convert them into differentiable soft logic constraints, thus integrating symbolic reasoning with neural networks. A sparse attention mechanism is used to reduce computational complexity. The value-oriented content selection model is trained by setting an adaptive gradient pruning threshold and a dynamic learning rate scaling factor, adding residual connection structures and layer normalization processing, and using a sliding window segmented encoding strategy to process long texts. The value orientation conformity score of the trained value-oriented content selection model on the new ideological and political education lesson plan text corpus is calculated, and the reasoning strategy is adjusted based on the value orientation conformity score.
[0005] The value labeling system includes value dimension labels and educational goal classification labels.
[0006] Hierarchical vector quantization compression refers to statistically sorting words according to their frequency of occurrence in the training dataset, dividing words with a frequency higher than the median into a high-frequency core layer, and dividing words with a frequency lower than the median into a low-frequency outer layer. The high-frequency core layer maintains complete accuracy representation, while the low-frequency outer layer uses cluster center vectors to replace storage.
[0007] The step of implementing the long-term dependency modeling algorithm based on the temporal memory pool in multiple hidden layers specifically involves constructing an external memory storage structure, which includes a memory matrix and an address vector, and writing the semantic vectors of text segments processed at historical moments into the memory matrix.
[0008] The content addressing mechanism is implemented using cosine similarity calculation. It calculates the cosine similarity between the current input text segment and each memory segment in the memory matrix, and selects the top few memory segments with the highest cosine similarity to read.
[0009] The forgetting gating unit determines whether to retain or erase a memory fragment based on its time decay coefficient and importance score. It then uses attention weights to weight and fuse the read memory fragments before inputting them into the next hidden layer.
[0010] The steps involved in implementing a hybrid learning framework based on neural symbolic reasoning across multiple hidden layers include establishing a symbolic knowledge base to store value-oriented logical rules. These rules contain the implication and exclusion relationships between value concepts, and the logical rules are then converted into differentiable soft logical constraints.
[0011] Specifically, the satisfaction of soft logic constraints is calculated during the forward propagation of the neural network structure, the correspondence between the continuous vector representation of the input text paragraph and the value concepts in the symbolic knowledge base is learned through the attention mechanism, and the neural network parameters and the weight coefficients of soft logic constraints are optimized simultaneously during the back propagation process.
[0012] The implementation of the sparse attention mechanism refers to limiting the self-attention calculation range of the ideological and political education lesson plan text corpus to a local window, and using a block processing method for the local window, with the length of each text block set to 128 to 256 words.
[0013] In the block processing method, attention weights within each text block and sparse connection attention weights across text blocks are calculated, and gradient checkpointing is used to save only the activation values of key layers during backpropagation.
[0014] The setting of the adaptive gradient clipping threshold refers to determining whether the gradient norm exceeds the adaptive gradient clipping threshold when calculating the gradient during backpropagation. If the gradient norm exceeds the adaptive gradient clipping threshold, the gradient vector is scaled.
[0015] The setting of the dynamic learning rate scaling factor refers to setting a dynamic learning rate scaling factor for network layers of different depths. The dynamic learning rate scaling factor is inversely proportional to the square root of the network layer depth.
[0016] The implementation of the residual connection structure refers to adding a residual connection structure between multiple hidden layers, directly passing shallow features to deep layers, and performing layer normalization on the output of each hidden layer.
[0017] The implementation of the sliding window segmentation coding strategy refers to dividing the complete ideological and political education lesson plan text corpus into a window length of 1024 words, setting an overlapping area of 256 words between adjacent windows, and extracting cross-window connection features in the overlapping area.
[0018] Among them, the calculation of the value orientation conformity score refers to inputting the text data of the ideological and political education lesson plan to be evaluated into the value orientation content selection model, and obtaining the value orientation conformity score in the output layer. The value orientation conformity score ranges from 0 to 1.
[0019] Among them, the adjustment of reasoning strategy refers to increasing the weight coefficient of soft logic constraints in the hybrid learning framework based on neural symbol reasoning when the average value orientation conformity score of multiple ideological and political education lesson plan texts processed continuously is lower than the preset threshold, and decreasing the weight coefficient of soft logic constraints when the average value orientation conformity score is higher than the preset threshold.
[0020] This invention establishes a content selection model capable of associating value concepts across long texts by constructing a long-term dependency modeling algorithm based on a temporal memory pool and a hybrid learning framework based on neural symbolic reasoning. This invention overcomes the limitation of traditional neural networks relying solely on hidden states to transmit information by employing a dynamically expanding external memory storage structure. Through a selective memory update mechanism using forgetting gating units, it achieves continuous retention of value features in historical paragraphs, enabling the model to correlate value expressions across thousands of words in long lesson plans. Simultaneously, value logic rules are explicitly integrated into the neural network learning process through soft logic constraints, ensuring that model judgments not only follow statistical laws but are also guided and constrained by symbolic logic. The correspondence between value concepts and vector representations learned through the attention mechanism achieves seamless integration of symbolic reasoning and neural networks. The sliding window segmentation encoding strategy, combined with the memory pool mechanism, integrates the semantic information of each window into a full-document-level value-oriented representation. In summary, this invention solves the technical problem mentioned in the background art of effectively modeling the consistency of value logic across paragraphs in long texts during the evaluation of value orientation in ideological and political education lesson plans. Attached Figure Description
[0021] Figure 1 This is a flowchart of the method of the present invention.
[0022] Figure 2 This is a comparison chart of storage space before and after hierarchical vector quantization compression.
[0023] Figure 3 This is an integrated architecture diagram of the neural network structure, memory reading and writing module, and symbolic reasoning module.
[0024] Figure 4 A graph showing the correlation between the distribution of value-oriented question types and attention weights. Detailed Implementation
[0025] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below.
[0026] like Figure 1 The diagram shown is a flowchart of a method for establishing a value-oriented content selection model in ideological and political education lesson plans provided by this invention. This method includes the following steps:
[0027] S01. Collect and preprocess the text data of ideological and political education lesson plans. Segment and label the text data of ideological and political education lesson plans according to paragraph levels. Extract value keywords from each text paragraph and establish a value tag system. The value tag system includes value dimension tags and educational goal classification tags.
[0028] S02. Construct a training dataset, select the ideological and political education lesson plan text corpus with labeled value orientation as positive samples, and select the ideological and political education lesson plan text corpus with deviated or missing value orientation as negative samples. Perform hierarchical vector quantization compression processing on the positive samples and the negative samples. Divide the original word embedding matrix into a high-frequency word core layer and a low-frequency word outer layer according to the word frequency distribution. Maintain the complete accuracy representation of the high-frequency word core layer, and use cluster center vectors to replace the storage of the low-frequency word outer layer.
[0029] S03. Establish a value-oriented content selection model. The value-oriented content selection model adopts a neural network structure, which includes an input layer, multiple hidden layers and an output layer. A long-term dependency modeling algorithm based on a temporal memory pool and a hybrid learning framework based on neural symbolic reasoning are embedded in the multiple hidden layers.
[0030] S04. Implement a long-term dependency modeling algorithm based on temporal memory pool in multiple hidden layers of the value-oriented content selection model, construct an external memory storage structure, the external memory storage structure includes a memory matrix and an address vector, write the semantic vector of the text segment processed at a historical moment into the memory matrix, calculate the cosine similarity between the current input text segment and each memory segment in the memory matrix through a content addressing mechanism, select the top several memory segments with the highest cosine similarity for reading, set a forgetting gate unit to decide whether to retain or clear the memory segment based on the time decay coefficient and importance score of the memory segment, and use attention weights to perform weighted fusion of the read memory segments before inputting them into the next hidden layer;
[0031] S05. Implement a hybrid learning framework based on neural symbolic reasoning in multiple hidden layers of the value-oriented content selection model, establish a symbolic knowledge base to store value-oriented logical rules, the logical rules include the implication and exclusion relationships between value concepts, convert the logical rules into differentiable soft logical constraints, calculate the satisfaction of soft logical constraints during the forward propagation of the neural network structure, learn the correspondence between the continuous vector representation of the input text paragraph and the value concepts in the symbolic knowledge base through an attention mechanism, and simultaneously optimize the neural network parameters and the weight coefficients of the soft logical constraints during the backpropagation of the neural network structure.
[0032] S06. A sparse attention mechanism is adopted to reduce the computational complexity of training the value-oriented content selection model. The self-attention calculation range of the ideological and political education lesson plan text corpus is limited to a local window. The local window is processed in blocks, and the length of each text block is set to 128 to 256 words. The attention weights within each text block and the sparse connection attention weights across text blocks are calculated. Gradient checkpointing technology is used to save only the activation values of key layers during backpropagation.
[0033] S07. Train the value-oriented content selection model, set an adaptive gradient clipping threshold, and determine whether the gradient norm exceeds the adaptive gradient clipping threshold when calculating the gradient during backpropagation. If the gradient norm exceeds the adaptive gradient clipping threshold, scale the gradient vector. Set a dynamic learning rate scaling factor for network layers of different depths. The dynamic learning rate scaling factor is inversely proportional to the square root of the network layer depth. Add residual connection structures between the multiple hidden layers to directly pass shallow features to deep layers. Perform layer normalization on the output of each hidden layer.
[0034] S08. To address the context window limitation problem of long-text ideological and political education lesson plan text corpus, a sliding window segmentation coding strategy is adopted. The complete ideological and political education lesson plan text corpus is divided into a window length of 1024 words. An overlapping area of 256 words is set between adjacent windows. Positional and semantic coding are performed independently on each window. Cross-window connection features are extracted in the overlapping area. The semantic information of each window is integrated into a value-oriented representation at the whole document level through the long-term dependency modeling algorithm based on temporal memory pool.
[0035] S09. The value orientation conformity score of the new ideological and political education lesson plan text corpus is calculated by the value orientation content selection model trained. The ideological and political education lesson plan text corpus to be evaluated is input into the value orientation content selection model, and the value orientation conformity score is obtained in the output layer. The value orientation conformity score ranges from 0 to 1. When the value orientation conformity score is higher than a preset threshold, it is determined that the value orientation of the ideological and political education lesson plan text corpus to be evaluated meets the requirements. When the value orientation conformity score is lower than the preset threshold, the text paragraph with the lowest attention weight in the value orientation content selection model is extracted as the content that needs to be adjusted.
[0036] S10. Adjust the reasoning strategy of the content selection model based on the value orientation conformity score. When the average value orientation conformity score of multiple consecutively processed ideological and political education lesson plan texts is consistently lower than the preset threshold, increase the weight coefficient of the soft logic constraint in the hybrid learning framework based on neural symbol reasoning to strengthen the constraint effect of value rules. When the average value orientation conformity score of multiple consecutively processed ideological and political education lesson plan texts is consistently higher than the preset threshold, decrease the weight coefficient of the soft logic constraint and increase the proportion of autonomous learning of the neural network structure.
[0037] The hierarchical vector quantization compression process involves statistically sorting words according to their frequency of occurrence in the training dataset, dividing words with a frequency higher than the median into a high-frequency core layer, and dividing words with a frequency lower than the median into a low-frequency outer layer. Each word in the high-frequency core layer retains its original word embedding vector representation, while the words in the low-frequency outer layer are grouped together using a clustering algorithm. The cluster center vector of each class is used as the shared representation of all words in each class, thereby compressing the storage space of the original word embedding matrix to one-third to one-half of the original.
[0038] The long-term dependency modeling algorithm based on temporal memory pools is implemented in the neural network structure as follows: a memory read / write module is inserted between the multiple hidden layers. The memory read / write module includes a memory matrix, a read head, a write head, and a forgetting gating unit. The dimension of the memory matrix is set to the number of memory slots multiplied by the dimension of the memory vector. Each memory slot stores a semantic vector of a historical moment. The read head generates a read weight distribution by calculating the cosine similarity between the current hidden layer output and the vectors of each memory slot in the memory matrix. The read weight distribution is used to weight and sum the memory slots to obtain the read vector. The write head writes the current hidden layer output into the corresponding memory slot of the memory matrix according to the write weight distribution. The forgetting gating unit calculates the forgetting weight based on the time decay coefficient and importance score of each memory slot. The forgetting weight is multiplied element-wise with the memory slot vector to achieve selective forgetting. The attention weight is applied to the read vector after normalizing the read weight distribution using the softmax function, enabling the value-oriented content selection model to access memory content of different importance levels in a differentiated manner.
[0039] The hybrid learning framework based on neural symbolic reasoning is implemented in the neural network structure as follows: an independent symbolic knowledge base module is established and runs in parallel with the neural network structure. The symbolic knowledge base stores the logical relationships between value concepts in the form of triples. Discrete symbolic logic rules are converted into continuous constraint functions using fuzzy logic methods. In the forward propagation stage of the neural network structure, the continuous vector representations output by the multiple hidden layers are mapped to the symbolic space through linear transformation. The matching degree between the mapping result and each value concept in the symbolic knowledge base is calculated. The attention mechanism is used to assign weight coefficients to each value concept. The weight coefficients and value concept vectors are weighted and combined to obtain the symbolic reasoning result. The symbolic reasoning result is fused with the semantic representation of the neural network structure. In the backpropagation stage of the neural network structure, the gradient of the constraint function and the gradient of the loss function of the neural network structure jointly participate in the update of neural network parameters. Through end-to-end training, the continuous vector representation learned by the neural network structure is made consistent with the discrete symbolic logic rules in the symbolic knowledge base.
[0040] The technical effects of the long-term dependency modeling algorithm based on temporal memory pool and the hybrid learning framework based on neural symbolic reasoning are as follows: The long-term dependency modeling algorithm based on temporal memory pool, by constructing a dynamically expanding external memory storage structure, enables the value-oriented content selection model to retain and retrieve value expression information in processed historical ideological and political education lesson plan texts. This breaks through the limitation of traditional neural network structures that only rely on hidden states to transmit information. When processing long ideological and political education lesson plan texts, the value-oriented content selection model can connect value concepts in the context across distances of thousands of words. Through the selective memory update mechanism of the forgetting gating unit, the value-oriented content selection model automatically filters irrelevant details while retaining core value-oriented features. The differentiated access of attention weights enables the value-oriented content selection model to focus on the historical information most relevant to the current judgment during reasoning, thereby maintaining the coherence and accuracy of value judgments in the processing of long-text ideological and political education lesson plan texts. The hybrid learning framework based on neuro-symbolic reasoning explicitly integrates human-summarized value logic rules into the learning process of the neural network structure. This enables the value-oriented content selection model to not only learn statistical patterns from the training dataset but also be guided and constrained by symbolic logic. The hybrid learning framework makes the judgment process of the value-oriented content selection model interpretable. When the value-oriented content selection model gives a value orientation conformity score to a certain ideological and political education lesson plan text, it can trace back to which specific logical rules were triggered. The soft logical constraints make the discrete symbolic constraints differentiable under the continuous optimization framework, realizing the seamless integration of symbolic reasoning and the neural network structure. The correspondence between the value concepts learned by the attention mechanism and the continuous vector representation enables the value-oriented content selection model to automatically discover the implicit value logic patterns in the training dataset and update the symbolic knowledge base. The bidirectional interaction enhances the depth of understanding and robustness of the value-oriented content selection model in terms of value orientation.
[0041] The sparse attention mechanism refers to not calculating the attention weights between all word pairs in the sequence, but limiting the calculation scope to the local window or selecting some word pairs according to the pattern for calculation. The long text ideological and political education lesson plan text corpus is divided into multiple fixed-length text blocks through the block processing method. Fully connected attention calculation is performed within each text block. Only a small number of key positions of sparse connection attention weights across text blocks are calculated between the text blocks, thereby reducing the computational complexity from the square of the sequence length to the product of the sequence length and the logarithm.
[0042] The gradient checkpointing technique refers to saving only the activation values of some key layers as checkpoints during the forward propagation of the neural network structure, instead of saving all the activation values of intermediate layers. When calculating the gradient during the backpropagation of the neural network structure, the forward propagation calculation is re-executed from the nearest checkpoint to restore the required activation values. The gradient checkpointing technique reduces memory usage to one-quarter to one-fifth of the original by trading computation for storage, enabling the training of deeper neural network structures with limited computing resources.
[0043] The adaptive gradient pruning threshold refers to the process of calculating the L2 norm of the gradient vector after backpropagation of the neural network structure. When the L2 norm exceeds a preset pruning threshold, each element of the gradient vector is multiplied by the ratio of the pruning threshold to the L2 norm for scaling, so that the scaled gradient norm is equal to the pruning threshold. This prevents excessive updates of neural network parameters caused by gradient explosion, and adapts to the gradient distribution characteristics of different training stages by dynamically adjusting the pruning threshold.
[0044] The dynamic learning rate scaling factor refers to setting different learning rate multipliers for each layer based on the depth of the neural network structure. Shallow network layers are prone to gradient vanishing due to their longer gradient propagation distance, so a larger learning rate scaling factor is set for shallow network layers to accelerate neural network parameter updates. Deep network layers are closer to the output layer and have larger gradients, so a smaller learning rate scaling factor is set for deep network layers to avoid neural network parameter oscillations. The specific value of the dynamic learning rate scaling factor is calculated by dividing the square root of the total number of layers in the neural network structure by the square root of the current layer depth.
[0045] The residual connection structure refers to adding skip connection paths between multiple hidden layers of the neural network structure, so that the input of a certain hidden layer is directly added to the output of the same hidden layer to form the input of the next hidden layer. This allows the neural network structure to learn the residual part between the input and output without having to learn the complete input-output mapping function. The residual connection structure enables the gradient to be directly transmitted to the shallow network layer through the skip connection path, thus alleviating the gradient vanishing problem in the training of deep neural network structures.
[0046] The layer normalization process refers to normalizing the output of each hidden layer of the neural network structure in terms of the feature dimension, calculating the mean and variance of the output of all neurons in each hidden layer, subtracting the mean from the output of each neuron and then dividing by the square root of the variance, so that the distribution of the output of each hidden layer is stabilized near zero mean and unit variance, thereby accelerating the training convergence of the value-oriented content selection model and improving training stability.
[0047] The sliding window segmentation encoding strategy refers to segmenting long text corpora of ideological and political education lesson plans that exceed the positional encoding length limit of the value-oriented content selection model according to the window length, preserving the overlapping area between adjacent windows, and independently performing positional encoding and semantic encoding processing on each window. The cross-window connection features extracted in the overlapping area are used to connect the semantic information of adjacent windows. Finally, the encoding results of each window are integrated into a value-oriented representation of the complete document through the long-term dependency modeling algorithm based on temporal memory pool.
[0048] The value orientation conformity score refers to the quantitative evaluation result of the value orientation content selection model on the correctness and completeness of the value expression in the input ideological and political education lesson plan text corpus. The closer the value orientation conformity score is to 1, the more the content of the ideological and political education lesson plan text corpus conforms to the mainstream value orientation. The closer the value orientation conformity score is to 0, the more the content of the ideological and political education lesson plan text corpus has value deviation or missing. The value orientation conformity score is obtained by mapping the continuous output of the neural network structure to the 0 to 1 interval through the sigmoid activation function of the output layer of the value orientation content selection model.
[0049] The preset threshold refers to the critical score value used to judge whether the value orientation of the ideological and political education lesson plan text corpus meets the requirements. The preset threshold is determined based on the value orientation conformity score distribution characteristics of positive and negative samples in the training dataset. The preset threshold is set to a value between 0.6 and 0.8. When the value orientation conformity score output by the value orientation content selection model is higher than the preset threshold, the content of the ideological and political education lesson plan text corpus is considered to have passed the value review. When the value orientation conformity score is lower than the preset threshold, the content of the ideological and political education lesson plan text corpus is considered to need to be adjusted and modified.
[0050] The weight coefficient of the soft logic constraint refers to the parameter that controls the influence of the symbolic knowledge base on the learning of the neural network structure in the hybrid learning framework based on neural symbolic reasoning. When the weight coefficient of the soft logic constraint is large, the value-oriented content selection model tends to follow the predefined value logic rules. When the weight coefficient of the soft logic constraint is small, the value-oriented content selection model relies more on the statistical patterns learned autonomously from the training dataset. The weight coefficient of the soft logic constraint is dynamically adjusted to balance the ratio of rule constraints and data-driven learning.
[0051] Alternatively, the present invention also provides a method for implementing a value-oriented content selection system in ideological and political education lesson plans using a computer. The computer is equipped with a readable storage medium that stores program instructions. When the program instructions are run on the computer, they execute the aforementioned method for establishing a value-oriented content selection model in ideological and political education lesson plans.
[0052] The specific implementation methods of the above steps are described in detail below.
[0053] The specific implementation of step S01 is as follows: First, the collected ideological and political education lesson plan text data is formatted and standardized, removing special symbols and irrelevant marks from the text. Then, it is segmented according to the semantic integrity of natural paragraphs, and a unique identifier is established for each paragraph. Next, a keyword extraction algorithm is used to evaluate the importance of words in each text paragraph, and the product of word frequency and inverse document frequency is calculated as the word weight. The top 20 to 30 words with the highest weights are selected as value keywords. The value keywords are matched with a pre-constructed value dictionary. Based on the matching results, value dimension labels and educational goal classification labels are assigned to the text paragraphs. The value dimension labels include social and personal value orientations, and the educational goal classification labels include three levels: knowledge transmission, ability cultivation, and value guidance. The purpose of this step is to provide structured annotation information for the construction of the subsequent training dataset.
[0054] The specific implementation of step S02 is as follows: Texts conforming to mainstream values are selected as positive samples from the labeled ideological and political education lesson plan text corpus, while texts with value deviations or missing value expressions are selected as negative samples. The ratio of positive to negative samples is set to 3:1 to 5:1. Then, word frequency statistics are performed on all sample texts, calculating the number of times each word appears in the entire training dataset. Using the median word frequency as the dividing criterion, words are divided into a high-frequency core layer and a low-frequency peripheral layer. The words in the high-frequency core layer retain their original word embedding vector representations of 300 to 768 dimensions. The words in the low-frequency peripheral layer are semantically clustered using the K-means clustering algorithm, with the number of clusters set to one-tenth to one-fifth of the total number of low-frequency words. The center vector of each cluster is used as the shared representation of all words within that cluster. This hierarchical vector quantization compression process utilizes the long-tail feature of word frequency distribution to significantly reduce the storage space of low-frequency words while ensuring the accuracy of high-frequency word representation. The purpose of this step is to solve the memory overflow problem during large-scale lesson plan text vectorization.
[0055] The specific implementation of step S03 is as follows: a neural network structure is constructed, comprising an input layer, 6 to 12 hidden layers, and an output layer. The input layer receives word embedding vector sequences of text segments. Each hidden layer contains 512 to 1024 neurons. A memory read / write module based on a long-term dependency modeling algorithm using a temporal memory pool is inserted between the 3rd and 4th hidden layers. A symbolic reasoning module based on a hybrid learning framework using neural symbolic reasoning is inserted between the 6th and 8th hidden layers. The output layer uses a single-neuron structure combined with a sigmoid activation function to output a value orientation conformity score between 0 and 1. The neural network structure is initialized using the Xavier initialization method to set the weight parameters of each layer. The purpose of this step is to establish a deep learning model architecture capable of simultaneously handling semantic understanding and logical reasoning.
[0056] The specific implementation of step S04 is as follows: a memory matrix is inserted between the multiple hidden layers. The dimension of the memory matrix is set to 100 to 500 memory slots multiplied by the memory vector dimension of 512 to 1024. When the neural network structure processes each text segment, the semantic vector output by the current hidden layer is compared with the vectors of each memory slot stored in the memory matrix to calculate the cosine similarity. The top 5 to 10 memory segments with the highest cosine similarity are selected for reading. The reading process uses the softmax function to normalize the cosine similarity to generate a reading weight distribution. The reading weight distribution is weighted and summed with the corresponding memory segments to obtain the reading vector. At the same time, a forgetting gate unit is set to calculate the time decay coefficient for each memory slot. The time decay coefficient decays exponentially with the increase of the storage time of the memory segment. The decay rate is set to 0.01 to 0.05. The access frequency of the memory segment in the historical reading is combined as the importance score. When the product of the time decay coefficient and the importance score is less than 0.1, the memory segment is cleared. This step uses an external memory storage structure to overcome the limitation of traditional neural networks that rely solely on hidden states to transmit information.
[0057] The specific implementation of step S05 is as follows: A symbolic knowledge base is established to store the triplet logical relationships between value concepts. The triplet includes a subject concept, a relation type, and an object concept. The relation type includes implication and exclusion relations. Fuzzy logic is used to convert discrete symbolic logic rules into continuous functions. During the forward propagation of the neural network structure, the continuous vector representation output from the hidden layer is mapped to the symbolic space through a fully connected layer. The dot product of the mapping result and the value concept vectors in the symbolic knowledge base is calculated as the matching degree. The matching degree of all value concepts is normalized using the softmax function to obtain attention weight allocation. The attention weights are weighted and combined with the corresponding value concept vectors to generate symbolic reasoning results. The symbolic reasoning results are concatenated or added to the original semantic representation of the neural network structure. During the backpropagation process, the loss function of symbolic logic constraints and the classification loss function of the neural network structure are linearly combined according to adjustable weight coefficients, initially set to 0.3 to 0.5. The purpose of this step is to explicitly embed human-defined value rules into the neural network learning process.
[0058] The specific implementation of step S06 is as follows: the self-attention calculation of the ideological and political education lesson plan text corpus is restricted to a local window of 128 to 256 words. The long text is divided into several fixed-length text blocks using a block-based processing method. Within each text block, the attention weight between all word pairs is calculated. Between text blocks, only 16 to 32 words before and after the boundary position are selected to calculate the cross-block attention weight. The sparse attention mechanism reduces the computational complexity from the square of the sequence length to the product of the sequence length and the logarithm. During the backpropagation process, a gradient checkpoint is set every 2 to 3 hidden layers. Only the activation value at the gradient checkpoint is saved. When calculating the gradient, the forward propagation is re-executed from the nearest gradient checkpoint to restore the intermediate activation value. This step uses a trade-off strategy between computation and storage to solve the resource consumption problem of long text processing.
[0059] The specific implementation of steps S07 to S10 is as follows: after calculating the gradient vector in each backpropagation, calculate its L2 norm. When the L2 norm exceeds the adaptive gradient clipping threshold of 5 to 10, scale the gradient vector proportionally. Set a learning rate scaling factor for each layer according to the network layer depth. Add residual connection structures between hidden layers and perform layer normalization on the output of each layer. Use a sliding window segmented encoding strategy to process long texts with more than 1024 words. Apply the trained value-oriented content selection model to the evaluation of the new ideological and political education lesson plan text corpus. Dynamically adjust the weight coefficient of symbolic logic constraints according to the value orientation conformity score.
[0060] It should be noted that the key technical ideas of this invention include hierarchical vector quantization compression processing, a long-term dependency modeling algorithm based on a temporal memory pool, and a hybrid learning framework based on neural symbolic reasoning. Hierarchical vector quantization compression processing, by differentiating between high-frequency and low-frequency words in its storage strategy, adopts clustering and shared representations for low-frequency words while ensuring the accuracy of commonly used word representations. Compared to traditional methods that maintain the complete dimensional vectors for all words, this compression processing reduces the memory footprint of the word embedding matrix to one-third to one-half of its original size, enabling the processing of lesson plan text databases of millions of words with limited computing resources. Simultaneously, because high-frequency words maintain complete accuracy, the model's semantic understanding of core value-related vocabulary remains unaffected. The long-term dependency modeling algorithm based on a temporal memory pool stores the semantic information of previously processed text segments through an external memory storage structure. Compared to traditional recurrent neural networks that only transmit limited-length context through hidden states, this algorithm can retrieve relevant value expressions across distances of thousands of words. The forgetting gating mechanism enables selective retention and erasure of memories, preventing irrelevant information from interfering with current judgments, and ensuring the model maintains global consistency in value understanding when processing complete lesson plan documents. The hybrid learning framework based on neural symbolic reasoning explicitly integrates predefined value logic rules into the neural network training process. Compared with purely data-driven deep learning methods, this framework guides and constrains the model's value judgments with human knowledge, improving the model's accuracy in identifying value deviations. At the same time, by learning the correspondence between symbols and continuous representations through the attention mechanism, the model can automatically discover new value patterns in the training data and update the symbolic knowledge base, achieving bidirectional complementarity between rules and data.
[0061] The synergistic effect of the three key technical approaches lies in the fact that hierarchical vector quantization compression provides computational feasibility for large-scale text processing, the long-term dependency modeling algorithm based on temporal memory pools maintains long-distance semantic association in the compressed vector space, and the hybrid learning framework based on neural symbolic reasoning introduces logical reasoning ability on the basis of memory-enhanced semantic understanding. Together, these three approaches construct a value-oriented content selection model that combines computational efficiency, long-term dependency modeling, and symbolic reasoning. Compared with existing pure neural network methods or pure rule methods, the synergistic technical approach can handle large-scale lesson plan databases while maintaining the accuracy and interpretability of value judgments. It solves the technical bottlenecks of limited computational resources, difficulty in understanding long texts, and lack of interpretability in the value review of ideological and political education lesson plans.
[0062] It should be noted that this invention also solves the following technical problem: the difficulty in model convergence caused by unstable gradient propagation during deep neural network training. This invention alleviates the gradient vanishing problem by adding residual connection structures between multiple hidden layers, directly transferring shallow features to deep layers. This allows gradients to be directly transmitted to shallow network layers through skip connections. Simultaneously, dynamic learning rate scaling factors are set for network layers of different depths: a larger learning rate scaling factor is set for shallow network layers to accelerate parameter updates, while a smaller learning rate scaling factor is set for deep network layers to avoid parameter oscillations. Adaptive gradient clipping thresholds are used to prevent gradient explosion. Layer normalization is applied to the output of each hidden layer to stabilize the output distribution near zero mean and unit variance. These technical measures work synergistically to ensure stable gradient propagation during deep neural network training, accelerate model convergence, and improve training stability, thereby solving the problem of unstable gradient propagation in deep network training.
[0063] Specifically, the principle of this invention is as follows: The reason why the technical solution of this invention can solve the problem of modeling the consistency of value logic across paragraphs in long texts lies in its construction of a two-layer collaborative semantic understanding mechanism. At the neural level, the temporal memory pool persistently stores the semantic vectors of previously processed text paragraphs through an external memory matrix. When processing a new paragraph, the cosine similarity is calculated through a content addressing mechanism to retrieve relevant historical information. The forgetting gating unit achieves selective memory updates based on the time decay coefficient and importance score. Differentiated access of attention weights allows the model to focus on the historical value expressions most relevant to the current judgment, thereby maintaining the consistency of value judgments in long text processing. At the symbolic level, the neural symbolic reasoning framework stores the value logic rules summarized by humans in the form of triples, converts them into differentiable soft logic constraints through fuzzy logic methods, maps the neural network output to the symbolic space to calculate the matching degree with the value concept during forward propagation, and the constraint function gradient and network loss gradient jointly participate in parameter updates during backpropagation, realizing end-to-end training of symbolic reasoning and neural networks. This makes the model's judgment process interpretable and consistent with the value logic rules. The synergistic effect of the two-layer mechanism ensures the model's accurate understanding of the value orientation of long texts.
[0064] The following provides a specific embodiment 1 of the present invention, and the specific implementation of each step in this embodiment 1 is described in detail below.
[0065] The specific implementation of step S01 is the same as described above, and will not be repeated in detail here.
[0066] The specific implementation of step S02 involves performing hierarchical vector quantization compression on the positive and negative samples in the training dataset. Words are statistically sorted according to their frequency of occurrence in the training dataset. Words with a frequency higher than the median are classified as a high-frequency core layer, and words with a frequency lower than the median are classified as a low-frequency outer layer. The formula for word frequency statistics is as follows:
[0067] .
[0068] In the formula, For vocabulary The frequency percentage is a dimensionless quantity. For vocabulary The number of occurrences in the training dataset is measured in times. The total number of occurrences of all words in the training dataset is expressed in units of times. To determine the total number of different words in the training dataset, For the first Each word appears 100 times in the training dataset. For each word in the high-frequency core layer, its original word embedding vector representation is preserved. For words in the low-frequency outer layer, a clustering algorithm is used to group semantically similar words into one class, and the cluster center vector of each class is used as the shared representation of all words in that class. The formula for calculating the cluster center vector is as follows:
[0069] .
[0070] In the formula, For the first The cluster center vector of a class is a dimensionless vector. For the first The number of words contained in the class For the first The first in the class The original word embedding vectors of each word, The magnitude of the reference word embedding vector is used for normalization and is usually set to 1. This compresses the storage space of the original word embedding matrix to one-third to one-half of its original size.
[0071] The specific implementation of step S03 is to establish a value-oriented content selection model. This model adopts a neural network structure, which includes an input layer, multiple hidden layers and an output layer. A long-term dependency modeling algorithm based on temporal memory pool and a hybrid learning framework based on neural symbolic reasoning are embedded in the multiple hidden layers.
[0072] The specific implementation of step S04 involves implementing a long-term dependency modeling algorithm based on a temporal memory pool in multiple hidden layers of the value-oriented content selection model. An external memory storage structure is constructed, containing a memory matrix and address vectors. The semantic vectors of text segments processed at previous times are written into the memory matrix. The cosine similarity between the current input text segment and each memory segment in the memory matrix is calculated using a content addressing mechanism. The cosine similarity calculation formula is as follows:
[0073] .
[0074] In the formula, For the currently entered text paragraph and the first The cosine similarity of memory fragments is a dimensionless quantity with values ranging from -1 to 1. This is the semantic vector of the currently input text paragraph. For the memory matrix, the first A vector of memory segments, Let L be the L2 norm of the vector. This represents the index number of the memory segment. The top few memory segments with the highest cosine similarity are selected for reading. The weighted fusion formula for the read vectors is as follows:
[0075] .
[0076] In the formula, The weighted and fused read vector is a dimensionless vector. The number of memory segments selected is typically between 3 and 5. For the first The attention weight of each memory segment is a dimensionless quantity. For the first A vector of memory segments, The magnitude of the reference memory vector is typically set to 1 for normalization. This represents the index number of the selected memory segment. The attention weight is expressed using the normalized calculation formula as follows:
[0077] .
[0078] In the formula, For the first The attention weight of each memory segment is a dimensionless quantity. For the first The cosine similarity between a memory fragment and the current input is a dimensionless quantity. For the first The cosine similarity between each selected memory segment and the current input is a dimensionless quantity. It is an exponential function. The attention temperature coefficient is a dimensionless quantity with an empirical value of 1. This refers to the index number of the memory segment during the summation process. A forgetting gating unit is set up to determine whether a memory segment is retained or erased based on its time decay coefficient and importance score. The forgetting weight calculation formula is as follows:
[0079] .
[0080] In the formula, For the first The forgetting weight of each memory segment is a dimensionless quantity with a value ranging from 0 to 1. The balance factor between the time decay coefficient and the importance score is a dimensionless empirical value of 0.6. For the first The time decay coefficient of each memory segment is a dimensionless quantity ranging from 0 to 1, decreasing over time. For the first The importance score of each memory fragment is a dimensionless value ranging from 0 to 1. The read memory fragments are then weighted and fused using attention weights before being input into the next hidden layer.
[0081] The specific implementation of step S05 involves implementing a hybrid learning framework based on neural symbolic reasoning in multiple hidden layers of the value-oriented content selection model. A symbolic knowledge base is established to store the value-oriented logical rules, which are then converted into differentiable soft logic constraints. To more conveniently represent discrete data, differentiable discrete soft logic constraints are used. The satisfaction degree of the soft logic constraints is calculated during the forward propagation of the neural network structure. The formula for calculating the satisfaction degree of soft logic constraints is as follows:
[0082] .
[0083] In the formula, The satisfaction degree of soft logic constraints is a dimensionless quantity with a value ranging from 0 to 1. The total number of logical rules. For the first The weight coefficients of each logical rule are dimensionless and range from 0 to 1. For the first The constraint function corresponding to each logic rule outputs a dimensionless quantity with a value range from 0 to 1. This represents the continuous vector representation of the intermediate layers of a neural network structure. This represents the index number of the logical rule. The correspondence between the continuous vector representation of the input text paragraph and the value concepts in the symbolic knowledge base is learned through an attention mechanism. The formula for calculating the matching degree of the correspondence is as follows:
[0084] .
[0085] In the formula, For continuous vector representation and the th The degree of matching of each value concept is a dimensionless quantity. For the first in the symbolic knowledge base A vector of value concepts, The total number of value concepts in the symbolic knowledge base. It is an exponential function. To match the temperature coefficient, which is a dimensionless empirical value of 1, For the index number of the value concept in the summation process, This refers to the index number of the value concept. It also refers to the weight coefficients of the neural network parameters and soft logic constraints during the backpropagation process of the neural network structure.
[0086] The specific implementation of step S06 involves using a sparse attention mechanism to reduce the computational complexity of training the value-oriented content selection model. The self-attention calculation scope of the ideological and political education lesson plan text corpus is limited to a local window. This local window is processed in blocks, with each text block having a length of 128 to 256 words. The formula for calculating the attention weights within a text block is as follows:
[0087] .
[0088] In the formula, For the first text block The word for the first The attention weights for each word are dimensionless. For the first Query vectors for each word For the first The key vector of each word, This is the transpose of the key vector. The dimension of the key vector is used for normalization. This represents the total number of words within the text block. The index number of the words used in the summation process. and These are the index numbers of the words within the text block. The attention weights within each text block and the sparse connection attention weights across text blocks are calculated, and gradient checkpointing is used to save only the activation values of key layers during backpropagation.
[0089] The specific implementation of step S07 involves training a value-oriented content selection model. An adaptive gradient clipping threshold is set, and during backpropagation gradient calculation, it is determined whether the gradient norm exceeds the adaptive gradient clipping threshold. The gradient scaling formula is expressed as follows:
[0090] .
[0091] In the formula, This is the scaled gradient vector. The adaptive gradient clipping threshold is a dimensionless value ranging from 1 to 5. This is the original gradient vector. The L2 norm of the original gradient vector. The L2 norm of the reference gradient vector is typically set to 1 for normalization. A dynamic learning rate scaling factor is set for network layers of different depths; the formula for calculating the dynamic learning rate scaling factor is as follows:
[0092] .
[0093] In the formula, For the first The learning rate of each layer of the network is 1 per iteration. The base learning rate is in units of 1, with a default value of 0.001 per iteration. The total number of layers in a neural network structure is a dimensionless quantity. The depth index of the current network layer is dimensionless. Residual connections are added between multiple hidden layers to directly pass shallow features to deeper layers. Layer normalization is performed on the output of each hidden layer; the formula for layer normalization is as follows:
[0094] .
[0095] In the formula, To ensure the normalized output is dimensionless, The output before normalization. This is the mean of the outputs of all neurons in this hidden layer. The variance of the outputs of all neurons in this hidden layer. The reference standard deviation is typically set to 1 for normalization. To prevent the small constants that divide by zero from being dimensionless, they are usually taken to be 1. .
[0096] The specific implementation of step S08 involves addressing the context window limitation problem of long-text ideological and political education lesson plan corpora. A sliding window segmentation coding strategy is adopted, dividing the complete ideological and political education lesson plan corpus into windows of 1024 words each, with an overlap of 256 words between adjacent windows. The window division formula is expressed as follows:
[0097] .
[0098] In the formula, For the first The sequence of words contained in each window. The first complete ideological and political education lesson plan text corpus One word, The step size for adjacent windows is determined by the number of words, with a value of 768, which is the window length minus the overlap area length. The window length is set to 1024 words. This is the window's index number. This represents the positional index of a word within the complete text. Each window is independently encoded in terms of both position and semantics. Cross-window connectivity features are extracted from overlapping regions. A long-term dependency modeling algorithm based on a temporal memory pool is used to integrate the semantic information of each window into a full-document-level value-oriented representation.
[0099] The specific implementation of step S09 involves calculating the value orientation conformity score of the trained value-oriented content selection model on the text corpus of new ideological and political education lesson plans. The text corpus of ideological and political education lesson plans to be evaluated is input into the value-oriented content selection model, and the value orientation conformity score is obtained at the output layer. The formula for calculating the value orientation conformity score is as follows:
[0100] .
[0101] In the formula, The score for alignment with values is a dimensionless quantity with a value range of 0 to 1. The continuous output values of the output layer of the neural network structure. It is an exponential function. The output temperature coefficient is a dimensionless quantity with an empirical value of 1. When the value orientation compliance score is higher than a preset threshold, the value orientation of the text corpus of ideological and political education lesson plans to be evaluated is deemed to meet the requirements. When the value orientation compliance score is lower than the preset threshold, the value orientation content is extracted, and the text paragraph with the lowest attention weight in the model is selected as the content that needs adjustment. Preset threshold. The dimensionless value ranges from 0.6 to 0.8, and is determined based on the distribution characteristics of the value orientation conformity scores of positive and negative samples in the training dataset.
[0102] The specific implementation of step S10 involves adjusting the reasoning strategy of the value-oriented content selection model based on the value-oriented conformity score. When the average value-oriented conformity score of multiple consecutively processed ideological and political education lesson plan texts remains below a preset threshold, the weight coefficient of soft logic constraints in the hybrid learning framework based on neural symbolic reasoning is increased. The formula for calculating the average value-oriented conformity score is as follows:
[0103] .
[0104] In the formula, The average value orientation conformity score of multiple ideological and political education lesson plan texts processed continuously is a dimensionless quantity. To increase the volume of textual data of ideological and political education lesson plans processed continuously, For the first The value orientation conformity score of the text corpus of ideological and political education lesson plans is a dimensionless quantity. This refers to the index number of the text corpus of ideological and political education lesson plans. The formula for adjusting the weighting coefficients is as follows:
[0105] .
[0106] In the formula, For the adjusted number The weight coefficients of each logical rule are dimensionless. For the first time before the adjustment The weight coefficients of each logical rule are dimensionless. The increment of the weighting coefficient is a dimensionless empirical value ranging from 0.05 to 0.1. When the average value orientation conformity score of multiple consecutively processed ideological and political education lesson plan texts consistently exceeds the preset threshold, the weighting coefficient of soft logic constraints is reduced and the proportion of autonomous learning in the neural network structure is increased. The formula for reducing the weighting coefficient is expressed as follows:
[0107] .
[0108] In the formula, To reduce the number of The weight coefficients of each logical rule are dimensionless, and the meanings of the other parameters are the same as described above.
[0109] To better understand and implement this invention, the following is a specific application scenario of this invention, Example 2:
[0110] The technical team first analyzed 3,500 lesson plan texts for ideological and political education, with an average length of 2,800 words, covering multiple course categories such as Outline of Modern and Contemporary History and Ideological and Moral Education and the Rule of Law. In step S01, the team preprocessed the collected lesson plan texts, removing special symbols and formatting marks, and then segmented them according to paragraph hierarchy, resulting in 45,600 text paragraphs. A word frequency-inverse document frequency algorithm was used to extract value-related keywords from each text paragraph, assigning value-related tags to each paragraph. This value-related tagging system includes the current value dimension tag and three educational goal classification tags: knowledge transmission, ability cultivation, and value guidance.
[0111] In step S02, the technical team selected 2800 lesson plans that met the value orientation requirements from the labeled lesson plan text corpus as positive samples, and 700 lesson plans with value deviations or missing expressions as negative samples, with a positive-to-negative sample ratio of 4:1. Word frequency statistics were performed on all samples. The entire training dataset contains 86,000 different words with a median word frequency of 15. The 32,000 words with a frequency higher than 15 were classified as a high-frequency core layer, and the 54,000 words with a frequency lower than 15 were classified as a low-frequency outer layer. For example... Figure 2 As shown, the high-frequency word core layer maintains the original word embedding vector representation of 768 dimensions, while the low-frequency word outer layer uses the K-means clustering algorithm to cluster into 8000 cluster centers, which compresses the storage space of the word embedding matrix from 65.9GB to 26.8GB, with a compression ratio of 59.3%.
[0112] In steps S03 to S05, the technical team constructed a neural network structure comprising an input layer, 10 hidden layers, and an output layer. The input layer receives a 768-dimensional word embedding vector sequence, and each hidden layer contains 1024 neurons. For example... Figure 3 As shown, a memory read / write module based on a long-term dependency modeling algorithm using a temporal memory pool is inserted between the 3rd and 4th hidden layers. The memory matrix dimension is set to 300 memory slots multiplied by a memory vector dimension of 768. A symbolic reasoning module based on a hybrid learning framework using neural symbolic reasoning is inserted between the 6th and 8th hidden layers. The symbolic knowledge base established by the technical team contains 280 logical rules between value concepts.
[0113] In steps S06 to S08, the technical team employed a sparse attention mechanism to process long text lesson plans, limiting the self-attention calculation scope to a local window of 256 words. Each text block was set to a length of 256 words, with a 64-word overlap between adjacent text blocks. For a complete lesson plan text of 2800 words, a sliding window segmentation encoding strategy was used to divide it into 12 windows. Each window underwent independent positional and semantic encoding. A long-term dependency modeling algorithm based on a temporal memory pool was used to integrate the semantic information of each window into a full-document-level value-oriented representation. During model training, the technical team set an adaptive gradient pruning threshold of 8.5 and set dynamic learning rate scaling factors for different network depths: 3.16 for layer 1 and 1.00 for layer 10. Residual connection structures were added between hidden layers, and layer normalization was performed on the output of each layer.
[0114] In step S09, the technical team applied the trained value-oriented content selection model to an evaluation test of 350 new lesson plan texts, which were not used in the model training. The model outputs a value-oriented compliance score for each lesson plan, ranging from 0 to 1. The technical team set a preset threshold of 0.72. The test results showed that 280 lesson plans had a value-oriented compliance score higher than 0.72, indicating they met the value-oriented requirements, while 70 lesson plans had a value-oriented compliance score lower than 0.72, indicating they needed adjustment. Table 1 shows the distribution of the number of lesson plans across different value-oriented compliance score ranges.
[0115] Table 1. Distribution of Value Orientation Conformity Scoring Intervals
[0116]
[0117] The technical team further analyzed 70 lesson plans with scores below 0.72, extracting the text paragraphs with the lowest attention weights in the model as the content requiring adjustment. For example... Figure 4 As shown, the main problems in the 70 lesson plans included missing value statements, confused value concepts, and logical contradictions in value logic. The technical team provided feedback on these issues to the lesson plan writers for targeted modifications. The revised lesson plans were then re-entered into the model for evaluation, resulting in an average increase of 0.18 in the value orientation compliance score, with all lesson plans achieving scores above 0.72.
[0118] In step S10, the technical team dynamically adjusts the model's inference strategy based on the value orientation compliance score. When processing a batch of 50 lesson plans, the average value orientation compliance score remained below 0.72. The technical team increased the weight coefficient of the soft logic constraints in the hybrid learning framework based on neural symbolic reasoning from the initial value of 0.4 to 0.6, strengthening the constraint effect of value rules and raising the average score of the batch of lesson plans to 0.78. When processing another batch of 80 lesson plans, the average value orientation compliance score remained above 0.85. The technical team reduced the weight coefficient of the soft logic constraints to 0.3, increasing the proportion of autonomous learning by the neural network structure and maintaining the model's adaptability to different styles of lesson plan content.
[0119] The technological advancements of this invention compared to traditional methods are reflected in several aspects. Traditional methods use a full-dimensional word embedding matrix to represent all words, which faces memory overflow problems when processing large-scale lesson plan texts. This invention uses hierarchical vector quantization compression processing and leverages the long-tail features of word frequency distribution to cluster and share representations for low-frequency words. While maintaining the accuracy of high-frequency word representation, it reduces memory usage to about 40% of the original, enabling the processing of thousands of lesson plan texts with limited computing resources. Traditional recurrent neural networks only transmit limited-length contextual information through hidden states when processing long lesson plans. When the length of a lesson plan exceeds 1000 words, the model's memory of preceding value statements gradually decays. This invention constructs an external memory storage structure through a long-term dependency modeling algorithm based on a temporal memory pool, enabling the model to retrieve relevant value statements across distances of thousands of words. The forgetting gating mechanism achieves selective retention and erasure of memories, maintaining global consistency in value judgments. Traditional deep learning methods rely entirely on training data to learn statistical patterns, lacking an explicit understanding of value logic rules. This results in uninterpretable model judgment processes that are easily affected by biases in the training data. This invention explicitly integrates human-defined value logic rules into the neural network learning process through a hybrid learning framework based on neuro-symbolic reasoning. This allows the model's value judgments to be guided and constrained by symbolic logic, improving the accuracy of identifying value deviations. At the same time, it achieves bidirectional complementarity between rules and data by learning the correspondence between symbols and continuous representations through an attention mechanism.
[0120] It should be noted that the variables involved in this invention are explained in detail in Tables 2 and 3.
[0121] Table 2. Variable Explanation Table (Part 1)
[0122]
[0123] Table 3. Variable Explanation Table (Part Two)
[0124]
[0125] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for establishing a value-oriented content selection model in ideological and political education lesson plans, characterized in that, This study collects and preprocesses text corpora of ideological and political education lesson plans. The texts are segmented and labeled according to paragraph levels. Value-related keywords are extracted from each paragraph, and a value-labeling system is established. A training dataset is constructed. Texts labeled with value orientations are selected as positive samples, while those with deviated or missing value orientations are selected as negative samples. Hierarchical vector quantization compression is applied to both positive and negative samples to establish a value-oriented content selection model. This model employs a neural network structure, including an input layer, multiple hidden layers, and an output layer. A long-term dependency modeling algorithm based on temporal memory pools and a hybrid learning framework based on neural symbolic reasoning are embedded in the hidden layers. This method preserves the semantic vectors of historical text segments by constructing an external memory storage structure, retrieves relevant memory fragments using a content addressing mechanism, achieves selective memory updates using forgetting gating units, establishes a symbolic knowledge base to store value logic rules and converts them into differentiable soft logic constraints, realizes the integration of symbolic reasoning and neural networks, reduces computational complexity by employing a sparse attention mechanism, trains a value-oriented content selection model, sets an adaptive gradient pruning threshold and a dynamic learning rate scaling factor, adds residual connection structures and layer normalization processing, uses a sliding window segmented encoding strategy to process long texts, calculates the value orientation conformity score of the trained value-oriented content selection model on the new ideological and political education lesson plan text corpus, and adjusts the reasoning strategy based on the value orientation conformity score.
2. The method according to claim 1, characterized in that, The value labeling system includes value dimension labels and educational goal classification labels.
3. The method according to claim 2, characterized in that, Hierarchical vector quantization compression refers to statistically sorting words according to their frequency of occurrence in the training dataset, dividing words with a frequency higher than the median into a high-frequency core layer, and dividing words with a frequency lower than the median into a low-frequency outer layer. The high-frequency core layer maintains complete accuracy representation, while the low-frequency outer layer uses cluster center vectors to replace storage.
4. The method according to claim 3, characterized in that, The steps to implement a long-term dependency modeling algorithm based on a temporal memory pool in multiple hidden layers are as follows: First, an external memory storage structure is constructed, which includes a memory matrix and an address vector. The semantic vectors of text segments processed at historical moments are written into the memory matrix.
5. The method according to claim 4, characterized in that, The content addressing mechanism is implemented using cosine similarity calculation. It calculates the cosine similarity between the current input text segment and each memory segment in the memory matrix, and selects the top few memory segments with the highest cosine similarity to read.
6. The method according to claim 5, characterized in that, The forgetting gating unit decides whether to retain or erase a memory fragment based on its time decay coefficient and importance score. The memory fragments are then weighted and fused using attention weights before being input into the next hidden layer.
7. The method according to claim 6, characterized in that, The steps to implement a hybrid learning framework based on neural symbolic reasoning in multiple hidden layers are as follows: First, establish a symbolic knowledge base to store value-oriented logical rules. These logical rules contain the implication and exclusion relationships between value concepts. Second, convert the logical rules into differentiable soft logical constraints.
8. The method according to claim 7, characterized in that, The satisfaction of soft logic constraints is calculated during the forward propagation of the neural network structure. The correspondence between the continuous vector representation of the input text paragraph and the value concepts in the symbolic knowledge base is learned through the attention mechanism. During the back propagation, the neural network parameters and the weight coefficients of the soft logic constraints are optimized simultaneously.
9. The method according to claim 8, characterized in that, The implementation of the sparse attention mechanism refers to limiting the self-attention calculation range of the ideological and political education lesson plan text corpus to a local window, and using a block processing method for the local window, with the length of each text block set to 128 to 256 words.
10. The method according to claim 9, characterized in that, In the block-based processing method, attention weights within each text block and sparse connection attention weights across text blocks are calculated, and gradient checkpointing is used to save only the activation values of key layers during backpropagation.