Methods, apparatus, equipment and media for optimizing the allocation of educational resources based on knowledge graphs

By constructing a knowledge graph-based method for optimizing the allocation of educational resources, generating student comprehensive feature vectors and performing unsupervised clustering, and combining it with a multi-objective optimization algorithm, the problem of synergistic optimization of teaching efficiency, individual fairness, and group fairness in the allocation of educational resources is solved, realizing transparent decision support and operable resource allocation schemes under privacy protection.

CN121481168BActive Publication Date: 2026-04-07UNIV OF CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-06
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing methods for allocating educational resources are difficult to coordinate and optimize the three interconnected yet potentially conflicting goals of teaching efficiency, individual equity, and group equity while adhering to privacy regulations. Furthermore, they lack operability and explainability, resulting in insufficient trust in actual educational management scenarios.

Method used

A knowledge graph-based method for optimizing the allocation of educational resources is constructed. By acquiring students' non-sensitive attribute data, learning behavior data, and knowledge mastery data, a comprehensive feature vector of students is generated. Unsupervised clustering is used to form a proxy group division. A Pareto optimal solution set is generated by combining a multi-objective optimization algorithm. An interpretable resource allocation scheme is generated through a counterfactual optimization problem.

Benefits of technology

It achieves synergistic optimization of the efficiency, individual equity, and group equity in the allocation of educational resources while adhering to privacy constraints, provides transparent decision support and actionable adjustment suggestions, and improves the fairness and efficiency of the allocation of educational resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121481168B_ABST
    Figure CN121481168B_ABST
Patent Text Reader

Abstract

This application relates to a method, apparatus, device, and medium for optimizing the allocation of educational resources based on knowledge graphs. The method constructs an educational knowledge graph and extracts students' comprehensive feature vectors using graph neural networks. Based on this, unsupervised clustering is used to form proxy groups that do not rely on sensitive information. Then, teaching efficiency, individual fairness based on feature similarity, and group fairness based on equal outcomes for proxy groups are incorporated into a multi-objective optimization problem. A series of trade-off solutions are obtained using a multi-objective evolutionary algorithm. Finally, by constructing and solving a counterfactual optimization problem, a minimally adjusted, interpretable resource reallocation scheme is generated to achieve a specific fairness goal. Thus, under strict privacy constraints, the method achieves synergistic optimization and transparent decision support for educational resource allocation across the three dimensions of efficiency, individual fairness, and group fairness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of intelligent allocation of educational resources, and in particular relates to a method, device, equipment and medium for optimizing the allocation of educational resources based on knowledge graphs. Background Technology

[0002] In the field of educational resource allocation, how to scientifically, fairly, and efficiently distribute limited resources such as teachers, courses, and tutoring materials to different students has always been a core issue of concern in educational technology and decision science. Traditional automated allocation methods mostly aim to maximize overall teaching effectiveness, such as improving average grades or pass rates, using predictive models to recommend resource allocation schemes that bring the greatest benefits. However, this purely efficiency-oriented model is gradually revealing its limitations because it ignores the crucial social value of educational equity. Equity itself is multi-dimensional and may have internal tensions: on the one hand, "individual equity" requires students with similar learning situations and abilities to receive relatively equal access to resources; on the other hand, "group equity" requires that there should be no systemic disparities in resource access and final learning outcomes among student groups from different backgrounds (such as different socioeconomic foundations and regions). These two goals often constrain each other in reality. For example, to bridge the gap between groups, it may be necessary to allocate resources to disadvantaged groups, which directly conflicts with the principle of individual equity that "similar individuals receive similar resources."

[0003] A more pressing practical constraint is that certain student group attributes (such as family income) constitute sensitive information strictly protected by law. Resource allocation algorithms cannot directly access or use these labels during runtime, making it exceptionally difficult to directly measure and optimize group fairness. Existing technological solutions either can only optimize a single type of fairness or, while attempting to consider multiple objectives, cannot escape their dependence on sensitive group labels, thus posing compliance risks. Furthermore, existing methods typically stop at outputting an "optimal" allocation scheme, lacking transparent explanation of the decision-making process, and especially failing to answer the key questions that administrators care about: what adjustments are needed to the current scheme at a minimum to further improve fairness? This lack of operability and interpretability limits the adoption and trustworthiness of advanced algorithms in real-world educational management scenarios.

[0004] Therefore, the industry urgently needs a new technological framework that can, under the premise of strictly adhering to privacy regulations and not touching sensitive information, synergistically optimize the three interrelated but potentially conflicting goals of teaching efficiency, individual fairness, and group fairness, and provide clear and actionable insights and adjustment suggestions for the final resource allocation decision and its fairness trade-offs. Summary of the Invention

[0005] Therefore, it is necessary to provide a method, apparatus, equipment, and medium for optimizing the allocation of educational resources based on knowledge graphs to address the aforementioned technical problems.

[0006] Firstly, this application provides a method for optimizing the allocation of educational resources based on knowledge graphs, including:

[0007] S1. Obtain students' non-sensitive attribute data, learning behavior data, knowledge mastery data, and educational resource metadata. Based on the non-sensitive attribute data, learning behavior data, knowledge mastery data, and educational resource metadata, construct an educational knowledge graph that includes student nodes, educational resource nodes, knowledge point nodes, and the relationships between nodes of each type. Encode the educational knowledge graph using a graph neural network to generate a comprehensive feature vector for each student.

[0008] S2. Based on the comprehensive feature vectors of all students, the student groups are divided using an unsupervised clustering algorithm to obtain the proxy group division results; wherein, the proxy group division results include the proxy group label assigned to each student;

[0009] S3. Based on the student comprehensive feature vector, the agent group segmentation results, and the preset resource allocation constraints, construct a multi-objective optimization problem that includes teaching efficiency objectives, individual fairness objectives, and group fairness objectives.

[0010] S4. A multi-objective evolutionary algorithm based on reference points is used to solve the multi-objective optimization problem, generating a Pareto optimal solution set containing multiple non-dominated resource allocation schemes;

[0011] S5. For a current resource allocation scheme selected from the Pareto optimal solution set, construct a counterfactual optimization problem with the optimization objective of minimizing the adjustment range of resource allocation and the loss of teaching efficiency, and with the constraint of achieving the preset group fairness improvement requirements; solve the counterfactual optimization problem to obtain the counterfactual resource allocation scheme, and generate a counterfactual explanation report based on the difference between the counterfactual resource allocation scheme and the current resource allocation scheme.

[0012] Secondly, this application also provides a knowledge graph-based educational resource optimization and allocation device for implementing the method described in the first aspect, the device comprising:

[0013] The education data fusion modeling module is used to acquire students' non-sensitive attribute data, learning behavior data, knowledge mastery data, and educational resource metadata. Based on the non-sensitive attribute data, learning behavior data, knowledge mastery data, and educational resource metadata, it constructs an education knowledge graph that includes student nodes, education resource nodes, knowledge point nodes, and the relationships between nodes of each type. The education knowledge graph is then encoded using a graph neural network to generate a comprehensive feature vector for each student.

[0014] The group feature clustering module is used to divide the student group based on the comprehensive feature vector of all students using an unsupervised clustering algorithm to obtain the proxy group division result; wherein, the proxy group division result includes the proxy group label assigned to each student;

[0015] The multi-objective optimization modeling module is used to construct a multi-objective optimization problem that includes teaching efficiency, individual fairness, and group fairness objectives, based on the student comprehensive feature vector, the agent group segmentation results, and the preset resource allocation constraints.

[0016] The Pareto solution set generation module is used to solve multi-objective optimization problems using a reference-point-based multi-objective evolution algorithm, generating a Pareto optimal solution set containing multiple non-dominated resource allocation schemes;

[0017] The counterfactual decision optimization module is used to construct a counterfactual optimization problem for a current resource allocation scheme selected from the Pareto optimal solution set. The optimization objective is to minimize the adjustment range of resource allocation and the loss of teaching efficiency, and the constraint is to achieve the preset group fairness improvement requirements. The module solves the counterfactual optimization problem to obtain the counterfactual resource allocation scheme, and generates a counterfactual explanation report based on the difference between the counterfactual resource allocation scheme and the current resource allocation scheme.

[0018] Thirdly, this application also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement a knowledge graph-based method for optimizing the allocation of educational resources as described in the first aspect.

[0019] Fourthly, this application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a knowledge graph-based method for optimizing the allocation of educational resources as described in the first aspect.

[0020] The aforementioned knowledge graph-based method, apparatus, equipment, and medium for optimizing the allocation of educational resources constructs an educational knowledge graph and extracts students' comprehensive feature vectors using graph neural networks. Based on this, unsupervised clustering is used to form proxy groups that do not rely on sensitive information. Then, teaching efficiency, individual fairness based on feature similarity, and group fairness based on equal outcomes for proxy groups are all incorporated into a multi-objective optimization problem. A series of trade-off solutions are obtained using a multi-objective evolutionary algorithm. Finally, by constructing and solving a counterfactual optimization problem, a minimally adjusted, interpretable resource reallocation scheme is generated to achieve a specific fairness goal. Thus, under strict privacy constraints, the coordinated optimization and transparent decision support of educational resource allocation in the three dimensions of efficiency, individual fairness, and group fairness are realized. Attached Figure Description

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

[0022] Figure 1 A flowchart illustrating a knowledge graph-based method for optimizing the allocation of educational resources provided by this invention;

[0023] Figure 2 This is a flowchart illustrating the construction of a multi-objective optimization problem in one optional embodiment of the present invention;

[0024] Figure 3 This is a schematic diagram of the structure of an educational resource optimization and allocation device based on knowledge graphs provided by the present invention. Detailed Implementation

[0025] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.

[0026] refer to Figure 1 The document presents a flowchart illustrating a knowledge graph-based method for optimizing the allocation of educational resources, which includes the following steps:

[0027] S1. Obtain students' non-sensitive attribute data, learning behavior data, knowledge mastery data, and educational resource metadata. Based on the non-sensitive attribute data, learning behavior data, knowledge mastery data, and educational resource metadata, construct an educational knowledge graph that includes student nodes, educational resource nodes, knowledge point nodes, and the relationships between nodes of each type. Then, encode the educational knowledge graph using a graph neural network to generate a comprehensive feature vector for each student.

[0028] Specifically, students' non-sensitive attribute data, learning behavior data, knowledge mastery data, and educational resource metadata form the core foundation for constructing an educational knowledge graph. Non-sensitive attribute data excludes legally sensitive information (such as family income) and can include publicly available, privacy-free attributes such as grade level, gender (in non-sensitive scenarios), length of enrollment, and elective course categories. This data characterizes students' basic identity and learning background, providing a basis for subsequent node attribute definitions. Learning behavior data is collected through the educational platform's log system, covering dynamic behavioral indicators such as students' course viewing time, homework submission frequency, online Q&A interactions, and knowledge point review frequency. This data reflects students' learning engagement and habits, serving as a crucial bridge connecting students with knowledge points and resources. Knowledge mastery data is obtained through assessment methods such as periodic tests, in-class exercises, and knowledge point challenges. Students' mastery levels are recorded by knowledge point (e.g., mastery, need consolidation, and not mastered, or quantified using a percentage system), directly linking students' mastery of knowledge points. Educational resource metadata includes attributes such as resource type (e.g., video courses, exercise sets, tutoring documents), subject area, corresponding knowledge point tags, resource duration (or number of questions), difficulty level, and applicable grade range, which are used to accurately define the characteristics of educational resource nodes.

[0029] When constructing an educational knowledge graph based on the above four types of data, the three core nodes and the relationships between them are as follows: The attribute set of the student node consists of basic information from non-sensitive attribute data and knowledge mastery data. Each student node uniquely corresponds to one student, and the attribute values ​​are directly taken from the collected structured data. The attribute set of the educational resource node is fully filled with educational resource metadata to ensure that the characteristics of each resource node can be accurately located. The knowledge point node is based on the subject knowledge system and is divided into levels (such as first-level knowledge point "Advanced Mathematics", second-level knowledge point "Calculus", and third-level knowledge point "Derivative"). The attributes include knowledge point number, name, difficulty, and subject. The relationships between nodes need to be established through data mapping: a "mastery relationship" is established between student nodes and knowledge point nodes, and the association weight is determined by the quantitative score in the knowledge mastery data (e.g., if the mastery score is 85 out of 100, the weight is set to 0.85); an "interaction relationship" is established between student nodes and educational resource nodes, and the association weight is calculated by combining the interaction frequency and duration in the learning behavior data; a "correspondence relationship" is established between educational resource nodes and knowledge point nodes, and the association weight is determined by the degree of coverage of the resource on the knowledge point, ensuring that the three types of nodes form a complete knowledge graph network through the association relationships.

[0030] After constructing the knowledge graph, a Graph Neural Network (GNN) is used to encode it to generate student comprehensive feature vectors. Graph Attention Network (GAT) is chosen as the encoding model because it can capture important relationships between nodes through an attention mechanism, better reflecting the differentiated influence of different relationship weights in educational knowledge graphs. The encoding process first constructs the adjacency matrix of the graph, and the matrix elements... This represents the association weight between node i and node j; if the two nodes are not associated, then... Subsequently, the initial feature vectors of each node are initialized. The initial feature vector of student nodes is formed by concatenating the quantized values ​​of non-sensitive attribute data and knowledge mastery data. The initial feature vectors of educational resource nodes and knowledge point nodes are obtained by quantifying their metadata attributes (such as numerical attributes like difficulty coefficient and interaction frequency are directly retained, while categorical attributes are converted into numerical vectors through one-hot encoding). During the inter-layer propagation of GAT, the initial feature vector of each node is first linearly transformed using the formula... Implementation, in which Let i represent the feature vector of node i in the l-th layer. The trainable weight matrix of layer l is used to map node features to a new feature space; then the attention coefficients are calculated using the formula... Calculate the attention weight of node i to node j, where The activation function for the attention mechanism (such as LeakyReLU) is used to measure the importance of the association between two nodes; then, the attention coefficients are normalized using the Softmax function to obtain... ,in Let i represent the set of neighboring nodes. This represents the attention weight of node i to node k; finally, the node features are updated by weighted summation, as shown in the formula. ,in The activation function is ReLU. After multiple layers of GAT propagation, the final feature vector of each student node is extracted as the student's comprehensive feature vector. This vector integrates the student's own attributes, learning behavior, knowledge mastery, and the correlation features with resources and knowledge points. The dimension is set according to the initial features and the number of network layers, and is used for subsequent group segmentation and optimization calculations.

[0031] S2. Based on the comprehensive feature vectors of all students, the student groups are divided using an unsupervised clustering algorithm to obtain the proxy group division results; wherein, the proxy group division results include the proxy group label assigned to each student.

[0032] Specifically, based on the comprehensive feature vectors of all students, an unsupervised clustering algorithm is used to segment the student group. The core objective is to generate proxy group labels that do not rely on sensitive attributes to avoid privacy compliance risks. The K-means clustering algorithm can be chosen here because it is computationally efficient, has strong interpretability of clustering results, and is suitable for scenarios with a large number of students (such as educational scenarios with thousands of students). Before clustering, the comprehensive feature vectors of students are preprocessed, and Z-score standardization is used to eliminate the differences in the dimensions of different feature dimensions. The standardization formula is as follows: ,in Let j be the value of the j-th dimension of the feature vector of the i-th student. This is the mean of this feature dimension for all students. The standard deviation of this dimension feature is denoted as 0. After standardization, the mean of each dimension feature is 0 and the standard deviation is 1, ensuring that the influence weight of each feature on the result is balanced during the clustering process.

[0033] The key parameter in the clustering process is determining the number of clusters, K, which is achieved using a combination of the elbow method and the silhouette coefficient. First, the sum of squared errors (SSE) within clusters is calculated when K ranges from 2 to 10, using the following formula: ,in For the k-th cluster, Let be the center vector of the k-th cluster. Let K be the feature vector of the i-th student in the cluster; plot the curve of SSE as a function of K, and use the K value corresponding to the "elbow" (i.e., the point where the rate of decrease of SSE drops sharply) as the initial candidate; then calculate the silhouette coefficient corresponding to each candidate K value, using the formula: ,in Let i be the average distance between student i and all other students in the cluster. The minimum average distance between student i and all other clusters is given by the silhouette coefficient, which ranges from -1 to 1. The closer the silhouette coefficient is to 1, the better the clustering effect. Finally, K, which has the largest silhouette coefficient and is close to the candidate value of the elbow rule, is selected as the number of clusters.

[0034] The clustering process consists of four steps: First, randomly initialize K cluster center vectors, each with the same dimension as the student's comprehensive feature vector, ensuring that the center vectors are uniformly distributed in the feature space during initialization. Second, calculate the Euclidean distance between each student's feature vector and the K center vectors, using the formula: Where D is the dimension of the feature vector. Represents the center vector of the k-th cluster. The component in the j-th dimension; then student i is assigned to the nearest cluster. The third step is to update the center vector of each cluster. The new center vector is the mean of the feature vectors of all students within the cluster, calculated using the formula: ,in For clusters The fourth step is to repeat steps two and three until the change in the cluster center vector is less than a preset threshold (e.g., the number of students in the cluster); the fifth step is to repeat steps two and three until the change in the cluster center vector is less than a preset threshold (e.g., the number of students in the cluster center vector); the sixth step is to repeat steps two and three until the change in the cluster center vector is less than a preset threshold (e.g., the number of students in the cluster center vector); the seventh step is to repeat steps two and If the number of iterations reaches a preset limit (such as 100 times), ensure that the clustering results converge.

[0035] After clustering, each student is assigned a proxy group label, which is a unique identifier for the cluster to which it belongs (e.g., "Cluster 1", "Cluster 2", ..., "Cluster K"). The validity of the proxy group label is verified through domain knowledge. For example, if the knowledge mastery data of most students in a proxy group shows "weak mastery of mathematical knowledge points" and the learning behavior data shows "low frequency of homework submission", then this group can be classified as "a group with weak mathematics skills and insufficient learning engagement", which is consistent with the group characteristics in actual educational scenarios. This indicates that proxy group segmentation can effectively replace sensitive attributes, reflect the differentiated needs of student groups, and provide a reasonable basis for subsequent optimization of group fairness.

[0036] S3. Based on the student comprehensive feature vector, the agent group division results, and the preset resource allocation constraints, construct a multi-objective optimization problem that includes teaching efficiency objectives, individual fairness objectives, and group fairness objectives.

[0037] Specifically, based on the student comprehensive feature vector, the agent group segmentation results, and the preset resource allocation constraints, a multi-objective optimization problem is constructed, which includes teaching efficiency objectives, individual fairness objectives, and group fairness objectives. It is necessary to clarify the mathematical expressions of the objective function and the constraints, as well as the meaning of the parameters, to ensure that the optimization model fits the actual needs of educational resource allocation.

[0038] First, define the decision variables, let... Let j be a resource allocation variable. If the j-th educational resource is allocated to the i-th student, then... ,otherwise The value of i ranges from [1, N] (where N is the total number of students), and the value of j ranges from [1, M] (where M is the total number of educational resources).

[0039] The teaching efficiency goal aims to maximize the overall improvement of student learning outcomes through resource allocation, with the student's suitability for the resources as the core metric. The suitability of student i for resource j is... Based on the correlation between student comprehensive feature vectors and resource metadata, the cosine similarity is used to measure the student feature vectors. With resource feature vector The similarity is expressed by the formula: ,in The dot product of two vectors. and Let L2 norms be the two vectors respectively. The value range is [0,1], and a larger value indicates that resource j is more suitable for student i. The objective function expression for teaching efficiency is: ,in To achieve the target value of teaching efficiency, this function calculates the total fit of all allocated resources through a weighted summation, maximizing... That is, to achieve the optimal overall efficiency of resource allocation.

[0040] The individual fairness objective aims to ensure that students with similar learning situations and abilities receive relatively equal opportunities for resources, with the differences in resource access among students as the optimization target. First, the feature similarity between student i and student k is calculated. The cosine similarity is calculated based on the student's comprehensive feature vector, using the following formula: , The value range is [0,1], and the larger the value, the more similar the characteristics of the two students; then define the resource acquisition difference between student i and student k. This represents the absolute value of the difference in the amount of resources received by the two students. The objective function for individual fairness is expressed as follows: ,in The objective value for individual fairness is minimized by taking the weighted sum and average of the "feature similarity - resource difference" values ​​for all student pairs. This means achieving optimal fairness in resource acquisition for similar students—student pairs with more similar characteristics should have the most equitable resource differences. The greater the contribution, the more the optimization process will prioritize reducing the resource gap between students with high similarity.

[0041] The goal of group equity aims to ensure that there are no systematic disparities in resource access and learning outcomes among different agent groups, and is constructed based on the agent group segmentation results. Let... For the collection of agent groups, For the group The number of students, For the group The average resource acquisition amount. The objective function expression for group fairness is: ,in As the objective value for group fairness, this function measures the maximum difference in the average resource acquisition among all agent groups. Representing a group The average resource acquisition amount is calculated by summing the resource acquisition amounts of all students in the group and dividing by the number of students in the group. ,in It is a group of agents Minimize the number of students. This means achieving optimal balance in resource acquisition among different groups, avoiding any one group receiving too many or too few resources, and ensuring fairness at the group level.

[0042] The preset resource allocation constraints include two core types of constraints. The first is the total resource constraint: the number of times each educational resource can be allocated does not exceed its maximum available quantity (e.g., a video course can be allocated without limit, with a maximum quantity set to N; an offline tutoring class can only accommodate 50 people, with a maximum quantity set to 50), expressed as follows: ( ),in Indicates the first The maximum allocable capacity of an educational resource is determined based on the resource type and actual supply capacity. For digital resources (such as online videos and electronic exercises), this parameter is used. It can be set to the total number of students. (Supports access for all members); For offline resources (such as small group tutoring, and access to experimental equipment), The settings can be determined based on hardware conditions such as physical space and number of teachers (e.g., 50 students in an offline get out of class correspond to...). This constraint helps prevent supply imbalances caused by excessive resource allocation. Secondly, there is a student resource carrying capacity constraint; the amount of resources each student receives must be controlled within a reasonable range to avoid increased learning burden due to resource overload. The expression is: ( ),in Indicates the first The maximum resource capacity for each student needs to be determined by combining non-sensitive attributes (such as grade level and study duration) with learning behavior data (such as historical resource utilization rate). For example, the average study duration for junior high school students is relatively short. It can be set to 5 (meaning a maximum of 5 resources can be allocated); high school students have strong learning abilities. It can be set to 8. This constraint can ensure that resource allocation matches students' learning capacity and avoid problems such as "resource waste" or "excessive learning pressure".

[0043] In summary, the complete multi-objective optimization problem can be formulated as: under the constraints... ( )and ( ),and Under the premise that (resource allocation variables are binary decision variables), simultaneously achieve optimization of three objectives: (Maximize teaching efficiency) (Optimal individual fairness) (Optimal group fairness). The core of this problem lies in dealing with the potential conflicts between the three objectives. For example, improving teaching efficiency (increasing the allocation of highly fit resources) may lead to a widening of the difference in the amount of resources obtained by similar students (reducing individual fairness), or a certain group may obtain more resources due to a higher overall fit (reducing group fairness). Therefore, a multi-objective optimization algorithm is used to find a Pareto optimal solution that can balance the three objectives.

[0044] S4. A multi-objective evolutionary algorithm based on reference points is used to solve the multi-objective optimization problem, generating a Pareto optimal solution set containing multiple non-dominated resource allocation schemes.

[0045] Specifically, a reference-point-based multi-objective evolutionary algorithm (such as the improved NSGA-III algorithm) is used to solve the above-mentioned multi-objective optimization problem. The core reason for choosing this algorithm is that traditional multi-objective algorithms (such as NSGA-II) are prone to uneven distribution of solution sets when dealing with three or more objectives. The reference-point mechanism, however, can guide the algorithm to search for more practically meaningful optimization solutions by pre-setting the target combination region of interest to the decision-maker, while ensuring the diversity and convergence of the solution set. The solution process consists of the following key steps:

[0046] 1) Population initialization:

[0047] Each individual in the population corresponds to a feasible resource allocation scheme, in order to 0-1 matrix express( During initialization, it is necessary to ensure that each individual meets the resource allocation constraints. The specific process is as follows: ① Set the population size. (Determined based on problem complexity, such as) (If the scale is too small, the search may be insufficient; if it is too large, the computational cost will increase.) ② For each individual, randomly generate... A 0-1 matrix, initially generated The probability is set to 0.3 (to avoid an excessively sparse or dense initial scheme); ③ Constraint checks are performed on the generated matrix: if a certain resource of Then the resource will be randomly allocated. indivual Adjust to 0 (prioritize removing compatibility) (lower allocation term); if a student of Then randomly select the student indivual Adjust to 0 (again, prioritize removing items with lower compatibility); ④ Repeat steps ②-③ until generated. An initial population consisting of 10 individuals that satisfy the constraints. .

[0048] 2) Objective function value calculation and non-dominated sorting:

[0049] For each individual in the population Calculate the values ​​of its three objective functions respectively. , , ① Calculation When, substitute ( For students The comprehensive feature vector, For resources ① Calculate the feature vectors), and obtain the total fitness by double summation; ② Calculate At that time, first through Get students and Feature similarity, and then through ③ Obtain the resource disparities, substitute them into the weighted summation formula to obtain the individual fairness index; At that time, first through The average resource acquisition amount of each agent group is obtained, and the maximum difference between the groups is taken as the group fairness index.

[0050] After calculating the target value, perform a fast non-dominated ordination of the population: ① Define "dominance relationship": if an individual satisfy , , And at least one objective is strictly satisfied (e.g. ), then it is called Dominate ② Traverse the population and count the number of times each individual is dominated by other individuals (denoted as ). ), and record the set of other individuals dominated by that individual (denoted as ), ); ③ will Individuals in the first non-dominated layer (i.e., no individual can dominate them, which is the current optimal layer); ④ Remove individuals from the first layer and recalculate the remaining individuals. (If an individual is dominated by individuals at level 1, then) Subtract 1), and the new Individuals are assigned to the second layer; ⑤ Repeat this process until all individuals are assigned to different non-dominated layers. The lower the layer number, the better the individual optimization performance.

[0051] 3) Reference point guidance and population renewal:

[0052] Introducing a reference point mechanism to guide the search direction: ① Pre-set a set of reference points based on the needs of education administrators. Each reference point Corresponding to a set of target expectations (such as) This indicates the number of reference points (representing the expected teaching efficiency to reach 90% of its maximum, individual fairness index ≤ 0.1, group fairness index ≤ 0.2). Set the value to 30-50 (to ensure coverage of different objective trade-off scenarios); ② Calculate the Euclidean distance from each individual to each reference point. 1. Associate individuals with the nearest reference point; 2. For each reference point, retain the individual with the largest crowding distance among the associated individuals (the crowding distance is used to measure the sparsity of individuals on the Pareto front, avoiding the concentration of solutions in local regions and ensuring the diversity of solutions). The calculation of the crowding distance needs to be based on the distribution of individuals in the multi-object space, and the specific formula is as follows: ,in This represents the crowding distance of individual x, where m represents the index of the objective function ( Corresponding teaching efficiency goals , Corresponding to individual fairness goals , Corresponding group equity goals ), and Let be the objective function values ​​of the next adjacent individual and the previous individual after individual x is sorted along the m-th objective dimension. These represent the maximum and minimum values ​​of the m-th objective function in the current population, respectively. For the first and last individuals in the sorted objective space, their crowding distance is set to infinity (indicating that this individual is at the boundary and should be retained to maintain the integrity of the solution set). By retaining the individual with the largest crowding distance, it is ensured that the individuals associated with each reference point are evenly distributed in the objective space, avoiding overlapping solution sets.

[0053] After reference point association and individual retention are completed, the multi-objective evolutionary algorithm proceeds to the selection, crossover, and mutation phases to generate a new generation of the population. The selection operation combines roulette wheel selection with an elite retention strategy: first, retained reference point-associated individuals (elite individuals) are directly incorporated into the parent population; the remaining parent individuals are generated through roulette wheel selection. The fitness value of each non-elite individual is calculated, and it is obtained by weighted summing the individual's reference point association degree (the reciprocal of the Euclidean distance to the nearest reference point) and crowding distance, as shown in the formula: ,in Let x be the fitness value of individual x. These are the weighting coefficients. For individual x, the nearest reference point in the target space The Euclidean distance. In roulette wheel selection, the probability of an individual being selected is related to... This is directly proportional to the level of fitness, ensuring that individuals with high fitness are more likely to participate in subsequent genetic manipulations.

[0054] Crossover operations are performed on individuals with binary encoding (each gene bit corresponds to...) (0 or 1) Two-point crossover strategy is adopted: two parent individuals are randomly selected. and Two different intersection points are randomly generated. and ( ), swapping two parent individuals in to Gene segments within the interval generate offspring individuals. and After crossover, a feasibility check is required to ensure that the offspring individuals satisfy the total resource constraint and the student resource quantity constraint: if a certain offspring individual has a resource j allocation count... Exceeding the maximum number Then randomly select the portion corresponding to the resource. Adjust from 1 to 0 until the condition is met. If a student i obtains a certain amount of resources... Exceeding the limit or below the lower limit Then adjust accordingly. The value of is determined to ensure that the constraints are satisfied.

[0055] The mutation operation uses bit flipping mutation, applied to each gene bit in each offspring individual ( ), with a preset mutation probability The gene loci are flipped (1 becomes 0, 0 becomes 1). After mutation, a feasibility check and repair are performed in the same way as the crossover operation to ensure that the mutated individual is still within the feasible solution space.

[0056] The new generation of individuals, generated through selection, crossover, and mutation operations, is merged with the elite individuals of the previous generation (those retained based on reference point association) to form a temporary population. The reference point association, crowding calculation, and individual retention steps are then repeated to select the next generation. This evolutionary process is iterated until a preset termination condition is met: the termination condition can be set as the number of iterations reaching the maximum number of iterations T, or continuous iterations... The change in the hypervolume index of the Pareto optimal solution set is less than a threshold. The hypervolume metric measures the volume of the Pareto optimal solution set covered in the objective space. Set a reference point during calculation. The formula is P is the Pareto optimal solution set. This indicates that y is not better than any other target dimension. When the hypervolume metric stabilizes, it indicates that the solution set has converged. At this point, the final Pareto optimal solution set is output. This solution set contains multiple non-dominated resource allocation schemes, each of which is not dominant in terms of teaching efficiency, individual fairness, and group fairness, allowing managers to choose according to their actual needs.

[0057] S5. For a current resource allocation scheme selected from the Pareto optimal solution set, construct a counterfactual optimization problem with the optimization objective of minimizing the adjustment range of resource allocation and the loss of teaching efficiency, and with the constraint of achieving the preset group fairness improvement requirements; solve the counterfactual optimization problem to obtain the counterfactual resource allocation scheme, and generate a counterfactual explanation report based on the difference between the counterfactual resource allocation scheme and the current resource allocation scheme.

[0058] Specifically, for the current resource allocation scheme selected from the Pareto optimal solution set... ( (This indicates whether resource j is allocated to student i in the current scheme). The core objective of counterfactual optimization is to minimize the adjustment range of resource allocation and the loss of teaching efficiency while achieving the preset requirements for improving group fairness, ensuring that the adjustment scheme is operable and has the least impact on the overall teaching effect.

[0059] First, we construct the decision variables and objective function for the counterfactual optimization problem. The decision variables remain resource allocation variables. (Values ​​0 or 1), consistent with multi-objective optimization problems, representing the adjusted resource allocation state. The optimization objective includes two dimensions: one is the magnitude of resource allocation adjustment, measured using Hamming distance, i.e., comparing the current solution with the adjusted solution. The number of values ​​that change is given by the formula: , The smaller the value, the smaller the adjustment range, and the lower the operational cost for managers to implement the adjustment; secondly, there is the teaching efficiency loss, defined as the difference between the teaching efficiency of the current plan and the teaching efficiency of the adjusted plan, expressed by the formula: ,in To improve the teaching efficiency of the adjusted plan, A smaller value indicates less loss of teaching efficiency, avoiding a significant decline in overall teaching effectiveness due to improvements in fairness. Because the two objectives may potentially conflict (e.g., significant adjustments might lead to greater fairness improvements, but could increase costs),... and The multi-objective problem needs to be transformed into a single objective using a weighted summation method. The objective function is: ,in The weighting coefficients are set based on managers' preferences regarding adjustment costs and efficiency losses. and These are the normalized values ​​of the adjustment magnitude and efficiency loss (ranging from [0,1]), ensuring that the two objectives participate in the optimization on the same order of magnitude.

[0060] The constraints of the counterfactual optimization problem are pre-defined requirements for improving group fairness, transforming the group fairness objective from an "optimization goal" into a "constraint that must be satisfied." First, the group fairness index of the current solution is calculated. ,in For the group in the current plan The average resource acquisition amount. The preset improvement requirement can be set as "the group fairness index of the adjusted plan needs to be reduced to a preset threshold". "The following" means the constraint is ,in This setting is based on the needs of educational management; if further enhancement of fairness is required, it can also be set as "the coefficient of variation of the average resource acquisition of each group is less than..." The formula for the coefficient of variation is: ,in The average resource acquisition amount for all groups is the mean, with the following constraints: Furthermore, the total resource constraint must still be retained. ( Constraints on the quantity of student resources ( This ensures that the adjusted plan remains feasible.

[0061] The counterfactual optimization problem is solved using an improved integer linear programming algorithm. Since the decision variables are binary and both the constraints and the objective function are linear, integer linear programming can efficiently find the optimal solution. The solution process first transforms the objective function and constraints into standard integer programming form. The objective function is:

[0062]

[0063] By introducing auxiliary variables ( (Taking values ​​0 or 1), linearize the absolute value term to obtain... , , At this point, the objective function can be transformed into a linear form:

[0064]

[0065] The solution uses the branch and bound method, first relaxing the integer constraints (making...) and Treating the linear programming relaxation problem as a continuous variable [0,1], we obtain a lower bound. If the optimal solution of the relaxation problem satisfies the integer constraint, then the solution is the optimal solution of the integer programming problem. If not, we choose a non-integer variable for branching (e.g., treating the variable as a continuous variable [0,1]). Divided into and The problem involves two subproblems. The lower bounds of each subproblem are solved, and subproblems whose lower bounds are greater than the current upper bound are pruned (the upper bound is determined by the found feasible integer solutions). This branching, solving, and pruning process is iterated until all subproblems are pruned (i.e., the lower bounds of the subproblems are greater than the current optimal upper bound, and no better integer solutions can be found) or all subproblems are solved to integer solutions. At this point, the integer solution corresponding to the current optimal upper bound is the globally optimal solution to the counterfactual optimization problem, denoted as the counterfactual resource allocation scheme. To verify the correctness of the solution, the following steps were taken: Perform dual verification: first, constraint satisfaction verification, checking all resources one by one. Number of allocations All students Resource acquisition quantity and group equity indicators (or ),make sure The first is to fully satisfy the preset constraints; the second is to verify the optimality of the objective and calculate... Corresponding comprehensive target value And randomly select 3-5 other feasible adjustment schemes (such as schemes obtained by manually adjusting part of the resource allocation) and calculate their... Value, if All are smaller than other options If the value is positive, it proves that the solution is the optimal solution under the current constraints, thus avoiding local optima problems caused by deviations in algorithm parameter settings during the solution process.

[0066] Finish After solving and verifying, the analysis is performed. Compared with the current resource allocation scheme The differences are analyzed from three dimensions: first, the dimension of changes in resource allocation status, defining "new allocation items" as meeting the following criteria. and of Yes, "cancel allocation item" is to satisfy and of Yes, separately count the total number of the two types of change items and their proportion of the total allocation items. The proportion of changes was analyzed, and the number of changes was also statistically analyzed by type of educational resource (such as video courses, exercise books, and tutoring documents) to clarify which resource types were mainly affected by the adjustments; secondly, the student group dimension was analyzed by proxy group tags. The system is categorized into three dimensions: First, it calculates the total number of newly added allocations and the total number of canceled allocations for students within each group, obtaining the "net adjustment" (number of newly added allocations minus number of canceled allocations) for each group. This identifies groups that require a significant increase in resource supply (positive and large net adjustment) and groups that require a moderate decrease in resource supply (negative and large net adjustment). Second, it considers the resource fit dimension, calculating the fit of all newly added allocations. The average value is calculated similarly for all deassigned items. If the average fit of newly added allocation items is higher than the average fit of canceled allocation items, it indicates that the adjustment, while improving fairness, has preserved resource allocation with high fit as much as possible, reducing unnecessary losses to teaching efficiency.

[0067] Based on the above discrepancy analysis results, a counterfactual explanation report is generated. The report must include four core parts to ensure managers clearly understand the adjustment logic and operational path. The first part is a quantitative explanation of the fairness improvement effect, presented first... and A comparison of group equity indicators, including , Specific values, coefficient of variation and The changes were listed in tabular form for each agency group. and The changes in average resource acquisition and resource acquisition ranking visually demonstrate the improvement in group fairness; secondly, it supplements the auxiliary verification of individual fairness by calculating... Individual fairness indicators ,contrast of This demonstrates that the improvement in fairness did not come at the expense of individual fairness.

[0068] The second part is the assessment of the impact of the adjusted costs and efficiency, which, in addition to presenting the magnitude of the adjustments, also includes the following: With loss of teaching efficiency In addition to core data, cost acceptability can be analyzed in conjunction with actual educational management scenarios. Furthermore, sensitivity analysis can be used to explain the weighting. The impact on the results provides managers with a reference for adjustment plans under different preferences.

[0069] The third part provides priority recommendations for key adjustment items, ranking all adjustment items based on a three-dimensional evaluation model of "fairness contribution - suitability - implementation difficulty". Fairness contribution is defined as the fairness indicator of a given adjustment item to the group. The reduction was calculated by removing the adjustment item. The rebound value is the same as the original The difference is determined (the larger the difference, the higher the contribution); the fit is... The difficulty of execution is assigned a value based on resource type (1 for online resources, 2 for offline resources, and 3 for resources requiring cross-campus coordination; the lower the value, the lower the difficulty). A comprehensive score is calculated for each adjustment item. The scores are sorted from highest to lowest, with the top 30% of adjustments listed as "priority items" and the bottom 20% listed as "optional items," which can be flexibly arranged according to the actual resource usage.

[0070] Part Four details the solution process and data source traceability, recording in detail the technical parameters for solving the counterfactual optimization problem, including the integer linear programming solver model, solution parameter settings, branching strategies, and the source and preprocessing methods of the input data. It also provides a fragment of the calculation script for the discrepancy analysis, ensuring that those skilled in the art can reproduce the solution process and discrepancy analysis results based on the report's content, verifying the reliability and rationality of the counterfactual solution.

[0071] The aforementioned knowledge graph-based method for optimizing the allocation of educational resources constructs an educational knowledge graph and extracts students' comprehensive feature vectors using graph neural networks. Based on this, unsupervised clustering is used to form proxy groups that do not rely on sensitive information. Then, teaching efficiency, individual fairness based on feature similarity, and group fairness based on equal outcomes for proxy groups are all incorporated into a multi-objective optimization problem. A series of trade-off solutions are obtained by using a multi-objective evolutionary algorithm. Finally, by constructing and solving a counterfactual optimization problem, an interpretable resource reallocation scheme with minimal adjustments is generated to achieve a specific fairness goal. Thus, under strict privacy constraints, the method achieves synergistic optimization and transparent decision support for the allocation of educational resources in the three dimensions of efficiency, individual fairness, and group fairness.

[0072] In one optional embodiment, based on the comprehensive feature vectors of all students, an unsupervised clustering algorithm is used to partition the student group to obtain the proxy group partitioning result, including the following steps:

[0073] S11. Based on the comprehensive feature vectors of all students, calculate the Euclidean distance between any two comprehensive feature vectors of students, and calculate the feature similarity between any two students using the Gaussian kernel function based on the Euclidean distance to obtain the student similarity matrix.

[0074] Specifically, after obtaining the comprehensive feature vectors of all students, the Euclidean distance between any two students' comprehensive feature vectors is calculated. This distance quantifies the degree of difference between the two students in the feature space; the smaller the distance, the more similar the students' comprehensive features (such as learning behavior, knowledge mastery, etc.) are. Based on the calculated Euclidean distance, a Gaussian kernel function is used to transform it into feature similarity between any two students. This transformation can more accurately capture the correlation strength between students' features, especially for students with small differences in feature vectors, which can strengthen their similarity representation, while for students with large differences, the correlation can be reasonably weakened. Finally, a student similarity matrix is ​​formed, with students as rows and columns as indices, and elements representing the corresponding student feature similarity, providing basic relational structure data for subsequent group segmentation.

[0075] S12. Calculate the Laplacian matrix of the student similarity matrix using the spectral clustering algorithm, and obtain the eigenvectors corresponding to the first K smallest eigenvalues ​​of the Laplacian matrix as the feature representation matrix of the corresponding student in the reduced-dimensional feature space.

[0076] Specifically, based on the generated student similarity matrix, the corresponding Laplacian matrix is ​​calculated. This matrix effectively integrates the similarity information between students, reflecting the overall association structure of the student group and avoiding the impact of local biases that may exist in a single similarity value on group segmentation. Subsequently, eigenvalue decomposition is performed on the Laplacian matrix, selecting the top K smallest eigenvalues. The eigenvectors corresponding to these eigenvalues ​​contain the core information of the student group's association structure. By extracting these eigenvectors, the high-dimensional comprehensive student feature vector can be mapped to a low-dimensional space, forming a dimensionality-reduced feature representation matrix. This dimensionality reduction process not only simplifies the complexity of subsequent clustering calculations but also preserves the key associations between students, ensuring that the dimensionality-reduced data still accurately reflects the essential characteristics of the student group.

[0077] S13. By performing K-means clustering on the feature representation matrix, all students are divided into K clusters; where each cluster is defined as a surrogate group.

[0078] Specifically, the K-means clustering algorithm is used to process the feature representation matrix obtained after dimensionality reduction. During the clustering process, the algorithm automatically finds regions with high data density as cluster centers based on the distribution of student data points in the feature representation matrix. Each student data point is then assigned to the cluster containing the nearest cluster center, ultimately dividing all students into K relatively independent clusters. Students within each cluster exhibit high similarity in the dimensionality-reduced feature space, meaning they share strong commonalities in their comprehensive features. Therefore, each cluster is defined as a surrogate group, achieving a reasonable group division based on students' core features.

[0079] S14. Assign the same group identifier to all students belonging to the same cluster to obtain the proxy group partitioning result, where the group identifier is the proxy group label.

[0080] Specifically, the final step is to assign proxy group labels. For the K predefined clusters (i.e., K proxy groups), all students belonging to the same cluster are assigned the same group identifier. This group identifier must be unique, ensuring that each proxy group has a unique label. Furthermore, the identifier must be concise and clear for easy retrieval during subsequent resource allocation optimization. Through this process, each student will receive a corresponding proxy group label. This label will serve as a crucial basis for measuring group fairness and constructing multi-objective optimization problems, providing a clear group affiliation for achieving fair resource allocation at the group level.

[0081] refer to Figure 2 In one optional embodiment, based on the student comprehensive feature vector, the agent group segmentation results, and preset resource allocation constraints, a multi-objective optimization problem is constructed, including teaching efficiency objectives, individual fairness objectives, and group fairness objectives, comprising the following steps:

[0082] S21. For the process of allocating educational resources, the decision variable is defined as a resource allocation matrix; where each row of the resource allocation matrix corresponds to a student's resource allocation vector.

[0083] Specifically, when defining decision variables, the focus is on the educational resource allocation process, and the decision variables are clearly defined as a resource allocation matrix. The structure of this matrix is ​​designed with students as the core dimension, with each row corresponding to a resource allocation vector specific to a student. Each element in the vector is directly related to the allocation status of specific educational resources, which can clearly and intuitively present the allocation correspondence between each student and various types of educational resources, providing a unified and standardized data foundation for the subsequent calculation and optimization of various objectives.

[0084] S22. Train a learning gain prediction model based on historical data. The learning gain prediction model takes the student's comprehensive feature vector and resource allocation vector as input and the predicted learning gain value as output. The teaching efficiency goal is to maximize the sum of the predicted learning gain values ​​of all students.

[0085] Specifically, model training is supported by historical data, which includes the comprehensive feature vectors of past students, corresponding resource allocations, and the actual learning gains (such as the magnitude of grade improvement and the degree of mastery of knowledge points). After training, the model can accept the student's comprehensive feature vector and resource allocation vector as input. By analyzing the correlation between the two, it outputs the predicted learning gain value of the student under the corresponding resource allocation. The setting of the teaching efficiency target revolves around this prediction result. The core is to accumulate the predicted learning gain values ​​of all students, aiming to maximize this sum, ensuring that resource allocation can promote the overall improvement of student learning outcomes, and better aligning with the actual value orientation of educational resource allocation.

[0086] S23. Calculate the feature similarity weight between each pair of students based on the student's comprehensive feature vector. Based on the feature similarity weight, sum the squares of the differences between the resource allocation vectors of each pair of students to obtain the weighted sum result. Minimize the weighted sum result and define it as the individual fairness objective.

[0087] Specifically, based on the students' comprehensive feature vectors, a feature similarity weight is calculated between each pair of students. Students with more similar features receive a higher similarity weight, reflecting the fairness principle that "similar students should receive similar resources." Based on this weight, the difference between the resource allocation vectors of each pair of students is squared (squaring amplifies situations with large differences in resource allocation, strengthening constraints on unfair distribution). The squared results are then weighted and summed using the similarity weights to obtain the final weighted sum. Minimizing this result as the individual fairness objective effectively guides resource allocation towards optimization where "resource allocation differences among students with similar features are smaller."

[0088] S24. Group students into multiple agent groups based on agent group labels. Calculate the average predicted learning gain of students in each agent group based on the learning gain prediction model and resource allocation matrix. Calculate the group fairness metric based on the average predicted learning gain of all agent groups. Minimize the group fairness metric and define it as the group fairness objective.

[0089] Specifically, all students are divided into multiple independent agent groups based on their agent group labels. Using a pre-trained learning gain prediction model and a resource allocation matrix, the predicted learning gain values ​​for all students within each agent group are calculated, and the average predicted learning gain for that group is obtained by averaging these values. Based on the average predicted learning gain of all groups, a group fairness metric (such as the variance or range of the average learning gain for each group, used to quantify the degree of difference in learning gain between groups) is calculated. Minimizing this metric is defined as the group fairness objective, ensuring that there are no significant differences in learning performance improvement among different agent groups, thus achieving fairness at the group level.

[0090] S25. Combining the total resource budget constraint and the upper and lower limits of resource allocation for each student, the goals of maximizing teaching efficiency, minimizing individual fairness, and minimizing group fairness are taken as common optimization goals; the common optimization goals are formalized to obtain a multi-objective optimization problem.

[0091] Specifically, at the objective level, maximizing teaching efficiency, minimizing individual equity, and minimizing group equity are clearly defined as common optimization directions. At the constraint level, the focus is on incorporating total resource budget constraints (ensuring resource allocation does not exceed the total available resources) and upper and lower limits for resource allocation to each student (avoiding individual students receiving too many or too few resources, ensuring the rationality of individual resource allocation). Based on this, the three objectives and two types of constraints are logically integrated and expressed in a standardized manner, forming a multi-objective optimization problem that can be directly used for subsequent solutions, ensuring clear optimization directions and well-defined constraint boundaries.

[0092] In an optional embodiment, the expression for the individual fairness loss corresponding to the individual fairness objective in the loss function used by the multi-objective evolutionary algorithm is as follows:

[0093]

[0094] in, Indicates the loss of individual fairness. Represents the resource allocation matrix. and They represent students respectively. and students Resource allocation vector, This represents the total number of students. Describes the L2 norm of a vector. Students and students The feature similarity weights between the features are calculated using the following formula: ,in and Students and students The student's comprehensive feature vector, It is the temperature parameter that controls the weight distribution.

[0095] Specifically, in the loss function of the multi-objective evolutionary algorithm, the individual fairness loss is specifically used to quantify the degree of achievement of the individual fairness goal. Its core is to ensure that the measurement of individual fairness is more in line with the actual differences in student characteristics by linking the similarity of student features with the differences in resource allocation through specific logic.

[0096] The calculation of individual fairness loss first relies on feature similarity weights. These weights are determined based on the students' comprehensive feature vectors and are generated by reflecting the differences in students' comprehensive features. At the same time, a temperature parameter is introduced to regulate the weight distribution. The temperature parameter can affect the discriminative power of the weights, making the weights of students with similar features more prominent and the weights of students with large feature differences more moderate, thereby accurately matching the core demand of individual fairness that "similar students should receive similar resources".

[0097] Based on this, the individual fairness loss is obtained by processing the differences in resource allocation vectors across all student pairs. First, the difference in resource allocation vectors for each student pair is calculated. Then, this difference is weighted using the aforementioned feature similarity weights. Finally, all weighted results are summed. This calculation logic ensures that the more similar the features of students, the greater the impact of resource allocation differences on the individual fairness loss. Subsequent optimization processes will prioritize reducing the resource allocation gap for these students, ultimately achieving precise optimization of the individual fairness objective.

[0098] In an optional embodiment, the loss function used in the multi-objective evolutionary algorithm, specifically the expression for the group fairness loss corresponding to the group fairness objective, is as follows:

[0099]

[0100] in, This indicates a loss of fairness for the group. Represents the resource allocation matrix. This represents the mean of the average prediction learning gain across all agent groups. The standard deviation of the average predicted learning gain across all agent groups;

[0101] The formula for calculating the average prediction learning gain is as follows:

[0102]

[0103] in, To average the prediction learning gain, Indicates the first A group of students acting as agents Represents a set The number of students in This represents the total number of agents. This indicates a learning gain prediction model. Students The student's comprehensive feature vector, Students The resource allocation vector; where , .

[0104] Specifically, the core function of group fairness loss is to quantify the degree of difference in average predicted learning gain among different agent groups, thus serving as a measure of group fairness objectives. Before calculating group fairness loss, the average predicted learning gain of each agent group must first be determined. For the k-th agent group, the student set and the number of students within the set are first defined. Then, the predicted learning gain of each student in the set is calculated using a learning gain prediction model. The model's input is the student's comprehensive feature vector and resource allocation vector, and the output is the student's individual predicted learning gain. The sum of the individual predicted learning gains of all students in the group, divided by the number of students in the group, yields the average predicted learning gain of that agent group.

[0105] Based on this, two key statistics are further calculated to construct the group fairness loss. The first is the mean of the average predicted learning gain of all agent groups. This mean is obtained by summing the average predicted learning gains of all agent groups and then dividing by the total number of agent groups. It reflects the overall average learning gain level of all groups. The second is the standard deviation of the average predicted learning gain of all agent groups. This is obtained by first calculating the difference between the average predicted learning gain of each agent group and the above mean, squaring each difference and summing the results, dividing the sum by the total number of agent groups, and finally taking the square root of the result. The standard deviation reflects the dispersion of the average predicted learning gain among different groups.

[0106] The group fairness loss is defined by the ratio of the standard deviation to the mean. The magnitude of this ratio directly corresponds to the quality of group fairness; a smaller ratio indicates that the average predicted learning gain of different agent groups is closer to the overall mean, the differences between groups are smaller, and the group fairness is better. Conversely, a larger ratio indicates that the average predicted learning gain of some groups deviates significantly from the overall level, and the group fairness is insufficient. Therefore, minimizing this ratio in the loss function of multi-objective evolutionary algorithms constitutes the core requirement of the group fairness objective, thereby driving the resource allocation scheme towards optimization towards group fairness.

[0107] In one optional embodiment, a reference-point-based multi-objective evolutionary algorithm is used to solve the multi-objective optimization problem, generating a Pareto optimal solution set containing multiple non-dominated resource allocation schemes, including the following steps:

[0108] S31. In the three-dimensional target space consisting of teaching efficiency target, individual fairness target and group fairness target, generate a set of uniformly distributed reference points according to the system sampling method.

[0109] Specifically, a set of reference points is generated in a three-dimensional target space. This space comprises teaching efficiency goals, individual equity goals, and group equity goals, with each dimension corresponding to a range of values ​​for an optimization goal. A systematic sampling method is used to generate reference points. This involves dividing each target dimension into sampling intervals at fixed intervals, and then cross-combining sampling points from different dimensions to form a uniformly distributed set of reference points. This sampling method ensures that reference points are comprehensively covered and evenly distributed throughout the target space, providing clear guidance for the subsequent association between individuals and reference points, and preventing uneven distribution of reference points from causing the optimization direction to be biased towards a particular goal.

[0110] S32. Randomly generate an initial population, where each individual in the initial population represents a complete resource allocation matrix through chromosome encoding, and perform constraint satisfaction verification on each individual in the initial population to ensure that each individual satisfies the resource allocation constraints.

[0111] Specifically, an initial population is then randomly generated. Each individual in the population corresponds to a complete resource allocation matrix through chromosome encoding. Each segment of the chromosome corresponds to a row in the resource allocation matrix (i.e., the resource allocation vector for a single student), and the value of the encoding directly reflects whether the student has obtained the corresponding educational resources. After generating the initial population, constraint satisfaction is verified for each individual. The resource allocation matrix corresponding to each individual is checked to see if it meets the preset resource allocation constraints, such as the total resource budget constraint (ensuring that the total allocation of various resources does not exceed the available quota) and the upper and lower limits of resource allocation for each student (ensuring that the amount of resources obtained by a single student is within a reasonable range). Individuals that do not meet the constraints are removed, and only feasible individuals that meet the conditions are retained to form the initial population.

[0112] S33. Perform simulated binary crossover and polynomial mutation operations on individuals in the initial population to generate offspring populations. Merge the initial population with the offspring populations to obtain a merged population.

[0113] Specifically, the algorithm first employs a simulated binary crossover operation. Two individuals from the initial population are selected as parents, and partial chromosome segments are exchanged according to a simulated binary-coded crossover rule to generate two new offspring individuals. This operation effectively combines the superior traits of the parents, achieving efficient gene recombination. Next, a multinomial mutation operation is used to randomly mutate some gene loci in the offspring individuals obtained after crossover. The mutation amplitude is determined by a multinomial distribution, thereby introducing new genetic information, maintaining population diversity, and preventing the algorithm from getting trapped in local optima. After crossover and mutation, the initial population and the generated offspring population are merged to form a larger merged population, providing a richer pool of candidates for subsequent selection of elite individuals.

[0114] S34. By performing non-dominated sorting on all individuals in the merged population, the merged population is divided into multiple non-dominated front layers. The three optimization objective values ​​of each individual in the non-dominated front layer are normalized to obtain the normalized fitness vector of each individual. The three optimization objective values ​​represent the optimization objective values ​​corresponding to the teaching efficiency objective, the individual fairness objective, and the group fairness objective.

[0115] Specifically, the merged population undergoes non-dominated ranking. Based on individual performance on three optimization objectives (teaching efficiency, individual fairness, and group fairness), all individuals are divided into different non-dominated frontier layers. Individuals within the same frontier layer are not dominant to each other (i.e., no single individual outperforms all other individuals in the same layer across all objectives), and individuals at the frontier layer generally outperform those at the back. After ranking, the three optimization objective values ​​for each individual are normalized to eliminate the influence of differences in the scales of different objectives (e.g., teaching efficiency may range from tens to hundreds, while individual fairness may range from a few tenths to a few digits). Each objective value is uniformly mapped to the [0,1] interval, forming a normalized fitness vector for each individual, providing a unified scale for subsequent correlation calculations.

[0116] S35. Calculate the correlation between the normalized fitness vector of each individual and each reference point in the reference point set to obtain the correlation between each individual and each reference point; assign a nearest reference point to each individual based on the correlation; select elite individuals from the merged population based on the level of the non-dominated front layer where the individual is located and the niche count of the nearest reference point to which the individual belongs, and form a new generation population.

[0117] Specifically, the correlation between each individual's normalized fitness vector and each reference point in the reference point set is calculated. The correlation measures how close an individual is to a reference point in the target space; a higher correlation indicates that the individual is closer to the target requirement corresponding to that reference point. Based on the correlation results, each individual is assigned a nearest reference point (i.e., the reference point with the highest correlation). Then, elite individuals are selected from the merged population based on two core indicators: first, the non-dominated frontier level of the individual, prioritizing individuals at higher levels (i.e., those with better performance); and second, the niche count of the nearest reference point (i.e., the number of individuals currently associated with that reference point), prioritizing individuals associated with reference points with lower niche counts to avoid multiple individuals clustering around the same reference point and maintain population diversity. Through comprehensive selection using these two indicators, a new generation of high-performing and evenly distributed individuals is formed.

[0118] S36. Using the new generation population as the new initial population, repeat S33 to S35. When the number of iterations reaches the preset number of generations, output the resource allocation matrix corresponding to all individuals in the first non-dominated frontier layer of the final population to obtain the Pareto optimal solution set.

[0119] Specifically, the new generation of the population is used as the new initial population, and the processes of crossover, mutation, merging, sorting, correlation calculation, and elite selection are repeated (i.e., steps S33 to S35 are repeated). When the number of iterations reaches the preset number of generations (this number is preset according to the problem complexity and population size to ensure that the algorithm has enough evolution time to converge to a better solution), the iteration stops, and all individuals in the first non-dominated frontier layer of the final population are extracted. These individuals have achieved the optimal non-dominated state in all three optimization objectives, and no other individual can improve the performance of one objective without reducing the performance of another. Outputting the resource allocation matrix corresponding to these individuals yields a Pareto optimal solution set containing multiple non-dominated resource allocation schemes.

[0120] In an optional embodiment, for a current resource allocation scheme selected from the Pareto optimal solution set, a counterfactual optimization problem is constructed with the optimization objective of minimizing the magnitude of resource allocation adjustments and the loss of teaching efficiency, and with the constraint of achieving a preset requirement for improving group fairness. The counterfactual optimization problem is solved to obtain a counterfactual resource allocation scheme, and a counterfactual explanation report is generated based on the difference between the counterfactual resource allocation scheme and the current resource allocation scheme, including the following steps:

[0121] S41. Receive the user-defined group fairness improvement ratio, calculate the corresponding current group fairness loss based on the selected current resource allocation scheme, and calculate the fairness constraints that the counterfactual resource allocation scheme must satisfy based on the group fairness improvement ratio and the current group fairness loss; the expression for the fairness constraints is:

[0122]

[0123] in, Let be the counterfactual resource allocation matrix corresponding to the counterfactual resource allocation scheme to be determined. This is the current resource configuration matrix corresponding to the current resource configuration scheme. This indicates the fairness loss for the current group corresponding to the current resource allocation plan. This indicates the loss of fairness for the counterfactual group corresponding to the counterfactual resource allocation scheme. To increase the proportion of fairness within the group.

[0124] Specifically, the system receives the percentage increase in group fairness set by the user based on their educational management needs. This percentage clarifies the specific degree of fairness improvement required. Next, for the selected current resource allocation scheme, the corresponding current group fairness loss is calculated. This loss value is the core indicator for measuring the current scheme's performance in terms of group fairness. Subsequently, based on the percentage increase in group fairness and the current group fairness loss, the fairness constraints that the counterfactual resource allocation scheme must meet are derived. By discounting the current group fairness loss according to the percentage increase, it is ensured that the group fairness loss of the counterfactual scheme does not exceed the discounted value. This clarifies the minimum standard that the counterfactual scheme must achieve in terms of fairness improvement, defining the fairness boundaries for subsequent optimization.

[0125] S42. Construct a counterfactual optimization problem, where the optimization objective of the counterfactual optimization problem is to minimize the weighted sum of the resource allocation adjustment term and the teaching efficiency loss term. The decision variable of the counterfactual optimization problem is the counterfactual resource allocation matrix. The constraints of the counterfactual optimization problem include fairness constraints and resource allocation constraints.

[0126] Specifically, the decision variables for the counterfactual optimization problem are set as a counterfactual resource allocation matrix. Each element in the matrix corresponds to the allocation relationship between a specific student and a specific educational resource, directly determining the resource allocation status of the counterfactual solution. The optimization objective is to minimize the weighted sum of the resource allocation adjustment magnitude term and the teaching efficiency loss term. The adjustment magnitude term reflects the magnitude of the difference in resource allocation between the current solution and the counterfactual solution, while the efficiency loss term reflects the degree of decline in teaching efficiency of the counterfactual solution compared to the current solution. By weighting and integrating the two objectives, the adjustment cost and efficiency impact are balanced. The constraints include two parts: first, the fairness constraints determined above, ensuring that the counterfactual solution meets the preset fairness improvement requirements; second, the resource allocation constraints, covering the total resource budget limit and the upper and lower limits of individual student resource allocation, ensuring the feasibility of the counterfactual solution in actual educational scenarios.

[0127] S43. The gradient descent algorithm combined with the L1 norm regularization term is used to iteratively solve the counterfactual optimization problem. When the convergence condition is met, the iteration stops and the counterfactual resource allocation matrix corresponding to the obtained counterfactual resource allocation scheme is output.

[0128] Specifically, an iterative solution is achieved using the gradient descent algorithm, with an L1 norm regularization term incorporated into the calculation. The gradient descent algorithm iteratively adjusts the elements of the counterfactual resource allocation matrix, gradually approaching the minimum value of the optimization objective. The L1 norm regularization term helps control the sparsity of resource allocation adjustments during the solution process, avoiding excessive unnecessary small adjustments and improving the practicality of the solution. During the iteration process, convergence is continuously monitored. When the difference between the optimization objective values ​​obtained from two adjacent iterations is less than a preset threshold, or when the number of iterations reaches a preset upper limit, the convergence condition is satisfied, and the iteration stops. The output matrix at this point is the counterfactual resource allocation matrix corresponding to the counterfactual resource allocation scheme.

[0129] S44. Calculate the difference matrix between the counterfactual resource allocation matrix and the current resource allocation matrix, and identify the students whose resource allocation has been adjusted and their corresponding educational resource categories from the difference matrix; based on the students whose resource allocation has been adjusted and their corresponding educational resource categories, summarize the pattern of resource allocation adjustment.

[0130] Specifically, the difference matrix between the counterfactual resource allocation matrix and the current resource allocation matrix is ​​calculated. Non-zero values ​​in the difference matrix correspond to locations where resource allocation has changed. These non-zero values ​​accurately identify students whose resource allocation has been adjusted (corresponding to rows in the matrix) and the types of educational resources involved (corresponding to columns in the matrix). Based on the identified adjustment targets, the patterns of resource allocation adjustments are further summarized. For example, it is possible to identify which agent groups of students have higher adjustment frequencies and which types of educational resources (such as video courses and tutoring exercises) are the main targets of adjustment, thus clarifying the concentrated direction and patterns of adjustment.

[0131] S45. Based on the resource allocation adjustment pattern, the teaching efficiency target value corresponding to the counterfactual resource allocation scheme, the individual fairness loss and the group fairness loss, and the comparison changes of each target value with the current resource allocation scheme, generate a counterfactual explanation report.

[0132] Specifically, the report integrates key information from multiple aspects: first, the resource allocation adjustment model summarized above clearly presents the core direction and specific targets of the adjustment; second, the teaching efficiency target values, individual equity losses, and group equity losses corresponding to the counterfactual resource allocation schemes, comprehensively reflecting the overall performance of the counterfactual schemes; and third, the comparison of the changes in each target value of the counterfactual scheme with the corresponding target values ​​of the current scheme, visually demonstrating the effect of equity improvement, changes in teaching efficiency, and fluctuations in individual equity through quantitative differences. This systematic presentation of content provides education administrators with a clear basis for understanding the adjustment logic, effects, and impacts of counterfactual schemes, assisting them in making reasonable resource allocation decisions.

[0133] The aforementioned knowledge graph-based method for optimizing the allocation of educational resources constructs an educational knowledge graph and extracts students' comprehensive feature vectors using graph neural networks. Based on this, unsupervised clustering is used to form proxy groups that do not rely on sensitive information. Then, teaching efficiency, individual fairness based on feature similarity, and group fairness based on equal outcomes for proxy groups are all incorporated into a multi-objective optimization problem. A series of trade-off solutions are obtained by using a multi-objective evolutionary algorithm. Finally, by constructing and solving a counterfactual optimization problem, an interpretable resource reallocation scheme with minimal adjustments is generated to achieve a specific fairness goal. Thus, under strict privacy constraints, the method achieves synergistic optimization and transparent decision support for the allocation of educational resources in the three dimensions of efficiency, individual fairness, and group fairness.

[0134] It should be understood that although the steps in the flowcharts of the embodiments described above 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 flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.

[0135] Based on the same inventive concept, this application also provides an apparatus for implementing the knowledge graph-based educational resource optimization allocation method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method. Therefore, the specific limitations of one or more knowledge graph-based educational resource optimization allocation apparatus embodiments provided below can be found in the limitations of the knowledge graph-based educational resource optimization allocation method described above, and will not be repeated here.

[0136] In one exemplary embodiment, such as Figure 3 As shown, a knowledge graph-based educational resource optimization and allocation device 30 is provided to implement the methods in the above-described method embodiments. The device includes:

[0137] The education data fusion modeling module 31 is used to acquire students' non-sensitive attribute data, learning behavior data, knowledge mastery data, and educational resource metadata. Based on the non-sensitive attribute data, learning behavior data, knowledge mastery data, and educational resource metadata, it constructs an education knowledge graph that includes student nodes, education resource nodes, knowledge point nodes, and the relationships between nodes of various types. The education knowledge graph is then encoded using a graph neural network to generate a comprehensive feature vector for each student.

[0138] The group feature clustering module 32 is used to divide the student group based on the comprehensive feature vector of all students using an unsupervised clustering algorithm to obtain the proxy group division result; wherein, the proxy group division result includes the proxy group label assigned to each student.

[0139] The multi-objective optimization modeling module 33 is used to construct a multi-objective optimization problem that includes teaching efficiency objective, individual fairness objective and group fairness objective based on the student comprehensive feature vector, agent group division results and preset resource allocation constraints.

[0140] The Pareto solution set generation module 34 is used to solve the multi-objective optimization problem using a reference point-based multi-objective evolution algorithm to generate a Pareto optimal solution set containing multiple non-dominated resource allocation schemes.

[0141] The counterfactual decision optimization module 35 is used to construct a counterfactual optimization problem for a current resource allocation scheme selected from the Pareto optimal solution set. The optimization objective is to minimize the adjustment range of resource allocation and the loss of teaching efficiency, and the constraint is to achieve the preset group fairness improvement requirements. The counterfactual optimization problem is solved to obtain the counterfactual resource allocation scheme, and a counterfactual explanation report is generated based on the difference between the counterfactual resource allocation scheme and the current resource allocation scheme.

[0142] Embodiments of this application also provide a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the aforementioned method embodiments.

[0143] Embodiments of this application also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps in the above-described method embodiments.

[0144] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The components described as separate parts may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this disclosure according to actual needs. Those skilled in the art can understand and implement this without creative effort.

[0145] The above-described embodiments are merely illustrative of several implementation methods of the embodiments of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of the patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the embodiments of this application, and these modifications and improvements all fall within the protection scope of the embodiments of this application.

Claims

1. A method for optimizing the allocation of educational resources based on knowledge graphs, characterized in that, The method includes: S1. Obtain students' non-sensitive attribute data, learning behavior data, knowledge mastery data, and educational resource metadata. Based on the non-sensitive attribute data, learning behavior data, knowledge mastery data, and educational resource metadata, construct an educational knowledge graph including student nodes, educational resource nodes, knowledge point nodes, and the relationships between nodes of each type. Encode the educational knowledge graph using a graph neural network to generate a comprehensive feature vector for each student. The non-sensitive attribute data includes the student's grade, gender, length of enrollment, and elective course category. The learning behavior data includes the student's course viewing time, homework submission frequency, online Q&A interaction frequency, and knowledge point review frequency. The knowledge mastery data is used to record the student's mastery level in units of knowledge points. The educational resource metadata includes the resource type, subject area, corresponding knowledge point tag, resource duration, difficulty coefficient, and applicable grade range. S2. Based on the comprehensive feature vectors of all students, the student groups are divided using an unsupervised clustering algorithm to obtain the proxy group division results; wherein, the proxy group division results include the proxy group label assigned to each student; S3. Based on the student comprehensive feature vector, the agent group division results, and the preset resource allocation constraints, construct a multi-objective optimization problem including teaching efficiency objective, individual fairness objective, and group fairness objective; S4. The multi-objective optimization problem is solved by using a reference point-based multi-objective evolution algorithm to generate a Pareto optimal solution set containing multiple non-dominated resource allocation schemes; S5. For a current resource allocation scheme selected from the Pareto optimal solution set, construct a counterfactual optimization problem with the optimization objective of minimizing the resource allocation adjustment range and the loss of teaching efficiency, and with the constraint of achieving the preset group fairness improvement requirements; solve the counterfactual optimization problem to obtain a counterfactual resource allocation scheme, and generate a counterfactual explanation report based on the difference between the counterfactual resource allocation scheme and the current resource allocation scheme; Wherein, S3 includes: S21. For the educational resource allocation process, the decision variable is defined as a resource allocation matrix; wherein, each row of the resource allocation matrix corresponds to a student's resource allocation vector; S22. Train a learning gain prediction model based on historical data, wherein the learning gain prediction model takes the student's comprehensive feature vector and the resource allocation vector as input and the predicted learning gain value as output, and the teaching efficiency objective is to maximize the sum of the predicted learning gain values ​​of all students. S23. Calculate the feature similarity weight between each pair of students based on the student comprehensive feature vector. Based on the feature similarity weight, perform a weighted summation of the squares of the differences between the resource allocation vectors of each pair of students to obtain a weighted summation result. Minimize the weighted summation result and define it as the individual fairness objective. S24. Students are grouped into multiple agent groups according to the agent group labels. Based on the learning gain prediction model and the resource allocation matrix, the average predicted learning gain of students in each agent group is calculated. Based on the average predicted learning gain of all agent groups, a group fairness metric is calculated. The minimum of the group fairness metric is defined as the group fairness target. S25. Combining the total resource budget constraint and the upper and lower limits of resource allocation for each student, the common optimization objectives are to maximize the teaching efficiency objective, minimize the individual fairness objective, and minimize the group fairness objective; the common optimization objective is formalized to obtain the multi-objective optimization problem.

2. The method according to claim 1, characterized in that, The process of dividing the student group based on the comprehensive feature vectors of all students using an unsupervised clustering algorithm to obtain the proxy group division result includes: S11. Based on the comprehensive feature vectors of all students, calculate the Euclidean distance between every two comprehensive feature vectors of students, and calculate the feature similarity between every two students using a Gaussian kernel function based on the Euclidean distance to obtain the student similarity matrix; S12. Calculate the Laplacian matrix of the student similarity matrix using the spectral clustering algorithm, and obtain the eigenvectors corresponding to the first K smallest eigenvalues ​​of the Laplacian matrix as the feature representation matrix of the corresponding student in the reduced-dimensional feature space. S13. By performing K-means clustering on the feature representation matrix, all students are divided into K clusters; where each cluster is defined as a surrogate group; S14. Assign the same group identifier to all students belonging to the same cluster to obtain the proxy group division result, wherein the group identifier is the proxy group label.

3. The method according to claim 1, characterized in that, The expression for the individual fairness loss corresponding to the individual fairness objective in the loss function used in the multi-objective evolutionary algorithm is as follows: ; in, This indicates the individual's loss of fairness. This represents the resource allocation matrix. and They represent students respectively. and students The resource allocation vector, This represents the total number of students. Describes the L2 norm of a vector. Students and students The feature similarity weights between the features are calculated using the following formula: ,in and Students and students The student comprehensive feature vector, It is the temperature parameter that controls the weight distribution.

4. The method according to claim 1, characterized in that, The loss function used in the multi-objective evolutionary algorithm, specifically the expression for the group fairness loss corresponding to the group fairness objective, is as follows: ; in, This indicates the loss of fairness for the aforementioned group. This represents the resource allocation matrix. This represents the mean of the average prediction learning gain for all the agent groups. The standard deviation of the average predictive learning gain for all said agent groups; The formula for calculating the average prediction learning gain is as follows: ; in, The average prediction learning gain, Indicates the first A group of students acting as agents Represents a set The number of students in This represents the total number of agents. This represents the learning gain prediction model. Students The student comprehensive feature vector, Students The resource allocation vector; wherein , .

5. The method according to claim 1, characterized in that, The multi-objective optimization problem is solved using a reference-point-based multi-objective evolutionary algorithm, generating a Pareto optimal solution set containing multiple non-dominated resource allocation schemes, including: S31. In the three-dimensional target space composed of the teaching efficiency target, the individual fairness target, and the group fairness target, a set of uniformly distributed reference points is generated according to the system sampling method. S32. Randomly generate an initial population, wherein each individual in the initial population represents a complete resource allocation matrix through chromosome encoding, and perform constraint satisfaction verification on each individual in the initial population to ensure that each individual satisfies the resource allocation constraints. S33. Perform simulated binary crossover and polynomial mutation operations on the individuals in the initial population to generate a offspring population. Merge the initial population with the offspring population to obtain a merged population. S34. By performing non-dominated sorting on all individuals in the merged population, the merged population is divided into multiple non-dominated front layers, and the three optimization objective values ​​of each individual in the non-dominated front layer are normalized to obtain the normalized fitness vector of each individual; wherein, the three optimization objective values ​​represent the optimization objective values ​​corresponding to the teaching efficiency objective, the individual fairness objective, and the group fairness objective. S35. Calculate the correlation between the normalized fitness vector of each individual and each reference point in the reference point set to obtain the correlation between each individual and each reference point; assign a nearest reference point to each individual based on the correlation; select elite individuals from the merged population based on the level of the non-dominated front layer where the individual is located and the niche count of the nearest reference point to which the individual belongs, and form a new generation population. S36. Using the new generation population as the new initial population, repeat S33 to S35. When the number of iterations reaches the preset number of generations, output the resource allocation matrix corresponding to all individuals in the first non-dominated front layer of the final population to obtain the Pareto optimal solution set.

6. The method according to claim 4, characterized in that, For a current resource allocation scheme selected from the Pareto optimal solution set, a counterfactual optimization problem is constructed with the optimization objective of minimizing the adjustment range of resource allocation and the loss of teaching efficiency, and with the constraint of achieving a preset group fairness improvement requirement. Solve the counterfactual optimization problem to obtain a counterfactual resource allocation scheme, and generate a counterfactual explanation report based on the difference between the counterfactual resource allocation scheme and the current resource allocation scheme, including: S41. Receive the user-defined group fairness improvement ratio, calculate the corresponding current group fairness loss based on the selected current resource allocation scheme, and calculate the fairness constraints that the counterfactual resource allocation scheme must satisfy based on the group fairness improvement ratio and the current group fairness loss; the expression for the fairness constraints is: ; in, Let be the counterfactual resource allocation matrix corresponding to the counterfactual resource allocation scheme to be determined. This is the current resource configuration matrix corresponding to the current resource configuration scheme. This represents the current group fairness loss corresponding to the current resource allocation scheme. This represents the counterfactual group fairness loss corresponding to the counterfactual resource allocation scheme. To increase the proportion of fairness for the aforementioned group; S42. Construct the counterfactual optimization problem, wherein the optimization objective of the counterfactual optimization problem is to minimize the weighted sum of the resource allocation adjustment magnitude term and the teaching efficiency loss term, the decision variable of the counterfactual optimization problem is the counterfactual resource allocation matrix, and the constraints of the counterfactual optimization problem include the fairness constraint and the resource allocation constraint. S43. The gradient descent algorithm combined with the L1 norm regularization term is used to iteratively solve the counterfactual optimization problem. When the convergence condition is met, the iteration is stopped, and the counterfactual resource allocation matrix corresponding to the counterfactual resource allocation scheme obtained by the solution is output. S44. Calculate the difference matrix between the counterfactual resource allocation matrix and the current resource allocation matrix, identify the students whose resource allocation has been adjusted and their corresponding educational resource categories from the difference matrix; based on the students whose resource allocation has been adjusted and their corresponding educational resource categories, summarize the pattern of resource allocation adjustment; S45. Based on the resource allocation adjustment mode, the teaching efficiency target value corresponding to the counterfactual resource allocation scheme, the individual fairness loss and the group fairness loss, and the comparison change of each target value corresponding to the current resource allocation scheme, generate the counterfactual explanation report.

7. A knowledge graph-based educational resource optimization and allocation device, used to implement the method according to any one of claims 1 to 6, characterized in that, The device includes: The education data fusion modeling module is used to acquire students' non-sensitive attribute data, learning behavior data, knowledge mastery data, and educational resource metadata. Based on the non-sensitive attribute data, learning behavior data, knowledge mastery data, and educational resource metadata, an education knowledge graph is constructed, including student nodes, education resource nodes, knowledge point nodes, and the relationships between nodes of each type. The education knowledge graph is then encoded using a graph neural network to generate a comprehensive feature vector for each student. The group feature clustering module is used to divide the student group based on the comprehensive feature vector of all students using an unsupervised clustering algorithm to obtain the proxy group division result; wherein, the proxy group division result includes a proxy group label assigned to each student; The multi-objective optimization modeling module is used to construct a multi-objective optimization problem including teaching efficiency objective, individual fairness objective and group fairness objective based on the student comprehensive feature vector, the agent group division result and the preset resource allocation constraints. The Pareto solution set generation module is used to solve the multi-objective optimization problem using a reference point-based multi-objective evolution algorithm to generate a Pareto optimal solution set containing multiple non-dominated resource allocation schemes. The counterfactual decision optimization module is used to construct a counterfactual optimization problem for a current resource allocation scheme selected from the Pareto optimal solution set. The optimization objective is to minimize the adjustment range of resource allocation and the loss of teaching efficiency, and the constraint is to achieve a preset group fairness improvement requirement. The module solves the counterfactual optimization problem to obtain a counterfactual resource allocation scheme, and generates a counterfactual explanation report based on the difference between the counterfactual resource allocation scheme and the current resource allocation scheme.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 6.

Citation Information

Patent Citations

  • Big data-based preschool education resource allocation method and system

    CN118313974A

  • Efficient intelligent teaching resource scheduling algorithm and implementation method thereof

    CN119151739A