An english composition logical consistency detection system based on deep learning
By managing the global memory stack and constructing the concept state control flow graph, the problem of effectively delineating local logical boundaries in existing technologies is solved, enabling accurate detection and diagnosis of logical consistency in English essays.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUHAN CITY VOCATIONAL COLLEGE
- Filing Date
- 2026-03-18
- Publication Date
- 2026-06-19
AI Technical Summary
Existing text logic consistency detection technologies cannot effectively delineate local logical boundaries when processing complex English essays. This leads to the mixing of local state data in nested clauses or hypothetical contexts with global context data. Consequently, when processing long and complex sentences, it is easy to produce cross-contextual misjudgments of conceptual states, making it impossible to accurately verify text logic consistency.
The deep learning-based English essay logical consistency detection system utilizes a global memory stack management mechanism to delineate local logical boundaries, constructs a concept state control flow graph, and performs cross-scope verification and secondary semantic parsing through a graph constraint violation feedback module to identify elliptical syntactic structures and implicit pronoun reference relationships, generating logical consistency detection results.
It achieves accurate identification and isolation of the internal logical boundaries of English essay texts, avoids misjudgment of cross-contextual conceptual states, can accurately verify the logical consistency of texts, and provides structured diagnostic reports.
Smart Images

Figure CN122242485A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of natural language processing and computer-aided education technology, specifically to a deep learning-based system for detecting the logical consistency of English essays. Background Technology
[0002] In intelligent education and computer-assisted language learning, automated essay grading systems have been widely used. Beyond basic spelling correction and grammar assessment, logical consistency testing has become a core indicator for evaluating essay quality. Logical consistency testing aims to analyze whether there are semantic contradictions, missing premises, or gaps in data dependencies between sentences and paragraphs in an essay, in order to assess the overall rigor of the argument.
[0003] Existing text logical consistency detection techniques typically rely on deep learning language models. The conventional approach involves converting the entire English essay into a sequence of word vectors and inputting it into a neural network. A self-attention mechanism is then used to extract global semantic features, and explicit discourse connectors are tracked to determine sentence coherence. This general approach primarily relies on static vector similarity calculations and undifferentiated feature aggregation across the entire text, evaluating the text's logical development trajectory by comparing the distribution of semantic features between the preceding and following text.
[0004] Existing detection methods have significant limitations when handling complex English essays. Because conventional models treat the entire text as a flat and continuous semantic space, they cannot effectively identify and delineate local logical boundaries arising from rhetorical structures such as hypothetical statements or conditional clauses. When nested clauses or specific hypothetical contexts appear in the text, existing technologies lack a physical isolation mechanism for logical scope. This leads to the direct mixing of conceptual state data that changes within local logical branches with data from the global context. Consequently, when processing long and complex sentences, this easily results in cross-contextual misjudgments of conceptual states, making it impossible to accurately determine the true logical coherence of the text. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a deep learning-based system for detecting the logical consistency of English essays. This system solves the problem that natural language processing models, when detecting complex English essays, cannot effectively delineate local logical boundaries because they treat the entire text as a continuous semantic space. This leads to the mixing of local state data in nested clauses or hypothetical contexts with global context data, which in turn easily causes cross-contextual misjudgments of conceptual states when processing long and complex sentences, making it impossible to accurately verify the logical consistency of the text.
[0006] To achieve the above objectives, this invention provides the following technical solution: a deep learning-based English essay logical consistency detection system, deployed in a computing device containing a processor and memory. The system allocates a global memory stack in the memory, configured to record the state lifecycle and logical scope during text sequence processing.
[0007] The system includes a text discourse parsing module, a dynamic concept state extraction module, a data flow static constraint solving module, and a graph constraint violation feedback module.
[0008] The text parsing module receives a sequence of English essay texts and identifies rhetorical structure markers within the text sequence.
[0009] Based on the start and end markers of the rhetorical structure, the text parsing module performs push or pop operations on local state stack frames in the global memory stack to establish a scope memory management mechanism based on stack structure and delineate the local logical boundaries within the English essay text sequence.
[0010] The dynamic concept state extraction module extracts the core concept entities from the text sentence by sentence in the order of sentence arrangement, as well as the state change operations for the core concept entities.
[0011] An operation type consists of defining the operation type and using the operation type.
[0012] The dynamic concept state extraction module encapsulates the core concept entity, operation type, and state feature vector composed of predicate structure and modifiers into triplet data.
[0013] The triplet data is appended with a sequence timestamp and written into the memory space of the currently active local state stack frame or the base scope frame in the global memory stack, generating an operation log with time series characteristics and scope constraints.
[0014] The data flow static constraint solving module constructs a conceptual state control flow graph based on the operation log and logical boundaries.
[0015] The basic nodes and composite stack frame nodes of the control flow graph are topologically connected by directed edges generated in ascending order of sequence timestamps.
[0016] The data flow static constraint solving module executes the arrival value analysis algorithm on the conceptual state control flow graph, initializes the arrival value input set and arrival value output set for the nodes in the graph node set, and iteratively calculates the arrival value input set and arrival value output set for each node according to the topological sorting order of the conceptual state control flow graph.
[0017] Based on this, the module retrieves and uses defined operation items that match the operation type data items to establish dependency link mapping and performs cross-scope verification.
[0018] Cross-scope verification includes performing scope overreach verification, performing data dependency verification, and performing state conflict verification by extracting state feature vectors and calculating cosine similarity.
[0019] When the validation fails, a graph constraint violation exception is triggered.
[0020] The graph constraint violation feedback module intercepts anomalies and extracts abnormal graph nodes, missing data dependencies, and conflicting state feature vectors.
[0021] The module generates type feature representations from the anomaly type identifiers and generates state feature representations from the core concept entities and conflicting state feature vectors.
[0022] Type feature representation and state feature representation are concatenated to form a fused feature vector, which is then projected through a linear transformation layer to generate a fixed-dimensional cue vector.
[0023] The coordinate information of the prompt vector and the abnormal context interval is output to the dynamic concept state extraction module, instructing it to perform secondary semantic parsing.
[0024] During the secondary semantic parsing process, the dynamic concept state extraction module maps the abnormal context interval text sequence into a query matrix, a key matrix, and a value matrix.
[0025] The cue vector and feature alignment transformation matrix are fused together, and the attention redistribution weight matrix is calculated.
[0026] The attention weight matrix is multiplied by the value matrix to generate a secondary semantic feature representation.
[0027] Based on the secondary semantic feature representation, the omitted syntactic structure and implicit pronoun reference relationship are identified in the text sequence of abnormal context intervals. The missing core concept entities and state change operations are extracted and combined into a supplementary triple dataset and written into the global memory stack.
[0028] The system combines an iteration counter. When the current value of the iteration counter reaches the preset iteration number threshold, the closed-loop iteration process is terminated, the real logical conflict is confirmed, and a graphical rendering operation is performed in the visualized topology of the concept state control flow graph to generate a traceability path graph and output the logical consistency detection result.
[0029] This invention provides a deep learning-based system for detecting logical consistency in English essays. It offers the following advantages:
[0030] 1. This invention identifies rhetorical structure markers within English essay text sequences and performs push or pop operations on corresponding local state stack frames in the global memory stack. It establishes a stack-based scope memory management mechanism to delineate local logical boundaries within the text. In memory space, it isolates local logical branches restricted by rhetorical structures from the global conceptual states recorded by the basic scope frames, avoiding cross-contextual misjudgments of conceptual states when processing long and complex sentences. It also achieves accurate preservation and restoration of logical branch preconditions and data flow analysis based on logical boundary constraints.
[0031] 2. This invention generates operation logs with sequence timestamps by extracting core concept entities and their state change operations. Based on the operation logs and logical boundaries, a concept state control flow graph is constructed. The graph is then used to iteratively calculate the set of inputs and outputs that reach fixed values to execute a data flow analysis algorithm. Combined with the defined dependency link mapping, scope overreach verification, data dependency verification, and state conflict verification are performed synchronously. This realizes the transformation of logical consistency testing in the semantic dimension of natural language into an automated logical verification process based on solving data dependency links in the control flow graph nodes, thereby assisting in the output of a structured diagnostic report.
[0032] 3. This invention generates a prompt vector by extracting abnormal node information when a violation of the trigger graph constraint occurs. The prompt vector is then fused with a feature alignment transformation matrix to calculate a redistribution attention weight matrix. The redistribution attention weight matrix is then multiplied with a value matrix to generate a secondary semantic feature representation. This is used to perform secondary semantic parsing on the abnormal context. By increasing the computational weight of the network layer on the features associated with the prompt vector, this invention achieves the effect of identifying omitted syntactic structures and implicit pronoun reference relationships in the abnormal context and extracting missing concept entities to update the memory stack state. Attached Figure Description
[0033] Figure 1 This is a system architecture diagram of the present invention;
[0034] Figure 2 This is a flowchart of the system method of the present invention. Detailed Implementation
[0035] The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0036] Please see the appendix Figure 1This invention provides a deep learning-based English essay logical consistency detection system, comprising: a text discourse parsing module 10, a dynamic concept state extraction module 20, a data flow static constraint solving module 30, and a graph constraint violation feedback module 40.
[0037] The deep learning-based English essay logical consistency detection system is deployed in a computing device containing a processor and memory. The memory stores computer program instructions. The processor executes the computer program instructions to implement the functions of the text discourse parsing module 10, the dynamic concept state extraction module 20, the data flow static constraint solving module 30, and the graph constraint violation feedback module 40.
[0038] The deep learning-based English essay logical consistency detection system allocates a global memory stack 50 in memory. The global memory stack 50 is configured to record the state lifecycle and logical scope during the text sequence processing.
[0039] The text parsing module 10 is configured to receive English essay text sequences and identify rhetorical structure markers within the English essay text sequences. Based on the rhetorical structure markers, the text parsing module 10 establishes a stack-based scope memory management mechanism in the global memory stack 50 to determine the logical boundaries within the English essay text sequences.
[0040] The dynamic concept state extraction module 20 is configured to extract conceptual entities and state change operations for these entities from a sequence of English essay texts. The dynamic concept state extraction module 20 generates an operation log with time-series characteristics and scope constraints.
[0041] The data flow static constraint solving module 30 is configured to construct a conceptual state control flow graph based on the operation log and logical boundaries. The data flow static constraint solving module 30 performs data flow analysis algorithms and cross-scope verification on the conceptual state control flow graph to check logical consistency.
[0042] The graph constraint violation feedback module 40 is configured to acquire abnormal node information when the data flow static constraint solving module 30 triggers an exception. The graph constraint violation feedback module 40 generates a corresponding hint vector. The graph constraint violation feedback module 40 feeds the hint vector back to the dynamic concept state extraction module 20 for secondary semantic parsing.
[0043] like Figure 2 As shown, in conjunction with the aforementioned system architecture, this embodiment of the invention provides a system execution flow, the specific steps of which are as follows.
[0044] In step S100, the text discourse parsing module 10 receives the input English essay text sequence. The text discourse parsing module 10 inputs the English essay text sequence into a pre-trained discourse parsing network and identifies the rhetorical structure markers contained in the English essay text sequence. Based on the start and end characters of the rhetorical structure markers, the text discourse parsing module 10 performs push or pop operations on local state stack frames in the global memory stack 50, delineating local logical boundaries in the global memory stack 50.
[0045] In step S200, the dynamic concept state extraction module 20 processes the text content sentence by sentence according to the sentence order of the English essay text sequence. The dynamic concept state extraction module 20 extracts the concept entities in the sentences and the state change operations for these concept entities. The state change operations include defining the initial state of the entity and recording the usage operations that depend on the entity's state. The dynamic concept state extraction module 20 combines and encapsulates the extracted core concept entities, operation types, and state feature vectors into triplet data. The dynamic concept state extraction module 20 writes the triplet data into the currently active top frame memory space of the global memory stack 50.
[0046] In step S300, the data flow static constraint solving module 30 constructs a concept state control flow graph based on the sentence order of the English essay text sequence and the hierarchical relationship of the local state stack frames recorded in the global memory stack 50. The data flow static constraint solving module 30 executes a reach-constant analysis algorithm on the concept state control flow graph to calculate the set of all valid defined operations that can be received by the graph nodes in the concept state control flow graph. The data flow static constraint solving module 30 traverses backwards along the connecting edges of the concept state control flow graph to find defined operations that match the used operations. The data flow static constraint solving module 30 compares the scope of the graph node containing the used operation with the scope of the graph node containing the found defined operation, and performs logical solution verification.
[0047] In step S400, when the data flow static constraint solving module 30 detects during the logic solving verification stage that a definition operation using an operation to read a popped stack frame, a definition operation that does not match, or a definition operation that matches a mutually exclusive state value, the deep learning-based English essay logic consistency detection system generates a graph constraint violation anomaly. The graph constraint violation feedback module 40 intercepts the graph constraint violation anomaly and extracts the abnormal graph node that triggered the graph constraint violation anomaly and the missing data dependency. The graph constraint violation feedback module 40 encodes the abnormal graph node and the missing data dependency into a hint vector.
[0048] In step S500, the graph constraint violation feedback module 40 inputs the prompt vector to the dynamic concept state extraction module 20. The dynamic concept state extraction module 20 fuses the prompt vector with the original attention matrix and recalculates the attention weights of the text intervals corresponding to the abnormal graph nodes. The dynamic concept state extraction module 20 performs secondary semantic parsing on the text intervals.
[0049] In step S600, if the dynamic concept state extraction module 20 extracts new triplet data, the data flow static constraint solving module 30 reconstructs the concept state control flow graph and returns to step S300. If the number of iterations of the secondary semantic parsing reaches a preset threshold and the data flow static constraint solving module 30 continues to generate graph constraint violation anomalies, the deep learning-based English essay logical consistency detection system confirms the existence of logical conflicts and outputs a logical consistency diagnostic report containing error category fields and a source path graph.
[0050] The text parsing module 10 receives the input sequence of English essay text. The English essay text sequence consists of multiple sentences arranged in sequence. The text parsing module 10 defines the English essay text sequence as a sequence. ,in Represents a sequence The first in One sentence. This represents the total number of sentences contained in the English essay text sequence.
[0051] The text parsing module 10 performs word segmentation on the English essay text sequence. The text parsing module 10 then inputs the segmented English essay text sequence into a pre-configured text parsing network. The text parsing network consists of a feature encoder and a relation classifier connected in series.
[0052] The feature encoder of the discourse parsing network maps the segmented English essay text sequence into a hidden state vector matrix. The relation classifier of the discourse parsing network receives the hidden state vector matrix. The relation classifier projects the hidden state vector matrix into a predefined rhetorical relation feature space through a fully connected layer, and after processing by a normalization function, calculates the probability distribution score of the English essay text sequence on the predefined rhetorical relation categories.
[0053] The text analysis module 10 identifies rhetorical structure markers within English essay text sequences based on probability distribution scores. These markers indicate the text type that triggers changes in logical scope within the English essay text sequence. Text types include hypothetical statement texts, conditional clause texts, and texts quoting opinions.
[0054] The text discourse parsing module 10 determines the span range of discourse type in the English essay text sequence based on the identified rhetorical structure markers. According to the syntactic dependency tree output by the discourse parsing network, the text discourse parsing module 10 identifies the complete syntactic level content governed by the rhetorical structure markers as the span range. The span range is defined by the start node and the end node of the range.
[0055] The text parsing module 10 inserts a scope start symbol at the beginning node of the corresponding span interval in the English essay text sequence. The text parsing module 10 also inserts a scope end symbol at the end node of the corresponding span interval.
[0056] Scope start and scope end symbols are distributed in pairs to define the physical boundaries of local logical branches. The text parsing module 10 generates a parsed text sequence embedded with the scope start and scope end symbols. The text parsing module 10 outputs the parsed text sequence to the dynamic concept state extraction module 20 of the deep learning-based English essay logical consistency detection system.
[0057] The text parsing module 10 initializes a global memory stack 50 in memory. The global memory stack 50 is configured to dynamically manage the logical scope hierarchy of the parsed text sequence during the parsing process. The text parsing module 10 sets up a base scope frame at the bottom of the global memory stack 50. The base scope frame is used to store global conceptual state data in the parsed text sequence that is not restricted by specific rhetorical structures.
[0058] The text parsing module 10 sequentially scans and parses the text sequence along the sentence arrangement direction. When the text parsing module 10 scans to the scope start symbol in the parsed text sequence, the text parsing module 10 triggers a stack frame push operation.
[0059] The text parsing module 10 allocates an independent logical address range at the top of the global memory stack 50 to generate local state stack frames. The text parsing module 10 marks the generated local state stack frames as active states. The active state local state stack frames are used to receive and encapsulate the extracted concept entities and state change operations within the corresponding span range.
[0060] If the text parsing module 10 scans a new scope start symbol again within the scope span of the active local state stack frame, the text parsing module 10 triggers a nested stack frame push operation. The text parsing module 10 pushes a secondary local state stack frame on top of the currently active local state stack frame. The logical address range of the secondary local state stack frame is isolated from the lower-level stack frame, forming a nested logical space.
[0061] The text parsing module 10 continues to scan and parse the text sequence. When the text parsing module 10 scans and encounters a scope terminator in the parsed text sequence, the text parsing module 10 triggers a stack frame popping operation.
[0062] The text parsing module 10 pops the currently active local state stack frame from the global memory stack 50. By changing the state flag, the text parsing module 10 changes the state of the triplet data recorded inside the popped local state stack frame to a dormant state. The dynamic concept state extraction module 20 and the data flow static constraint solving module 30 stop reading and writing triplet data in the dormant state by default.
[0063] After a local state stack frame is popped, the text parsing module 10 re-marks the local state stack frame or the basic scope frame located at the top of the global memory stack 50 times as active. Through stack frame push and pop operations, the text parsing module 10 saves and restores the preconditions for logical branches in the parsed text sequence, establishing the boundary constraints for data flow analysis.
[0064] The dynamic concept state extraction module 20 receives the parsed text sequence from the text discourse parsing module 10. The dynamic concept state extraction module 20 performs named entity recognition and noun phrase extraction on individual sentences in the parsed text sequence.
[0065] The dynamic concept state extraction module 20 defines the extracted entity objects and noun phrases as core concept entities. These core concept entities serve as the state tracking benchmarks during the data flow static constraint solving process.
[0066] The dynamic concept state extraction module 20, by combining the dependency syntax tree of the parsed text sequence, analyzes the syntactic components and semantic roles of core concept entities in the sentence. The dynamic concept state extraction module 20 inputs the core concept entities and their contextual features into the deep learning classifier network layer. The deep learning classifier network layer calculates the probability score of the core concept entities within a predefined state change operation space. Based on the probability score, the dynamic concept state extraction module 20 assigns corresponding operation types to each core concept entity. The state change operation space consists of defining operation types and using operation types.
[0067] The definition operation type represents the action of assigning attribute values or initializing state of a sentence to a core concept entity. When the sentence content involves the explanation of the connotation of a core concept entity, the premise assumptions, or the first statement of a new viewpoint, the dynamic concept state extraction module 20 determines the operation type of the core concept entity as a definition operation type. The definition operation type is used to generate the state data of the core concept entity within the current logical scope.
[0068] The operation type is used to represent the logical deduction or conclusion summary action performed by the sentence based on the preceding state of the core concept entity. When the sentence content involves causal relationship deduction, argument summary, or extended reference to previously mentioned concepts, the dynamic concept state extraction module 20 determines the operation type of the core concept entity as the use operation type. The use operation type does not generate new state data, but triggers the reading operation of the historical state data of the core concept entity.
[0069] The dynamic concept state extraction module 20 extracts the predicate structure and modifying elements in the sentence that have a dependency relationship with the core concept entity. The dynamic concept state extraction module 20 concatenates and encodes the predicate structure and modifying elements into a state feature vector. The dynamic concept state extraction module 20 then determines the state feature vector as the state value of the core concept entity.
[0070] The dynamic concept state extraction module 20 combines the identified core concept entities, the determined operation types, and the extracted state values. The dynamic concept state extraction module 20 generates structured triplet data. This structured triplet data is used to represent the state change records of the parsed text sequence within a specific logical scope boundary.
[0071] The dynamic concept state extraction module 20 obtains the core concept entity, operation type, and state feature vector of a single sentence in the parsed text sequence. The dynamic concept state extraction module 20 then combines and encapsulates the core concept entity, operation type, and state feature vector into triplet data.
[0072] The dynamic concept state extraction module 20 determines the absolute position index of a single sentence in the parsed text sequence and defines the absolute position index as a variable. The dynamic concept state extraction module 20 will extract the first... The set of triplet data generated within each sentence ( ) is defined as:
[0073]
[0074] in, Indicates the first One core conceptual entity, Indicates the operation type. Represents the state feature vector. For the first The total number of triplet data extracted from each sentence.
[0075] The dynamic concept state extraction module 20 adds sequence timestamps to the triplet dataset. Each sequence timestamp corresponds to an absolute position index. The dynamic concept state extraction module 20 associates and stores the sequence timestamps as additional attribute variables with the triplet data set. The sequence timestamps are used to establish the execution order of state change operations in the data flow analysis.
[0076] The dynamic concept state extraction module 20 reads the state flag bits of the global memory stack 50 in the memory. Based on the state flag bits, the dynamic concept state extraction module 20 locates the memory address of the currently active local state stack frame or basic scope frame in the global memory stack 50.
[0077] The dynamic concept state extraction module 20 writes the set of triplet data carrying sequence timestamps into the memory space of the local state stack frame or the basic scope frame that is in the active state, according to the located memory address.
[0078] Through the aforementioned write operations, the dynamic concept state extraction module 20 combines the temporal sequence characteristics of the parsed text sequence with the logical space characteristics of the global memory stack 50. The triplet data set is converted into an operation log under the encapsulation of a local state stack frame or a basic scope frame. The dynamic concept state extraction module 20 outputs the operation log to the data flow static constraint solving module 30.
[0079] The data flow static constraint solving module 30 receives the operation log output by the dynamic concept state extraction module 20. The operation log records the triple data sets with sequence timestamps and the logical scope boundary relationships corresponding to each triple data set.
[0080] The data flow static constraint solving module 30 initializes an empty directed acyclic graph in memory. The data flow static constraint solving module 30 defines the directed acyclic graph as a concept-state control flow graph. The data flow static constraint solving module 30 defines the data structure of the concept-state control flow graph as follows:
[0081]
[0082] in, Represents the set of graph nodes. This represents the set of directed edges.
[0083] The data flow static constraint solving module 30 reads the set of triplet data belonging to the basic scope frame from the operation log. The data flow static constraint solving module 30 then maps the set of triplet data with the same sequence timestamp to a set of graph nodes. A basic node is a record within a set of triplet data.
[0084] The data flow static constraint solving module 30 generates directed edges between adjacent basic nodes based on the numerical values of their corresponding sequence timestamps, in ascending order. The module then writes these generated directed edges into a directed edge set. In the middle, directed edges indicate the direction of linear logical control flow between basic nodes.
[0085] The data flow static constraint solving module 30 reads the set of triplet data belonging to the local state stack frame from the operation log. The data flow static constraint solving module 30 then... (The sentence is incomplete and requires more context to translate accurately.) A composite stack frame node is generated. The composite stack frame node is configured to encapsulate the logical branch corresponding to the local state stack frame.
[0086] The data flow static constraint solving module 30 maps the set of triplet data with the same sequence timestamp within the local state stack frame to an internal child node within the composite stack frame node. Based on the sequence timestamp values corresponding to the internal child nodes, the data flow static constraint solving module 30 generates directed edges between the internal child nodes in ascending order of values, thus establishing an internal data flow path.
[0087] The data flow static constraint solving module 30 obtains the trigger position of the scope start symbol corresponding to the local state stack frame in the operation log. The data flow static constraint solving module 30 defines the internal child node with the smallest sequence timestamp within the composite stack frame node as the entry endpoint. The data flow static constraint solving module 30 generates directed edges between the adjacent base node and the entry endpoint before the trigger position.
[0088] The data flow static constraint solving module 30 obtains the trigger position of the scope terminator corresponding to the local state stack frame in the operation log. The data flow static constraint solving module 30 defines the internal child node with the largest sequence timestamp within the composite stack frame node as the exit endpoint. The data flow static constraint solving module 30 generates directed edges between the exit endpoint and the adjacent base nodes after the trigger position.
[0089] The data flow static constraint solving module 30 uses a set of directed edges. Complete the topological connections between the basic nodes and the composite stack frame nodes. The data flow static constraint solving module 30 generates a conceptual state control flow graph with a hierarchical nested structure, providing a graph theory data foundation for executing the reach-constant analysis algorithm.
[0090] The data flow static constraint solving module traverses the set of graph nodes in the concept state control flow graph. The data flow static constraint solving module 30 reads the graph node set. any node An internally recorded set of triplet data.
[0091] The data flow static constraint solving module 30 extracts data items whose operation type belongs to the defined operation type from the triplet data set, and extracts data items whose operation type belongs to the used operation type.
[0092] The data flow static constraint solving module 30 will solve the nodes. The set containing data items that define the operation type is determined as the generated set. The data flow static constraint solving module 30 extracts and generates a set. The core concept entity corresponding to the data item. The data flow static constraint solving module 30 searches for definition operation items for the same core concept entity in other nodes of the concept state control flow graph. The data flow static constraint solving module 30 combines the found definition operation items into nodes. Covering set .
[0093] The data flow static constraint solving module 30 is a graph node set. The nodes in the input set are initialized to a fixed value. and reaching a fixed value output set The data flow static constraint solving module 30 sets the set of arrival values for all nodes. The initial value is an empty set.
[0094] The data flow static constraint solving module 30 iteratively calculates the arrival set of the constant value for each node according to the topological sorting order of the concept state control flow graph. and reaching a fixed value output set The data flow static constraint solving module 30 calculates the input set to reach a constant value. The formula is:
[0095]
[0096] in, Represents a node The set of predecessor nodes in the conceptual state control flow graph This represents any predecessor node in the set of predecessor nodes. Represents the predecessor node The set of outputs that reaches a fixed value.
[0097] Data flow static constraint solving module 30 is based on the set of inputs reaching a constant value. Calculate the output set when the value reaches a fixed value. The calculation formula is:
[0098]
[0099] in, This represents the union operation. This represents the difference operation.
[0100] The data flow static constraint solving module 30 continuously executes the iterative calculation process. When all nodes in the concept state control flow graph reach a constant value, the output set is... When all values cease to change, the data flow static constraint solving module 30 terminates the iterative calculation. The data flow static constraint solving module 30 then returns the set of values reached at the time of termination of the iterative calculation. and reaching a fixed value output set This was determined as the final data flow analysis result.
[0101] Data flow static constraint solving module 30 targets nodes The data items of the usage operation type are extracted internally, and the core concept entities corresponding to the usage operation type data items are obtained. The data flow static constraint solving module 30 is at the node. The corresponding set of inputs to reach the constant value In the process, the system retrieves definition operation items that share the same core concept entity. The data flow static constraint solving module 30 establishes a dependency link mapping between data items of operation type and definition operation items based on the retrieval results. The data flow static constraint solving module 30 then outputs this dependency link mapping to its cross-scope verification process.
[0102] The data flow static constraint solving module 30 obtains the dependency link mapping between the data items of the operation type and the defined operation items. The data flow static constraint solving module 30 obtains the stack frame status flag bits corresponding to the defined operation items in the global memory stack 50 in the dependency link mapping.
[0103] The data flow static constraint solving module 30 performs scope privilege escalation verification. It compares the memory address of the stack frame containing the used operation type data item with the memory address of the stack frame containing the defined operation item. If the data flow static constraint solving module 30 detects that the used operation type data item is located in an active memory space, and the corresponding defined operation item is located in a dormant local state stack frame, the data flow static constraint solving module 30 determines that the dependency link mapping is invalid and triggers a scope privilege escalation exception.
[0104] The data flow static constraint solving module 30 performs data dependency verification. It checks nodes in the concept state control flow graph that contain data items using operation types. If the data flow static constraint solving module 30 does not find a matching defined operation item for the core concept entity in the node's arrival set, it triggers a data dependency missing anomaly.
[0105] The dataflow static constraint solving module 30 performs state conflict verification. When multiple matching defined operation items exist in the arrival set of a node, the dataflow static constraint solving module 30 extracts the state feature vectors contained in the multiple defined operation items. The dataflow static constraint solving module 30 calculates the cosine similarity between the state feature vectors. If the dataflow static constraint solving module 30 determines that the cosine similarity is lower than a preset mutual exclusion conflict threshold, the dataflow static constraint solving module 30 determines that there is a logical contradiction and triggers a state conflict exception.
[0106] The data flow static constraint solving module 30 defines the triggered scope exceedance anomalies, data dependency missing anomalies, and state conflict anomalies as graph constraint violation anomalies. The data flow static constraint solving module 30 outputs the graph constraint violation anomalies to the graph constraint violation feedback module 40.
[0107] The graph constraint violation feedback module 40 receives graph constraint violation anomalies. The graph constraint violation feedback module 40 extracts the graph nodes that triggered the graph constraint violation anomalies and marks them as abnormal graph nodes.
[0108] The graph constraint violation feedback module 40 extracts missing data dependencies and conflicting state feature vectors from anomalous graph nodes. It then integrates these elements to construct an anomalous record dataset. Finally, the module inputs this dataset into the dynamic concept state extraction module 20 for secondary semantic parsing.
[0109] The graph constraint violation feedback module 40 receives the abnormal record dataset output by the data flow static constraint solving module 30. The graph constraint violation feedback module 40 parses the abnormal record dataset, extracting abnormal graph nodes and type identifiers for graph constraint violation anomalies. The type identifiers for graph constraint violation anomalies include scope exceeding authority anomaly identifiers, missing data dependency anomaly identifiers, and state conflict anomaly identifiers.
[0110] The graph constraint violation feedback module 40 locates the target text sentence corresponding to the abnormal graph node in the parsed text sequence based on the sequence timestamp carried by the abnormal graph node. The module 40 extracts the target text sentence, as well as its adjacent preceding and following text sentences. The module 40 then combines the extracted text content to form an abnormal context range.
[0111] The graph constraint violation feedback module 40 obtains missing data dependencies and conflicting state feature vectors from the anomaly record dataset. The module then extracts the core concept entities corresponding to the missing data dependencies. Finally, it invokes a pre-configured prompt encoding network. This network includes a type embedding layer and a state embedding layer.
[0112] The graph constraint violation feedback module 40 inputs the type identifier of the graph constraint violation anomaly into the type embedding layer of the prompt encoding network to generate a type feature representation. The graph constraint violation feedback module 40 also inputs the core concept entities and the conflicting state feature vectors into the state embedding layer of the prompt encoding network to generate a state feature representation.
[0113] The graph constraint violation feedback module 40 concatenates the type feature representation and the state feature representation to form a fused feature vector. The graph constraint violation feedback module 40 then performs dimensionality reduction projection on the fused feature vector through a linear transformation layer of the cue encoding network to generate a fixed-dimensional cue vector.
[0114] The cue vector is a feature tensor containing the anomaly type and conflict data. The graph constraint violation feedback module 40 outputs the cue vector and the coordinate information of the anomaly context interval to the dynamic concept state extraction module 20, instructing the dynamic concept state extraction module 20 to perform secondary semantic parsing on the anomaly context interval.
[0115] The dynamic concept state extraction module 20 receives the prompt vector and coordinate information of the abnormal context interval output by the graph constraint violation feedback module 40. Based on the coordinate information of the abnormal context interval, the dynamic concept state extraction module 20 extracts the corresponding abnormal context interval text sequence.
[0116] The dynamic concept state extraction module 20 inputs the abnormal context interval text sequence into the deep learning classifier network layer. The dynamic concept state extraction module 20 maps the abnormal context interval text sequence into a query matrix, a key matrix, and a value matrix. The dynamic concept state extraction module 20 obtains a preset scaling factor. The dynamic concept state extraction module 20 defines the value matrix as... This is to distinguish the symbolic representation of the prompt vector in mathematical formulas.
[0117] The dynamic concept state extraction module 20 fuses the cue vector and the feature alignment transformation matrix to calculate the attention redistribution weight matrix. The formula for calculating the attention redistribution weight matrix by the dynamic concept state extraction module 20 is as follows:
[0118]
[0119] in, This represents the attention weights redistribution matrix. Represents the normalized exponential function, Represents the query matrix. The transpose of the key matrix. Indicates the scaling factor. Represents the cue vector, This represents the feature alignment transformation matrix. The feature alignment transformation matrix is used to project and align the dimensions of the hint vector to the dimension space of the product of the query matrix and the key matrix, in order to satisfy the tensor addition operation rules.
[0120] The dynamic concept state extraction module 20 will reallocate the attention weight matrix. AND-value matrix Multiplication generates a secondary semantic feature representation. The attention weight matrix is then redistributed to increase the computational weights of the deep learning classifier network layers on the features associated with the cue vector.
[0121] The dynamic concept state extraction module 20 identifies elliptical syntactic structures and implicit pronoun reference relationships in abnormal context interval text sequences based on secondary semantic feature representation.
[0122] The dynamic concept state extraction module 20 extracts core concept entities and state change operations that are missing from the text sequence of abnormal context intervals. The dynamic concept state extraction module 20 assigns operation types and state feature vectors to the extracted core concept entities and state change operations.
[0123] The dynamic concept state extraction module 20 combines the core concept entity, operation type, and state feature vector into a supplementary triplet data set. The dynamic concept state extraction module 20 writes the supplementary triplet data set into the global memory stack 50, completing the local state update of the text sequence in the abnormal context interval.
[0124] The deep learning-based English essay logical consistency detection system configures an iteration counter in memory. The system sets a preset threshold for the number of iterations for this counter. The initial value of the iteration counter is configured to zero.
[0125] The dynamic concept state extraction module 20 completes secondary semantic parsing of the text sequence of the abnormal context interval. The dynamic concept state extraction module 20 compares the supplementary triplet data set generated by the secondary semantic parsing with the existing triplet data set in the global memory stack 50. The dynamic concept state extraction module 20 then determines whether new logical state change records have been extracted.
[0126] If the dynamic concept state extraction module 20 determines that a new logical state change record has been extracted, it writes the supplementary triplet data set into the global memory stack 50. The dynamic concept state extraction module 20 sends a graph reconstruction instruction to the data flow static constraint solving module 30. The deep learning-based English essay logical consistency detection system increments the value of the iteration counter by one.
[0127] The data flow static constraint solving module 30 receives the graph reconstruction instruction. It reads the updated triplet data set from the global memory stack 50. The module then reconstructs the concept state control flow graph and executes the data flow analysis algorithm and cross-scope verification again on the updated graph.
[0128] If the data flow static constraint solving module 30 does not detect any graph constraint violation anomalies on the updated concept state control flow graph, the deep learning-based English essay logical consistency detection system determines that the logical constraints have been repaired. The deep learning-based English essay logical consistency detection system resets the iteration counter to zero and continues to perform logical consistency checks on the remaining part of the English essay text sequence.
[0129] If the data flow static constraint solving module 30 continues to trigger graph constraint violation anomalies during subsequent cross-scope verification, the graph constraint violation feedback module 40 reads the current value of the iteration counter. The graph constraint violation feedback module 40 compares the current value of the iteration counter with a preset iteration count threshold.
[0130] When the current value of the iteration counter reaches the preset iteration count threshold, the graph constraint violation feedback module 40 terminates the closed-loop iteration process. The graph constraint violation feedback module 40 determines that the currently triggered graph constraint violation exception is a real logical conflict.
[0131] If the dynamic concept state extraction module 20 determines that no new logical state change record has been extracted, it sends a stop command to the graph constraint violation feedback module 40. The graph constraint violation feedback module 40 determines that the currently triggered graph constraint violation exception is a real logical conflict.
[0132] After confirming a genuine logical conflict, the deep learning-based English essay logical consistency detection system stops the abnormal feedback data flow between the dynamic concept state extraction module 20 and the data flow static constraint solving module 30. The system records the abnormal node information corresponding to the genuine logical conflict and then generates a logical consistency diagnostic report.
[0133] This deep learning-based English essay logical consistency detection system obtains information on anomalous nodes confirmed by the graph constraint violation feedback module 40. The system also identifies the graph constraint violation anomaly types corresponding to these anomalous node information.
[0134] The deep learning-based English essay logical consistency detection system initializes a structured diagnostic report data table in memory. This structured diagnostic report data table pre-definedly includes fields for error category, error start node, and conflict node.
[0135] A deep learning-based English essay logical consistency detection system performs error category mapping based on graph constraints for violation and anomaly types.
[0136] If the graph constraint violation anomaly type is a data dependency missing anomaly, the deep learning-based English essay logical consistency detection system will assign the error category field in the structured diagnostic report data table to the premise missing error.
[0137] If the graph constraint violation anomaly type is a state conflict anomaly, the deep learning-based English essay logical consistency detection system will assign the error category field in the structured diagnostic report data table to the logical contradiction error.
[0138] If the graph constraint violation anomaly type is scope overriding anomaly, the deep learning-based English essay logical consistency detection system will assign the error category field in the structured diagnostic report data table to the logical scope overriding error.
[0139] This deep learning-based English essay logical consistency detection system parses abnormal node information and extracts the core conceptual entities that trigger graph constraint violations. The system then identifies the graph nodes corresponding to the abnormal node information as the final conflict graph nodes.
[0140] A deep learning-based English essay logical consistency detection system identifies graph constraint violation anomalies. If the graph constraint violation anomaly is a missing data dependency anomaly, the system configures the error start node field in the structured diagnostic report data table to a null value.
[0141] If the graph constraint violation anomaly type is a state conflict anomaly or a scope overreach anomaly, the deep learning-based English essay logical consistency detection system traces the source definition graph nodes corresponding to the core concept entities along the dependency link mapping in the concept state control flow graph. The system then extracts the original text sentences corresponding to the source definition graph nodes and writes them into the error start node field of the structured diagnostic report data table.
[0142] This deep learning-based English essay logical consistency detection system extracts the original text sentences corresponding to the final conflict graph nodes. The system then writes these original text sentences into the conflict node field of a structured diagnostic report data table.
[0143] A deep learning-based English essay logical consistency detection system completes the field filling operation of a structured diagnostic report data table. Based on the filled structured diagnostic report data table, the system generates a logical consistency diagnostic report and executes the output instructions for the logical consistency diagnostic report.
[0144] The deep learning-based English essay logical consistency detection system acquires the conceptual state control flow graph constructed by the static constraint solving module 30. The system then reads the error category and conflict node fields from the structured diagnostic report data table, corresponding to the final conflict graph nodes.
[0145] The deep learning-based English essay logical consistency detection system determines the value of the error category field. If the error category field is a logical contradiction error or a logical scope violation error, the deep learning-based English essay logical consistency detection system starts from the final conflict graph node and performs a reverse graph traversal operation in the concept state control flow graph.
[0146] The deep learning-based English essay logical consistency detection system performs a reverse retrieval along the dependency link mapping. The system continues searching until it locates the source definition graph node corresponding to the error start node field in the structured diagnostic report data table.
[0147] This deep learning-based English essay logical consistency detection system extracts control flow nodes located between source definition graph nodes and final conflict graph nodes in the concept-state control flow graph, and extracts the directed edges connecting these control flow nodes. The system then combines the extracted control flow nodes and associated directed edges to construct abnormal data flow paths.
[0148] If the error category field indicates a missing premise error, the deep learning-based English essay logical consistency detection system extracts the final conflict graph node and the local state stack frame containing the final conflict graph node. The deep learning-based English essay logical consistency detection system defines the final conflict graph node and the local state stack frame as independent anomalous primitives.
[0149] This deep learning-based English essay logical consistency detection system reads a pre-defined graphics rendering map. Based on the error category field, it matches the corresponding node highlight parameters and connection marker parameters in the graphics rendering map. Finally, it binds the node highlight parameters and connection marker parameters to the abnormal data flow path and the independent abnormal primitive, respectively.
[0150] This deep learning-based English essay logical consistency detection system performs graphical rendering operations within the visualized topology of a concept state control flow graph, based on bound node highlight parameters and connection label parameters. The system generates a source path graph.
[0151] The deep learning-based English essay logical consistency detection system embeds a source path graph into a structured diagnostic report data table. The system outputs logical consistency detection results that include both the structured diagnostic report data table and the source path graph.
[0152] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. A deep learning-based system for detecting logical consistency in English essays, characterized in that, Deployed in a computing device including a processor and memory, the system allocates a global memory stack in the memory, the global memory stack being configured to record the state lifecycle and logical scope during text sequence processing; the system includes: The text parsing module is configured to receive English essay text sequences, identify rhetorical structure markers within the English essay text sequences, and establish a stack-based scope memory management mechanism in the global memory stack based on the rhetorical structure markers to determine the logical boundaries within the English essay text sequences. The dynamic concept state extraction module is configured to extract concept entities and state change operations on concept entities from English essay text sequences, and generate operation logs with time series features and scope constraints. The data flow static constraint solving module is configured to construct a conceptual state control flow graph based on operation logs and logical boundaries, and execute data flow analysis algorithms and cross-scope verification on the conceptual state control flow graph to perform logical consistency checks. The graph constraint violation feedback module is configured to obtain abnormal node information when the data flow static constraint solving module triggers an exception, generate a corresponding prompt vector, and feed the prompt vector back to the dynamic concept state extraction module for secondary semantic parsing.
2. The deep learning-based English essay logical consistency detection system according to claim 1, characterized in that, The text parsing module is also configured as follows: Insert a scope start symbol at the start node of the corresponding span interval in the English essay text sequence, and insert a scope end symbol at the end node of the corresponding span interval. When the scope start symbol in the parsed text sequence is scanned, a stack frame push operation is triggered, an independent logical address range is allocated at the top of the global memory stack, a local state stack frame is generated, and the local state stack frame is marked as active. When the scope terminator in the parsed text sequence is encountered, a stack frame pop operation is triggered. The local state stack frame that is currently at the top of the global memory stack and is in an active state is popped. By changing the state flag, the triplet data state recorded inside the popped local state stack frame is changed to a dormant state.
3. The deep learning-based English essay logical consistency detection system according to claim 1, characterized in that, The dynamic concept state extraction module is also configured to: Named entity recognition and noun phrase extraction are performed on individual sentences in the parsed text sequence, and the extracted entity objects and noun phrases are defined as core concept entities; By combining the dependency syntax tree of the parsed text sequence, the syntactic components and semantic roles of core concept entities in the sentence are analyzed. The probability scores of core concept entities in the preset state change operation space are calculated through the deep learning classifier network layer. Based on the probability scores, operation types are assigned to each core concept entity. The operation type consists of defining the operation type and using the operation type. Extract the predicate structure and modifiers in the sentence that have a dependency relationship with the core concept entity, and concatenate and encode the predicate structure and modifiers into a state feature vector to determine the state value of the core concept entity; The identified core concept entities, the determined operation types, and the extracted state values are combined to generate structured triple data, and a sequence timestamp is added to the triple data set.
4. The deep learning-based English essay logical consistency detection system according to claim 3, characterized in that, The configuration for the dynamic concept state extraction module to generate operation logs with time-series features and scope constraints is as follows: Read the status flag bit of the global memory stack in the memory, and locate the memory address of the local state stack frame or the base scope frame that is currently active in the global memory stack based on the status flag bit. Based on the located memory address, the triplet data set carrying the sequence timestamp is written into the memory space of the active local state stack frame or the basic scope frame, converted into an operation log, and output to the data flow static constraint solving module.
5. The deep learning-based English essay logical consistency detection system according to claim 1, characterized in that, The configuration for constructing the conceptual state control flow graph by the data flow static constraint solving module is as follows: Read the set of triplet data belonging to the basic scope frame in the operation log, map the set of triplet data with the same sequence timestamp to a basic node in the graph node set, and generate directed edges between basic nodes with adjacent sequence timestamps in ascending order according to the sequence timestamp values of each basic node. Read the set of triplet data belonging to the local state stack frame from the operation log, and generate a composite stack frame node in the graph node set to encapsulate the logical branch corresponding to the local state stack frame. The topological connections between basic nodes and composite stack frame nodes are completed using a set of directed edges, generating a conceptual state control flow graph with a hierarchical nested structure.
6. The deep learning-based English essay logical consistency detection system according to claim 5, characterized in that, The configuration for the data flow static constraint solving module to execute the data flow analysis algorithm is as follows: Initialize the arrival value input set and arrival value output set for each node in the graph node set. Iteratively calculate the arrival value input set and arrival value output set for each node according to the topological sorting order of the concept state control flow graph. For data items of usage operation type extracted from within a node, obtain the core concept entity corresponding to the data item of usage operation type. In the set of arrival values corresponding to the node, retrieve the definition operation items that are the same as the core concept entity, establish the dependency link mapping between the data item using the operation type and the definition operation item, and output it to the cross-scope verification process.
7. The deep learning-based English essay logical consistency detection system according to claim 6, characterized in that, The configuration for the data flow static constraint solving module to perform cross-scope verification for logical consistency checking is as follows: Execute scope privilege escalation verification. If it is detected that the data item of the operation type is located in the active memory space and the corresponding defined operation item is located in the dormant local state stack frame, a scope privilege escalation exception is triggered. Perform data dependency verification. If no matching definition operation item for the core concept entity is found in the arrival value input set of the node, a data dependency missing exception is triggered. When performing state conflict verification, if there are multiple matching defined operation items in the arrival value input set of a node, extract the state feature vectors contained in the multiple defined operation items and calculate the cosine similarity. If the cosine similarity is lower than the preset mutual exclusion conflict threshold, a state conflict anomaly is triggered. The triggered scope overreach exceptions, data dependency missing exceptions, and state conflict exceptions are uniformly defined as graph constraint violation exceptions and output to the graph constraint violation feedback module.
8. The deep learning-based English essay logical consistency detection system according to claim 7, characterized in that, The configuration for the graph constraint violation feedback module to generate the corresponding prompt vector is as follows: Extract the graph nodes that trigger graph constraint violations and mark them as anomalous graph nodes. Extract the missing data dependencies and conflicting state feature vectors within the anomalous graph nodes. Input the type identifier of the graph constraint violation anomaly into the type embedding layer of the prompt encoding network to generate a type feature representation; The core concept entities and the conflicting state feature vectors are input into the state embedding layer of the cue encoding network to generate state feature representations. The concatenated type feature representation and state feature representation are combined to form a fused feature vector. The fused feature vector is then dimensionality-reduced by projecting it through the linear transformation layer of the cue encoding network to generate a cue vector of fixed dimension.
9. A deep learning-based English essay logical consistency detection system according to claim 8, characterized in that, The configuration for the dynamic concept state extraction module to perform secondary semantic parsing is as follows: Map the abnormal context interval text sequence into a query matrix, a key matrix, and a value matrix; The cue vector and feature alignment transformation matrix are fused together, and the attention redistribution weight matrix is calculated. The attention weight matrix is multiplied by the value matrix to generate a secondary semantic feature representation. Based on the secondary semantic feature representation, the elliptical syntactic structure and implicit pronoun reference relationship are identified in the text sequence of abnormal context intervals. Extract the core concept entities and state change operations that are missing in the text sequence of the abnormal context interval, combine them into a supplementary triplet dataset and write it into the global memory stack.
10. A deep learning-based English essay logical consistency detection system according to claim 9, characterized in that, The system is also configured to: Configure an iteration counter in the memory. When the current value of the iteration counter reaches the preset iteration number threshold, terminate the closed-loop iteration process and determine that the currently triggered graph constraint violation exception is a real logical conflict. In the concept state control flow graph, the source definition graph node corresponding to the core concept entity is traced along the dependency link mapping, and the original text sentence corresponding to the source definition graph node is extracted and written into the error start node field of the structured diagnostic report data table; The final conflict graph nodes and the local state stack frames containing the final conflict graph nodes are extracted and defined as independent anomaly graph elements. Based on the bound node highlight parameters and connection mark parameters, a graphical rendering operation is performed in the visualization topology of the concept state control flow graph to generate a source path graph. The output includes the logical consistency test results of the structured diagnostic report data table and the traceability path diagram.