A Data Query and Real-Time Visualization System and Method Based on an Educational Large Language Model

By using an educational big language model and a hybrid wolf pack optimization algorithm, the conversion from natural language to structured queries and the optimization of query execution plans in the educational data system were realized. This solved the problems of user operation complexity and low efficiency, and improved the intelligence and user-friendliness of the educational data platform.

CN121117020BActive Publication Date: 2026-03-10JIANGXI MODERN POLYTECHNIC COLLEGE
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-09-09
Publication Date
2026-03-10

AI Technical Summary

Technical Problem

Existing educational data query systems have high user operation thresholds, making it difficult to perform flexible searches using natural language. The query execution plan lacks intelligent optimization, which affects system efficiency and user experience.

Method used

The system employs a large educational language model for natural language parsing to generate structured query statements. It also optimizes the query execution plan using a hybrid wolf pack optimization algorithm. Combined with data preprocessing and real-time visualization, it enables complex retrieval of multi-source, multi-condition, and multi-dimensional educational data.

Benefits of technology

It lowers the barrier to entry for non-professional users, enhances the practicality and intelligence of the education data platform, improves query efficiency and resource utilization, and ensures the accuracy of results and response time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121117020B_ABST
    Figure CN121117020B_ABST
Patent Text Reader

Abstract

This invention discloses a data query and real-time visualization system and method based on an educational large language model. The system extracts the query target, time range, data type, and filtering conditions, converting natural language queries into preliminary structured query statements. It then acquires a preliminary set of educational data that meets the query conditions, recording the query response time and data matching indicators. A preprocessed set of educational data is generated. A query execution plan is constructed based on the preliminary structured query statements and the educational data set. An optimal query execution strategy is generated. The query results are sorted and grouped according to key query parameters. An interactive data visualization model is constructed, and appropriate chart types are selected to achieve intuitive data display. This invention enables non-professional users to easily perform complex searches on multi-source, multi-condition, and multi-dimensional educational data, effectively improving the practicality and intelligence level of educational data platforms.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data query technology, and in particular to a data query and real-time visualization system and method based on an educational large language model. Background Technology

[0002] With the accelerated advancement of educational informatization, the continuous accumulation of educational big data, and the increasing demand for its application, educational data analysis and visualization are becoming increasingly important in supporting educational decision-making, teaching evaluation, and personalized learning scenarios. Currently, most mainstream educational data query and visualization systems rely on structured query languages ​​or fixed-format visualization reports. Users typically need to have strong data analysis capabilities and professional programming skills to complete complex data retrieval and visualization operations.

[0003] In existing technologies, the methods for querying educational data have the following main drawbacks: users find it difficult to directly and flexibly retrieve data using natural language, and query statements need to be manually written, resulting in a high operational threshold for education administrators and front-line teachers; existing systems lack intelligent optimization mechanisms for query execution plans, and the query process often fails to fully consider the dynamic balance between response time, data matching rate, and execution resource consumption, affecting the overall efficiency of the system and user experience. Summary of the Invention

[0004] One objective of this invention is to propose a data query and real-time visualization system and method based on an educational large language model. This invention enables non-professional users to easily perform complex searches on multi-source, multi-condition, and multi-dimensional educational data, effectively improving the practicality and intelligence level of the educational data platform.

[0005] A data query and real-time visualization system and method based on an educational large language model according to an embodiment of the present invention includes:

[0006] The system receives natural language query requests input by users and calls the educational big language model to perform semantic parsing on the query requests, extracting query targets, time ranges, data types and filtering conditions, and converting natural language queries into preliminary structured query statements.

[0007] A preliminary query is performed on the education data repository based on the preliminary structured query statement to obtain a preliminary set of education data that meets the query conditions, and the query response time and data matching indicators are recorded.

[0008] The initial educational dataset is preprocessed to generate a preprocessed educational dataset.

[0009] A query execution plan is constructed based on the preliminary structured query statement and the educational data set;

[0010] A hybrid wolf pack optimization algorithm is applied to the query execution plan. By evaluating the query execution cost, data matching rate and response time, the query execution plan is iteratively optimized to generate the optimal query execution strategy.

[0011] The preprocessed educational data set is queried according to the optimal query execution strategy to obtain the final query result set, and the query results are sorted and grouped according to the key query parameters.

[0012] The final query result set is converted into a unified data format for real-time visualization, an interactive data visualization model is built, and appropriate chart types are selected to achieve intuitive data display.

[0013] Optionally, the conversion of the natural language query into a preliminary structured query statement includes:

[0014] Receive natural language query requests from users;

[0015] The educational big language model is invoked to perform semantic parsing on natural language query requests and extract a set of structured query elements;

[0016] Based on the extracted set of structured query elements, the natural language query request is converted into a preliminary structured query statement through a natural language semantic mapping function;

[0017] The natural language semantic mapping function specifically involves inputting the query target, time range, educational data type, and filtering conditions from the natural language query request into the educational big language model. The educational big language model then performs semantic decomposition and reconstruction on the input query elements, automatically generating a structured expression that conforms to the data query logic, thereby obtaining a preliminary structured query statement.

[0018] Optionally, the preliminary query of the education data repository based on the preliminary structured query statement includes:

[0019] The initial structured query statement is parsed into a standardized query syntax expression;

[0020] The standardized query syntax expression is submitted to the education data repository execution module, and a preliminary query operation is performed on the education data repository according to the standardized query syntax expression to obtain a preliminary education data set.

[0021] Record the query response time for the initial query operation;

[0022] Calculate the data matching index of the preliminary education dataset. The data matching index is the ratio of the number of education data records in the preliminary query results to the total number of records in the initial dataset to be retrieved.

[0023] The data matching index ranges from zero to one. It measures the degree of matching between the initial query results and the query conditions. The higher the data matching index value, the higher the query accuracy.

[0024] Optionally, the data preprocessing includes:

[0025] Each educational data record in the preliminary educational dataset is standardized to obtain a standardized educational dataset.

[0026] Data cleaning is performed on each educational data record in the standardized educational data set to remove records containing illegal values, format errors, or logical inconsistencies, resulting in a cleaned educational data set.

[0027] Missing values ​​are filled in for educational data records with missing fields in the cleaned educational dataset to obtain a complete educational dataset.

[0028] Outlier detection is performed on each educational data record in the completed educational dataset to generate a preprocessed educational dataset.

[0029] Optionally, constructing the query execution plan includes:

[0030] Based on the set of target fields, time range expression, data type identifier, and filtering conditions in the structured query statement, a set of query operation vectors is generated.

[0031] Each element in the set of query operation vectors is parsed to construct a preliminary query execution graph, which consists of several query execution nodes and data dependency edges between nodes.

[0032] Assign a basic query cost to each execution node in the preliminary query execution graph;

[0033] The basic query costs of all query execution nodes are summed to obtain the query execution plan of the entire query execution graph in terms of time and resource consumption.

[0034] Optionally, the hybrid wolf pack optimization algorithm includes:

[0035] Using the preliminary query execution plan and its corresponding query execution graph as initial input, a set of candidate query execution strategies is constructed;

[0036] For each candidate strategy in the candidate query execution strategy set, perform topological feasible encoding, and represent each candidate strategy as a permutation vector describing the execution order of nodes. Use the permutation vectors of candidate strategies and the preorder dependencies to perform topological sorting of strategies, and generate a set of topologically feasible permutation vectors.

[0037] For each candidate query execution strategy, calculate the normalized query execution cost, normalized response time, and normalized data matching rate. Then, sum the normalized query execution cost, normalized response time, and normalized data matching rate according to their respective weights to obtain a single-objective scalar value.

[0038] A three-leadership system is adopted to select the leadership strategy. The candidate query execution strategy with the smallest objective function value is selected as the overall performance leadership strategy, the candidate query execution strategy with the smallest normalized response time is selected as the response speed leadership strategy, and the candidate query execution strategy with the largest normalized data matching rate is selected as the data accuracy leadership strategy. The permutation vector of the three-leadership system selection leadership strategy is weighted and summed according to the current weight of each indicator to obtain the metric alignment center.

[0039] Based on the metric alignment center and the set of topologically feasible permutation vectors, the permutation vector representation of each candidate policy is mapped to a double random matrix. The double random matrix is ​​updated using the gradient of the objective function, global perturbation and metric alignment direction. The updated result is then mapped to a new candidate policy permutation vector through matrix projection and topologically feasible projection operators.

[0040] For each new candidate strategy permutation vector, the finite difference increment of each node in terms of normalized query execution cost, normalized response time, and normalized data matching rate is calculated for each node of the candidate strategy by combining node-level metric decomposition. The node is then weighted according to the node-level weight consistent with the global weight coefficient as the marginal influence of the node.

[0041] The strategy with the smallest single-objective scalar value among all candidate strategies is used as the convergence benchmark. If its value changes less than the convergence threshold or reaches the maximum number of iterations within a specified iteration window, then this strategy is output as the optimal query execution strategy.

[0042] Optionally, sorting and grouping the query results based on key query parameters includes:

[0043] Based on the optimal query execution strategy and the preprocessed educational data set, and in accordance with the node execution order and dependency relationship defined in the optimal query execution strategy, data extraction, data filtering, time constraints and field mapping operations are performed on each query execution node in sequence. The data output of each step serves as the input of the next step, resulting in a final query result set that conforms to all query logic and dependency constraints.

[0044] For each data record in the final query result set, extract all the key query parameters specified in the structured query statement, and combine the values ​​of all the key query parameters for each data record to form a sort key set;

[0045] Based on the sorting key set of each data record, sort all data records in the final query result set. Multiply the values ​​of each data record on all query key parameters in turn by their respective weights and sum them to obtain the sorting score of the data record. Sort all data records in ascending or descending order according to the sorting score and output the sorted result set.

[0046] The sorted result set is grouped according to the grouping field set. The values ​​of each data record in all grouping fields are extracted and combined to form a grouping key vector. Data records with the same grouping key vector are grouped into the same group. All the grouped groups form the final grouping result set, and the data records in each group have the same grouping key vector.

[0047] Optionally, the step of converting the final query result set into a unified data format for real-time visualization and constructing an interactive data visualization model includes:

[0048] The data fields of each group result in the final query result set after sorting and grouping are mapped according to the preset structure rules. After the structure mapping, all group results are formed into a data set in a visual standard format.

[0049] For each grouping result in the standard format dataset, an interactive data visualization model is constructed sequentially.

[0050] Based on the field dimensions, number of data records, and field distribution characteristics of each grouping result, the fitness of all chart types in the candidate chart type set is evaluated. The optimal chart type identifier is selected as the visualization chart type of the grouping result based on the fitness evaluation results, so that the chart type best matches the data characteristics of the current grouping result.

[0051] The interactive data visualization model corresponding to each grouping result is rendered into a chart component in real time, and all chart components are sorted and displayed according to the sorting field set. All sorted interactive chart components are used as the final output of the front-end visualization display.

[0052] Optionally, a data query and real-time visualization system based on an educational large language model is provided for executing a data query and real-time visualization method based on an educational large language model, including:

[0053] The natural language input module is used to receive natural language query requests for educational data input by the user;

[0054] The semantic parsing module performs semantic analysis on natural language query requests, extracts query targets, time ranges, data types and filtering conditions, and outputs structured query elements;

[0055] The structured query generation module generates structured query statements based on structured query elements and converts them into standardized query syntax expressions.

[0056] The data retrieval module retrieves a preliminary set of educational data from the educational data repository based on standardized query syntax expressions;

[0057] The data preprocessing module performs format standardization, data cleaning, missing value completion, and outlier detection on the initial educational dataset to generate a preprocessed educational dataset.

[0058] The query execution plan generation and optimization module generates a preliminary query execution plan based on the structured query statement and the preprocessed educational data set. It then performs multi-objective dynamic trade-off optimization through a hybrid wolf pack optimization algorithm to output the optimal query execution strategy.

[0059] The query results processing module performs query processing on the preprocessed educational data set according to the optimal query execution strategy, and sorts and groups the results according to the key query parameters.

[0060] The visualization module converts the final query result set into a unified visual data format and automatically builds an interactive data visualization model.

[0061] The beneficial effects of this invention are:

[0062] This invention enhances user-friendliness and data retrieval flexibility through multi-level natural language parsing and structured mapping capabilities for educational data query scenarios. By employing an educational big language model to semantically decompose and structure user natural language query requests, it can automatically identify query targets, time ranges, data types, and filtering conditions, and efficiently and uniformly transform them into executable structured query expressions. This significantly lowers the barrier to entry for educational administrators and teachers, enabling non-professional users to easily perform complex searches on multi-source, multi-condition, and multi-dimensional educational data, effectively improving the practicality and intelligence level of the educational data platform.

[0063] This invention presents a hybrid wolf pack optimization algorithm for multi-objective trade-offs, which achieves intelligent optimization and dynamic adaptation of query execution plans. It introduces a hybrid wolf pack optimization mechanism guided by topological feasible coding, double random matrix mapping, a three-leadership system, and marginal influence degree in the query execution plan generation and optimization stages. This mechanism can adaptively trade off the three core indicators of query execution cost, data matching rate, and response time while ensuring the correctness of dependencies and data processing logic. It achieves dynamic adjustment of node-level influence degree and global exploration of the high-dimensional solution space, improving query efficiency and resource utilization under complex data retrieval, while simultaneously ensuring global optimization of result accuracy and response latency. Attached Figure Description

[0064] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0065] Figure 1 This is a flowchart of a data query and real-time visualization system and method based on an educational large language model proposed in this invention. Detailed Implementation

[0066] Example 1: Reference Figure 1 A data query and real-time visualization system and method based on an educational large language model, comprising:

[0067] It receives natural language query requests input by users, calls the education big language model to perform semantic parsing on the query requests, extracts query targets, time ranges, data types and filtering conditions, and converts natural language queries into preliminary structured query statements;

[0068] In this embodiment, the natural language query is converted into a preliminary structured query statement, including:

[0069] Receive natural language query requests from users;

[0070] Natural language query requests include the query objectives, time range, educational data types, and filtering conditions expressed by users in educational data analysis scenarios.

[0071] The educational big language model is invoked to perform semantic parsing on natural language query requests and extract a set of structured query elements;

[0072] The set of structured query elements includes query target, time range, educational data type, and filter conditions. The query target indicates the educational data analysis content that the user is interested in, the time range limits the data time period for the query, the educational data type specifies the data types involved in the query, and the filter conditions further limit the data filtering scope.

[0073] Based on the extracted set of structured query elements, the natural language query request is converted into a preliminary structured query statement through a natural language semantic mapping function;

[0074] The natural language semantic mapping function specifically involves inputting the query target, time range, educational data type, and filtering conditions from the natural language query request into the educational big language model. The educational big language model then performs semantic decomposition and reconstruction on the input query elements, automatically generating a structured expression that conforms to the data query logic, thereby obtaining a preliminary structured query statement.

[0075] The initial structured query statement is converted into a standardized query syntax expression. The standardized query syntax expression takes the structured query statement as input, maps the query target to specific educational data fields through mapping, and expresses the time range, educational data type and filtering conditions as data filtering conditions, thus forming a standardized query syntax that can be directly called in the educational data repository.

[0076] A preliminary query is performed on the education data repository based on the preliminary structured query statement to obtain a preliminary set of education data that meets the query conditions, and the query response time and data matching indicators are recorded.

[0077] In this embodiment, a preliminary query is performed on the education data repository based on a preliminary structured query statement, including:

[0078] The initial structured query statement is parsed into a standardized query syntax expression;

[0079] Standardized query syntax expressions are used to uniquely describe the educational data fields to be retrieved, the educational data types, data filtering conditions, and the query time range.

[0080] The standardized query syntax expression is submitted to the education data repository execution module, and a preliminary query operation is performed on the education data repository according to the standardized query syntax expression to obtain a preliminary education data set.

[0081] The initial education dataset consists of all education data records that meet the data filtering criteria and whose timestamps are within the query time range.

[0082] Record the query response time for the initial query operation;

[0083] Query response time represents the time interval between the start and end of a query, reflecting the system's response performance during the initial query process.

[0084] Calculate the data matching index of the preliminary education dataset. The data matching index is the ratio of the number of education data records in the preliminary query results to the total number of records in the initial dataset to be retrieved.

[0085] The data matching index ranges from zero to one. It measures the degree of matching between the initial query results and the query conditions. The higher the data matching index value, the higher the query accuracy.

[0086] The initial educational dataset is preprocessed to generate a preprocessed educational dataset.

[0087] In this embodiment, data preprocessing includes:

[0088] Each educational data record in the preliminary educational dataset is standardized to obtain a standardized educational dataset.

[0089] Format standardization adjusts the units, types, and structures of each data field in educational data records to a unified format. Each educational data record after format standardization is called a format-standardized educational data record, and the set of format-standardized educational data consists of all format-standardized educational data records.

[0090] Data cleaning is performed on each educational data record in the standardized educational data set to remove records containing illegal values, format errors, or logical inconsistencies, resulting in a cleaned educational data set.

[0091] The cleaned educational dataset consists of all standardized educational data records that have been validated and deemed valid.

[0092] Missing values ​​are filled in for educational data records with missing fields in the cleaned educational dataset to obtain a complete educational dataset.

[0093] Missing value completion is performed using the mean imputation method. When a field is missing, it is filled with the mean of the field in all non-missing samples. The completed education dataset consists of all education data records that have undergone missing value completion.

[0094] Outlier detection is performed on each educational data record in the completed educational dataset to generate a preprocessed educational dataset.

[0095] Outlier detection identifies and marks abnormal educational data records, and separates the detected abnormal educational data records from the completed educational data set. The preprocessed educational data set consists of all the completed educational data records that have been marked as normal.

[0096] A query execution plan is constructed based on the preliminary structured query statement and the educational data set;

[0097] In this embodiment, the query execution plan is constructed, including:

[0098] Based on the set of target fields, time range expression, data type identifier, and filtering conditions in the structured query statement, a set of query operation vectors is generated.

[0099] Based on the set of target fields, time range expression, data type identifier, and filtering conditions in the structured query statement, each target field is extracted sequentially. Each target field is then combined with its corresponding filtering conditions and time range to generate a query operation vector. All target fields are combined with their corresponding filtering conditions and time ranges in this way, and all the resulting query operation vectors form a query operation vector set.

[0100] Each element in the set of query operation vectors is parsed to construct a preliminary query execution graph, which consists of several query execution nodes and data dependency edges between nodes.

[0101] The query execution nodes include data reading nodes, filtering nodes, time limit nodes, and target field extraction nodes. Data dependency edges are used to identify the execution order and data flow path between the nodes.

[0102] Assign a basic query cost to each execution node in the preliminary query execution graph;

[0103] The basic query cost is used to measure the time and resources required for a node to execute a query. The basic query cost is calculated by multiplying the node's operation time and the corresponding data volume by the corresponding cost weighting factor and then adding them together. The operation time describes the time required for the node to execute, and the data volume describes the total amount of data in the node's input and output process. The time cost weighting factor and the data volume cost weighting factor measure the weight of the impact of operation time and data volume on the overall cost.

[0104] The basic query costs of all query execution nodes are summed to obtain the query execution plan of the entire query execution graph in terms of time and resource consumption.

[0105] A hybrid wolf pack optimization algorithm is applied to the query execution plan. By evaluating the query execution cost, data matching rate and response time, the query execution plan is iteratively optimized to generate the optimal query execution strategy.

[0106] In this embodiment, the hybrid wolf pack optimization algorithm includes:

[0107] Using the preliminary query execution plan and its corresponding query execution graph as initial input, a set of candidate query execution strategies is constructed;

[0108] The candidate query execution strategy set consists of multiple candidate query execution strategies, and the initial query execution cost, data matching rate and response time of the preliminary query execution plan are used as reference values.

[0109] For each candidate strategy in the candidate query execution strategy set, perform topological feasible encoding, and represent each candidate strategy as a permutation vector describing the execution order of nodes. Use the permutation vectors of candidate strategies and the preorder dependencies to perform topological sorting of strategies, and generate a set of topologically feasible permutation vectors.

[0110] The set of topologically feasible permutation vectors needs to ensure that each candidate strategy is executed without violating execution dependencies.

[0111] For each candidate query execution strategy, calculate the normalized query execution cost, normalized response time, and normalized data matching rate. Then, sum the normalized query execution cost, normalized response time, and normalized data matching rate according to their respective weights to obtain a single-objective scalar value.

[0112] The normalization of query execution cost is to divide the actual query execution cost of the candidate query execution strategy under the current data and computing power conditions into the reference value of the query execution cost of the initial query execution plan, and obtain the normalized query execution cost. The normalized query execution cost measures the resource consumption intensity of the strategy relative to the reference standard.

[0113] The response time normalization is achieved by dividing the actual query response time of the candidate query execution strategy by the reference response time of the initial query execution plan, resulting in a normalized response time. The normalized response time measures the response speed of the strategy relative to the reference standard.

[0114] The data matching rate is a dimensionless indicator, equal to the ratio of the number of educational data records in the actual query results under the candidate query execution strategy to the total number of records in the initial dataset to be retrieved. The normalized data matching rate directly adopts this ratio, and measures the accuracy of the strategy in meeting the user's query conditions.

[0115] The objective function value is used to measure the overall performance of the candidate query execution strategy.

[0116] A three-leadership system is adopted to select the leadership strategy. The candidate query execution strategy with the smallest objective function value is selected as the overall performance leadership strategy, the candidate query execution strategy with the smallest normalized response time is selected as the response speed leadership strategy, and the candidate query execution strategy with the largest normalized data matching rate is selected as the data accuracy leadership strategy. The permutation vector of the three-leadership system selection leadership strategy is weighted and summed according to the current weight of each indicator to obtain the metric alignment center.

[0117] Based on the metric alignment center and the set of topologically feasible permutation vectors, the permutation vector representation of each candidate policy is mapped to a double random matrix. The double random matrix is ​​updated using the gradient of the objective function, global perturbation and metric alignment direction. The updated result is then mapped to a new candidate policy permutation vector through matrix projection and topologically feasible projection operators.

[0118] In Example 1, based on the metric alignment center and the set of topologically feasible permutation vectors, the permutation vector of each candidate strategy is mapped to a double random matrix in sequence according to the following steps, and subsequent updates and resubmissions are completed:

[0119] The permutation vector of the candidate strategy is converted into the corresponding zero-one permutation matrix. The zero-one permutation matrix has exactly one element in each row and each column, and the rest are zero, which is used to uniquely identify the node order.

[0120] A regularization operation is introduced into the zero-one permutation matrix. The Sinkhorn normalization method is then used to iteratively normalize it row-by-row and column-by-column to obtain a double-random matrix. Based on this double-random matrix, each element in the double-random matrix is ​​numerically updated using a weighted combination of the objective function gradient direction, the metric alignment center, and the global perturbation vector. The objective function gradient direction guides the decreasing trend of query execution cost, data matching rate, and response time; the metric alignment center guides the global optimal direction; and the global perturbation increases the diversity of solution space exploration. The updated double-random matrix is ​​normalized again using the Sinkhorn normalization method to ensure that the update result still satisfies the double-random property. The normalized double-random matrix is ​​then mapped back to a unique permutation vector using the Hungarian algorithm, ensuring that each candidate strategy regains a unique and valid node execution order. A topologically feasible projection operator is used to guarantee that the new permutation vector satisfies all dependency constraints.

[0121] For each new candidate strategy permutation vector, the finite difference increment of each node in terms of normalized query execution cost, normalized response time, and normalized data matching rate is calculated for each node of the candidate strategy by combining node-level metric decomposition. The node is then weighted according to the node-level weight consistent with the global weight coefficient as the marginal influence of the node.

[0122] The strategy with the smallest single-objective scalar value among all candidate strategies is used as the convergence benchmark. If its value changes less than the convergence threshold or reaches the maximum number of iterations within a specified iteration window, then this strategy is output as the optimal query execution strategy.

[0123] The preprocessed educational data set is queried according to the optimal query execution strategy to obtain the final query result set, and the query results are sorted and grouped according to the key query parameters.

[0124] In this embodiment, the query results are sorted and grouped according to key query parameters, including:

[0125] Based on the optimal query execution strategy and the preprocessed educational data set, and in accordance with the node execution order and dependency relationship defined in the optimal query execution strategy, data extraction, data filtering, time constraints and field mapping operations are performed on each query execution node in sequence. The data output of each step serves as the input of the next step, resulting in a final query result set that conforms to all query logic and dependency constraints.

[0126] During the data processing flow, the data set is processed sequentially for each query execution node according to the node execution order. The output result of the previous node serves as the input result of the next node. After all query execution nodes have been processed, the final query result set is output.

[0127] For each data record in the final query result set, extract all the key query parameters specified in the structured query statement, and combine the values ​​of all the key query parameters for each data record to form a sort key set;

[0128] The sort key set is composed of the values ​​of the data record for each query key parameter in sequence.

[0129] Based on the sorting key set for each data record, all data records in the final query result set are sorted. The values ​​of each data record on all query key parameters are multiplied by their respective weights and summed to obtain the sorting score of the data record. All data records are then sorted in ascending or descending order according to the sorting score, and the sorted result set is output.

[0130] The sorting is based on the priority set according to the weight of the target field in the query.

[0131] The sorted result set is grouped according to the grouping field set. The values ​​of each data record in all grouping fields are extracted and combined to form a grouping key vector. Data records with the same grouping key vector are grouped into the same group. All the grouped groups form the final grouping result set, and the data records in each group have the same grouping key vector.

[0132] The final query result set is converted into a unified data format for real-time visualization, an interactive data visualization model is built, and appropriate chart types are selected to achieve intuitive data display.

[0133] In this embodiment, the final query result set is converted into a unified data format for real-time visualization and an interactive data visualization model is constructed, including:

[0134] The data fields of each group result in the final query result set after sorting and grouping are mapped according to the preset structure rules. After the structure mapping, all group results are formed into a data set in a visual standard format.

[0135] Structure mapping involves renaming and type standardizing all data fields in each grouping result. The structure mapping process ensures that all data field names and types are consistent.

[0136] For each grouping result in the standard format dataset, an interactive data visualization model is constructed sequentially.

[0137] The interactive data visualization model includes: a chart type identifier, used to specify the type of visualization chart for the current grouping results; field and coordinate binding relationship, used to set how each data field is bound to attributes such as coordinate axes or color channels in the chart; and a set of interactive action definitions, used to set all interactive actions and their triggering methods when users interact with the chart, including hover highlighting, click filtering, and drag zooming actions.

[0138] Based on the field dimensions, number of data records, and field distribution characteristics of each grouping result, the fitness of all chart types in the candidate chart type set is evaluated. The optimal chart type identifier is selected as the visualization chart type of the grouping result based on the fitness evaluation results, so that the chart type best matches the data characteristics of the current grouping result.

[0139] The interactive data visualization model corresponding to each grouping result is rendered into a chart component in real time, and all chart components are sorted and displayed according to the sorting field set. All sorted interactive chart components are used as the final output of the front-end visualization display.

[0140] The sorting is based on the weighted sum of the mean of the main sorting field and the sorting weight of the grouping results for each chart component. The mean of the main sorting field is the arithmetic mean of the values ​​of all data records in the main sorting field within the grouping results. The sorting score of the chart component is obtained by multiplying the mean of all main sorting fields by their corresponding weights and summing them. The chart components are then sorted in ascending or descending order according to their sorting scores and output.

[0141] In this embodiment, a data query and real-time visualization system based on an educational large language model is used to execute a data query and real-time visualization method based on an educational large language model, including:

[0142] The natural language input module is used to receive natural language query requests for educational data input by the user;

[0143] The semantic parsing module performs semantic analysis on natural language query requests, extracts query targets, time ranges, data types and filtering conditions, and outputs structured query elements;

[0144] The structured query generation module generates structured query statements based on structured query elements and converts them into standardized query syntax expressions.

[0145] The data retrieval module retrieves a preliminary set of educational data from the educational data repository based on standardized query syntax expressions;

[0146] The data preprocessing module performs format standardization, data cleaning, missing value completion, and outlier detection on the initial educational dataset to generate a preprocessed educational dataset.

[0147] The query execution plan generation and optimization module generates a preliminary query execution plan based on the structured query statement and the preprocessed educational data set. It then performs multi-objective dynamic trade-off optimization through a hybrid wolf pack optimization algorithm to output the optimal query execution strategy.

[0148] The query results processing module performs query processing on the preprocessed educational data set according to the optimal query execution strategy, and sorts and groups the results according to the key query parameters.

[0149] The visualization module converts the final query result set into a unified visual data format and automatically builds an interactive data visualization model.

[0150] Example 2: In an education data management department, in order to monitor and evaluate the distribution of junior high school students' academic performance and the effectiveness of teaching resource allocation within the region, the administrators conducted an actual data query and real-time visualization operation using the system of this invention. When implementing the system interface, the user directly entered a natural language query request: "Statistically analyze the distribution of math scores for all ninth-grade students this semester, analyze the correlation between teaching funding investment in each school and the improvement in math scores, group by gender and urban / rural area, and generate an interactive visualization report."

[0151] The system automatically parses the natural language request, accurately extracting the query targets as "distribution of math scores" and "correlation between teaching input and score improvement," with the time range being "this semester," and data types including "student score data" and "teaching input data." It also extracts the grouping fields as "gender" and "urban / rural." After semantic analysis using a large language model, the system automatically generates a structured query statement and converts it into directly executable database query syntax. The system then calls the data interface to retrieve score and input data; the entire retrieval process takes less than 2 seconds.

[0152] During data processing, the system detected missing data for some students (e.g., some students did not enter their gender information), and automatically filled the missing data by using the mode of the gender field from all entered data. The system also found two scores exceeding the maximum possible score (118 and 105 respectively) and one negative score, both of which were automatically marked as anomalies and removed. After data standardization and cleaning, the final total number of data records was 380,219.

[0153] The system automatically optimizes the query execution plan based on an adaptive hybrid wolf pack optimization algorithm. After evaluating multiple candidate execution strategies, the system ultimately selects the query execution order with the optimal node scheduling cost, shortest response time, and highest data grouping accuracy. The entire query process takes a total of 3.8 seconds, saving nearly 100 times the time compared to traditional manual query methods.

[0154] The query results are automatically grouped by gender and urban / rural location. For example, the system statistics show that:

[0155] The average math score of male students was 78.6, with a pass / fail rate of 28.3%.

[0156] The average math score of female students was 82.1, with a pass / fail rate of 33.4%.

[0157] The average score of students in the urban area was 85.7, with an excellent rate of 38.9%.

[0158] The average score of rural students was 75.4, with an excellent rate of 21.2%.

[0159] Schools with a teaching investment of 2,000 yuan per student per semester or more saw an average increase of 6.5 points in math scores, while schools with an investment of less than 1,200 yuan per student per semester only saw an increase of 2.1 points.

[0160] The correlation coefficient between teaching input and improvement in math scores reached 0.41.

[0161] Specific sample data extraction (partial):

[0162] Record A: Gender "Male", Urban / Rural Area, Math Score 92, Teaching Investment 2320 yuan; Record B: Gender "Female", Rural / Rural Area, Math Score 85, Teaching Investment 1280 yuan; Record C: Gender "Male", Rural / Rural Area, Math Score 70, Teaching Investment 1100 yuan; Record D: Gender "Female", Urban / Rural Area, Math Score 96, Teaching Investment 2600 yuan; Record E: Gender "Female", Rural / Rural Area, Math Score 78, Teaching Investment 1180 yuan.

[0163] The query results are displayed interactively in real time in the form of grouped bar charts, line charts, and correlation scatter plots. The system automatically selects the optimal chart type for gender and urban / rural groups. Users can freely switch groups, filter score ranges, and click to view data details for individual groups on the interface. Administrators can view the mean score distribution, pass / fail rate, and input data for any group simply by hovering the mouse and clicking, without the need for manual filtering or repeated queries.

[0164] Compared to traditional query methods, which use scripts to merge the grade and input tables one by one, then filter and manually group the data, processing 10,000 records takes about an hour, and processing all the data takes more than 36 hours. Furthermore, any changes to grouping fields or conditions require a complete rewrite, and dynamic switching of grouped views is not possible.

[0165] The method of this invention takes less than 5 seconds for the entire process with the same amount of data. All grouping and correlation calculations are completed automatically by the system without requiring users to write any SQL, scripts, or data visualization configurations. The system can achieve the data comparison shown in Table 1 below:

[0166] Table 1 Comparison of data between the method of the present invention and the traditional method.

[0167]

[0168] In practical applications, managers can also dynamically adjust query parameters. For example, switching the grouping condition from "gender" to "whether the student is a boarder" automatically refreshes the query and visualization in just 0.9 seconds, with all grouping results displayed in real time. Ultimately, the analysis of performance distribution, pass / fail rates, and return on investment during the entire decision-making process is completed on the system, greatly improving the efficiency, scientific rigor, and accuracy of data analysis and decision-making.

[0169] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. An educational large language model-based data query and real-time visualization method, characterized in that, The application relates to an education data query method based on a hybrid wolf swarm optimization algorithm. The application comprises the following steps: receiving a natural language query request input by a user, and calling an education large language model to perform semantic analysis on the query request, extract a query target, a time range, a data type and a filtering condition, and convert the natural language query into a preliminary structured query statement; performing a preliminary query on an education data repository according to the preliminary structured query statement, obtaining a preliminary education data set meeting the query condition, and recording a query response time and a data matching index; performing data preprocessing on the preliminary education data set to generate a preprocessed education data set; constructing a query execution plan based on the preliminary structured query statement and the education data set; applying a hybrid wolf swarm optimization algorithm to the query execution plan, iteratively optimizing the query execution plan through evaluation of query execution cost, data matching rate and response time index, and generating an optimal query execution strategy; querying the preprocessed education data set according to the optimal query execution strategy to obtain a final query result set, and sorting and grouping the query result according to a query key parameter; converting the final query result set into a unified data format for real-time visual display, constructing an interactive data visualization model, and selecting a suitable chart type to realize intuitive display of data. The hybrid wolf swarm optimization algorithm comprises the following steps: taking the preliminary query execution plan and the corresponding query execution graph as initial input to construct a candidate query execution strategy set; topologically feasible coding each candidate strategy in the candidate query execution strategy set, representing each candidate strategy as a permutation vector describing node execution order, topologically sorting the strategies by using the permutation vector of the candidate strategy and the precedence dependency relationship, and generating a set of topologically feasible permutation vectors; calculating the normalized query execution cost, the normalized response time and the normalized data matching rate for each candidate query execution strategy, and performing weighted summation on the normalized query execution cost, the normalized response time and the normalized data matching rate according to the weights to obtain a single-target scalar value; selecting a leadership strategy by adopting a three-leader system, selecting a candidate query execution strategy with the minimum target function value as the overall performance leadership strategy, a candidate query execution strategy with the minimum normalized response time as the response speed leadership strategy, and a candidate query execution strategy with the maximum normalized data matching rate as the data accuracy leadership strategy, and performing weighted summation on the permutation vectors of the three leadership strategies according to the current index weights to obtain a metric alignment center; based on the metric alignment center and the set of topologically feasible permutation vectors, mapping the permutation vector representation of each candidate strategy into a double random matrix, updating the double random matrix by using the target function gradient, the global disturbance and the metric alignment direction, and mapping the update result into a new candidate strategy permutation vector through matrix projection and a topologically feasible projection operator; for each new candidate strategy permutation vector, calculating the finite difference increment of each node of the candidate strategy on the normalized query execution cost, the normalized response time and the normalized data matching rate by combining node-level metric decomposition, and performing weighting according to the node-level weight consistent with the global weight coefficient to obtain the marginal influence degree of the node. The single-target scalarization value of all candidate strategies is monitored, and the strategy with the minimum value is taken as a convergence benchmark. If the value changes by less than a convergence threshold or the maximum number of iterations is reached within a specified iteration window, the strategy is output as the optimal query execution strategy.

2. The data query and real-time visualization method based on the educational large language model according to claim 1, characterized in that, The converting the natural language query into a preliminary structured query statement comprises: receiving a natural language query request input by a user; calling an educational large language model to perform semantic analysis on the natural language query request and extract a structured query element set; based on the extracted structured query element set, converting the natural language query request into a preliminary structured query statement through a natural language semantic mapping function; the natural language semantic mapping function specifically inputs the query target, time range, educational data type and filtering condition in the natural language query request into the educational large language model, performs semantic decomposition and reconstruction on the input query elements by the educational large language model, and automatically generates a structured expression conforming to the data query logic, thereby obtaining the preliminary structured query statement.

3. The data query and real-time visualization method based on the educational large language model according to claim 1, characterized in that, The preliminary query on the educational data repository according to the preliminary structured query statement comprises: parsing the preliminary structured query statement into a standardized query syntax expression; submitting the standardized query syntax expression to an educational data repository execution module to perform a preliminary query operation on the educational data repository according to the standardized query syntax expression, and obtaining a preliminary educational data set; recording the query response time of the preliminary query operation; calculating a data matching index of the preliminary educational data set, the data matching index being the ratio of the number of educational data records in the preliminary query result to the total number of records in the initial data set to be searched; the data matching index has a value range of zero to one, and measures the matching degree of the preliminary query result and the query condition. The higher the data matching index value, the higher the query accuracy.

4. The data query and real-time visualization method based on an educational large language model according to claim 1, characterized in that, The data preprocessing comprises: performing format standardization processing on each educational data record in the preliminary educational data set to obtain a format-standardized educational data set; performing data cleaning on each educational data record in the format-standardized educational data set to remove educational data records containing illegal values, format errors or logical inconsistencies, thereby obtaining a cleaned educational data set; performing missing value completion processing on educational data records with missing fields in the cleaned educational data set to obtain a completed educational data set; performing outlier detection on each educational data record in the completed educational data set to generate a preprocessed educational data set.

5. The data query and real-time visualization method based on an educational large language model according to claim 1, characterized in that, The constructing a query execution plan comprises: based on the query target field set, time range expression, data type identifier and filtering condition in the structured query statement, generating a query operation vector set; parsing each element in the query operation vector set to construct a preliminary query execution graph, the preliminary query execution graph comprising a plurality of query execution nodes and data dependency edges between the nodes; assigning a basic query cost to each execution node in the preliminary query execution graph; summing the basic query costs of all query execution nodes to obtain a query execution plan of the entire query execution graph in terms of time and resource consumption.

6. The data query and real-time visualization method based on an educational large language model according to claim 1, characterized in that, The sorting and grouping of the query results according to the query key parameters comprise: According to the optimal query execution strategy and the preprocessed education data set, data extraction, data filtering, time limitation and field mapping operations are sequentially performed on each query execution node in the order defined by the optimal query execution strategy and the dependency relationship, and the data output of each step is used as the input of the next step, so that a final query result set meeting all query logics and dependency constraints is obtained; For each data record in the final query result set, all query key parameters specified in the structured query statement are extracted, and the value combination of each data record on all query key parameters forms a sorting key set; Based on the sorting key set of each data record, all data records in the final query result set are sorted, the value of each data record on all query key parameters is multiplied by the respective weight in turn and summed to obtain the sorting score of the data record, and all data records are arranged in ascending or descending order according to the sorting score, and the sorted result set is output; The sorted result set is grouped according to the grouping field set, the value of each data record on all grouping fields is extracted, and a grouping key vector is formed by combination, data records with the same grouping key vector are classified into the same group, and all groups after grouping form a final grouping result set, and the data records in each group have the same grouping key vector.

7. The data query and real-time visualization method based on an educational large language model according to claim 1, characterized in that, The final query result set is converted into a unified data format for real-time visual display, and an interactive data visualization model is constructed, comprising: All data fields in each grouping result in the final query result set after sorting and grouping are sequentially structure-mapped according to the preset structure rule, and all grouping results after structure mapping form a visualization standard format data set; For each grouping result in the visualization standard format data set, an interactive data visualization model is sequentially constructed; According to the field dimension, data record quantity and field distribution characteristics of each grouping result, the adaptability of all chart types in the candidate chart type set is evaluated, and the optimal chart type identifier is selected as the visualization chart type of the grouping result according to the adaptability evaluation result, so that the chart type is best matched with the data characteristics of the current grouping result; Each grouping result corresponds to an interactive data visualization model, which is rendered into a chart component in real time, and all chart components are sorted and displayed according to the sorting field set, and all sorted interactive chart components are used as the final output of the front-end visualization display.

8. An education-based large language model data query and real-time visualization system, characterized in that, The method for performing the education large language model-based data query and real-time visualization method of any one of claims 1-7 comprises: A natural language input module for receiving a user input education data natural language query request; A semantic analysis module for performing semantic analysis on the natural language query request, extracting query targets, time ranges, data types and filtering conditions, and outputting structured query elements; A structured query generation module for generating a structured query statement according to the structured query elements and converting it into a standardized query syntax expression; a data retrieval module configured to retrieve a preliminary education data set from the education data repository according to a standardized query syntax expression; a data preprocessing module configured to perform format standardization, data cleaning, missing value completion and outlier detection processing on the preliminary education data set to generate a preprocessed education data set; a query execution plan generation and optimization module configured to generate a preliminary query execution plan according to the structured query statement and the preprocessed education data set, and perform multi-objective dynamic trade-off optimization on the preliminary query execution plan through a hybrid wolf swarm optimization algorithm to output an optimal query execution strategy; a query result processing module configured to perform query processing on the preprocessed education data set according to the optimal query execution strategy, and perform result sorting and grouping according to query key parameters; a visual display module configured to convert the final query result set into a unified visual data format and automatically construct an interactive data visualization model.

Citation Information

Patent Citations

  • Text-to-SQL (Structured Query Language) conversion method and device based on automatic process supervision

    CN118820286A

  • Intelligent agriculture map interaction method and device based on large language model

    CN120123465A