Data analysis method and device, electronic equipment, medium and course tree data analysis system

CN122927262APending Publication Date: 2026-10-16BEIJING XUEDIRUANJIAN DEVELOPMENT CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611139694.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-29
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0004]然而,上述方案存在一定技术缺陷

Benefits of technology

[0011]本申请提供的技术方案的技术好处:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122927262A_ABST
    Figure CN122927262A_ABST
Patent Text Reader

Abstract

The application provides a data analysis method and device, electronic equipment, computer readable storage medium and learning machine course tree data analysis system. The method comprises the following steps: obtaining to-be-analyzed tree data, analysis type identifier and analysis access instruction in response to an analysis request; determining a hierarchical field rule; generating a standard node sequence and a multi-directional mutual reference index record; determining a target node position and a target relationship direction; reading node content and completing an associated node path; generating a path verification mark and an analysis result. This scheme can reduce the influence of different tree structure analysis differences on node access efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer software technology, and more specifically, to a data parsing method, a data parsing device, an electronic device, a computer-readable storage medium, and a learning machine course tree data parsing system. Background Technology

[0002] In software applications such as online education, knowledge management, and content management, systems typically need to process large amounts of hierarchical tree-structured data. For example, different course types in online education products often have different hierarchical structures, with multiple parent-child relationships existing between nodes such as courses, lessons, knowledge points, and content units. As the types and scale of course content increase, front-end display, learning path navigation, course node location, and node path navigation all place higher demands on tree-structured data parsing capabilities.

[0003] Existing tree data parsing solutions typically configure separate parsing logic for different types of tree data and use recursive traversal to find the target node layer by layer during node access. This solution generally first identifies the hierarchical structure of the current tree data, and then enters the child nodes layer by layer from the root node until the target node is found or the entire tree is traversed. For different course types, it is usually necessary to maintain corresponding parsing code separately. For path navigation or adjacent node access, it is also necessary to temporarily backtrack or search for relevant nodes again during the traversal.

[0004] However, the above solution has certain technical drawbacks. Since target node lookup relies on recursive traversal, query time is easily affected by tree depth, node position, and number of nodes, resulting in significant fluctuations in response time under high-concurrency access scenarios. Furthermore, maintaining separate parsing logic for different course types can easily lead to redundant development and omissions in subsequent maintenance. In addition, the existing solution lacks sufficient support for upward paths, downward child nodes, and sequential adjacent nodes, making it difficult to simultaneously adapt to various node access requirements such as random lookup, path navigation, and sequential access within the same parsing structure. Summary of the Invention

[0005] This application provides a data parsing method, a data parsing device, an electronic device, a computer-readable storage medium, and a learning machine course tree data parsing system to at least alleviate the aforementioned technical problems.

[0006] A data parsing method, comprising: In response to a request to parse tree data, obtain the tree data to be parsed, the parsing type identifier, and the parsing access instructions; Determine the hierarchical field rules that match the parsing type identifier; According to the hierarchical field rules, the node fields and node relationship fields in the tree data to be parsed are identified layer by layer to generate a standard node sequence; A multi-directional mutual reference index record is generated based on the standard node sequence. The multi-directional mutual reference index record associates node content, node position, and node hierarchy with the unique identifier of the same node. Based on the parsing access instruction, determine the target node position and target relationship direction from the multi-directional mutual reference index record; Read the node content according to the target node position, and complete the path of the associated node according to the target relationship direction; Generate a path verification flag based on the associated node path and the multi-directional mutual reference index record; Generate a parsing result, which includes the source node identifier and the path verification flag.

[0007] This application also provides a data parsing apparatus, including: The request retrieval unit is configured to retrieve the tree data to be parsed, the parsing type identifier, and the parsing access instruction in response to a parsing request for tree data; The rule determination unit is configured to determine the hierarchical field rules that match the parsing type identifier; The sequence generation unit is configured to identify the node fields and node relationship fields in the tree data to be parsed layer by layer according to the hierarchical field rules, and generate a standard node sequence. The index generation unit is configured to generate multi-directional cross-reference index records based on the standard node sequence, wherein the multi-directional cross-reference index records associate node content, node position, and node hierarchy with the unique identifier of the same node. The access positioning unit is configured to determine the target node location and target relationship direction from the multi-directional mutual reference index record according to the parsed access instruction; The content path processing unit is configured to read node content according to the target node position and complete the associated node path according to the target relationship direction; The verification mark generation unit is configured to generate a path verification mark based on the associated node path and the multi-directional cross-reference index record; The result generation unit is configured to generate a parsing result, which includes the source node identifier and the path verification flag.

[0008] This application also provides an electronic device, including a processor and a memory, wherein the memory stores a computer program, and the computer program, when executed by the processor, implements the data parsing method described above.

[0009] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the data parsing method described above.

[0010] This application also provides a learning machine course tree data parsing system, including a learning machine terminal, a course tree data storage server, and a data parsing server; The learning machine terminal is configured to generate a parsing request for tree-shaped data in response to a course node access operation. The parsing request carries a parsing type identifier and a parsing access instruction, and receives the parsing result. The course tree data storage server is configured to store tree data to be parsed corresponding to the parsing type identifier, and to provide the tree data to be parsed to the data parsing server; The data parsing server is configured to acquire the tree data to be parsed, the parsing type identifier, and the parsing access instruction; determine the hierarchical field rules matching the parsing type identifier; identify the node fields and node relationship fields in the tree data to be parsed layer by layer according to the hierarchical field rules, and generate a standard node sequence; generate a multi-directional mutual reference index record based on the standard node sequence; determine the target node position and target relationship direction from the multi-directional mutual reference index record according to the parsing access instruction; read the node content according to the target node position and complete the associated node path according to the target relationship direction; generate a path verification mark according to the associated node path and the multi-directional mutual reference index record; generate a parsing result containing the source node identifier and the path verification mark, and send the parsing result to the learning machine terminal. The learning machine terminal is also configured to display course node content, course node path, or the next course node entry based on the parsing results.

[0011] The technical advantages of the technical solution provided in this application are: This application's data parsing method addresses the technical shortcomings of existing recursive traversal schemes, which suffer from significant response time fluctuations due to tree depth, node position, and number of nodes during node lookup. Upon receiving a parsing request for tree data, the method acquires the tree data to be parsed, the parsing type identifier, and the parsing access instructions. It first determines the hierarchical field rules matching the parsing type identifier, and then identifies node fields and node relationship fields layer by layer according to these rules, generating a standard node sequence. This transforms tree data with different structures into a uniformly processable node sequence. Compared to traditional schemes that directly perform recursive searches within the original tree structure, this approach first organizes the node content, node position, and node hierarchy relationships in the tree structure into standardized intermediate results, providing a more stable data foundation for subsequent index access and thus reducing the impact of tree depth and node position on the node access process.

[0012] This application further generates multi-directional cross-reference index records based on standard node sequences, and associates node content, node position, and node hierarchy with the unique identifier of the same node in these records. This solves the problem of fragmented node content access and node relationship access in existing solutions. Traditional recursive methods typically require repeated searches through the tree structure when retrieving node content, parent node path, child node list, or adjacent nodes. However, this application pre-establishes associations between node position, node content, and node hierarchy through multi-directional cross-reference index records, enabling parsing access commands to directly determine the target node position and target relationship direction from these records. Therefore, the node access process no longer relies on hierarchical recursion starting from the root node each time, resulting in shorter processing paths for node location and relationship direction determination, and significantly improved access efficiency and response stability.

[0013] To address the shortcomings of existing solutions in supporting upward paths, downward child nodes, and sequential adjacent nodes, this application determines the target node's location and target relationship direction based on the parsing access instructions. Then, it reads the node content according to the target node's location and completes the associated node paths according to the target relationship direction. In other words, the parsing process not only reads the target node's content but also completes the path relationships related to the target node based on the access direction. Compared to traditional methods that only support single downward traversal, this application can adapt node content reading and associated path completion within the same set of index records, better supporting various access requirements such as random lookup, upward path tracing, downward child node access, and sequential access, reducing the complexity of developing separate parsing logic for different access functions.

[0014] Furthermore, this application generates path verification markers based on associated node paths and multi-directional cross-reference index records, and generates parsing results containing source node identifiers and path verification markers. This solves the problems of traditional parsing results, such as difficulty in reverse locating source nodes and difficulty in determining whether path relationships are consistent with the index structure. By including source node identifiers and path verification markers as part of the parsing results, the parsing results not only provide node content but also express the source of the node content and the verification status of associated paths. Compared to traditional parsing methods that only return node data, the parsing results of this application have better traceability and path consistency expression capabilities, facilitating subsequent processing in scenarios such as learning machine course content display, course path navigation, and generation of the next course node entry. Attached Figure Description

[0015] Figure 1 This is a flowchart illustrating a data parsing method according to an embodiment of this application.

[0016] Figure 2 This is a schematic diagram of the structure of a data parsing device according to an embodiment of this application.

[0017] Figure 3 This is a schematic diagram of the structure of an electronic device according to an embodiment of this application.

[0018] Figure 4 This is a schematic diagram of the structure of a computer-readable storage medium according to an embodiment of this application.

[0019] Figure 5 This is a schematic diagram of the structure of a learning machine course tree data parsing system according to an embodiment of this application. Detailed Implementation

[0020] like Figure 1 The image shows a data parsing method according to an embodiment of this application, comprising: In response to a request to parse tree data, obtain the tree data to be parsed, the parsing type identifier, and the parsing access instructions; Determine the hierarchical field rules that match the parsing type identifier; According to the hierarchical field rules, the node fields and node relationship fields in the tree data to be parsed are identified layer by layer to generate a standard node sequence; A multi-directional mutual reference index record is generated based on the standard node sequence. The multi-directional mutual reference index record associates node content, node position, and node hierarchy with the unique identifier of the same node. Based on the parsing access instruction, determine the target node position and target relationship direction from the multi-directional mutual reference index record; Read the node content according to the target node position, and complete the path of the associated node according to the target relationship direction; Generate a path verification flag based on the associated node path and the multi-directional mutual reference index record; Generate a parsing result, which includes the source node identifier and the path verification flag.

[0021] Specifically, in this application, the parsing request for tree-structured data can be triggered by a course node access operation. This parsing request indicates the need to parse data with parent-child hierarchical relationships, such as course directories, knowledge point directories, and content unit directories. The tree-structured data to be parsed can be tree-structured data stored in a course tree-structured data storage terminal. This data contains multiple node fragments, each corresponding to a course level node. The parsing type identifier distinguishes the hierarchical organization methods corresponding to different course types. For example, course types such as synchronous courses, thematic courses, English courses, composition courses, or experimental courses differ in hierarchical depth, field names, and parent-child relationship expression methods. Therefore, the parsing type identifier is not a label for display but a data processing identifier used to select subsequent hierarchical field rules. The parsing access instruction expresses the access intent of this parsing request. This instruction at least expresses the target node identifier and access direction marker, such as reading the content of the current course node, reading the direct child nodes of the current course node, reading the parent node path of the current course node, or reading the adjacent standard node entries after the current course node. By obtaining the tree data to be parsed, the parsing type identifier, and the parsing access instruction in the same parsing request, the subsequent parsing process can simultaneously have the data source, rule source, and access target, avoiding the instability of the parsing path caused by temporarily inferring the hierarchical relationship after only obtaining the tree data.

[0022] Specifically, in this application, the hierarchical field rules are rule data used to describe the reading methods of different hierarchical fields in the tree data to be parsed. The hierarchical field rules can be pre-configured in a registered field adaptation table, which records candidate hierarchical chains, node unique identifier fields, parent node pointing fields, and child node entry fields according to the parsing type identifier. The candidate hierarchical chain represents the field reading path from the root level to the end level; the node unique identifier field represents the field that can locate a node in the corresponding level; the parent node pointing field represents the field that the current node points to the parent node; and the child node entry field represents the field where the child node fragment of the current node is located. The determination process of the hierarchical field rules does not rely on a full recursive trial of the tree data to be parsed, but rather reads the corresponding field configuration in the registered field adaptation table according to the parsing type identifier, so that tree data of different course types obtain a consistent field interpretation method before entering the standard node sequence generation. Therefore, the hierarchical field rules play a direct role in the subsequent layer-by-layer identification of node fields and node relationship fields, enabling the same parsing process to handle course tree data with different hierarchical depths and different field names.

[0023] Specifically, in this application, the node field is a field in the tree data to be parsed that describes the node's own information. The node field can correspond to a node unique identifier field, a node content field, a node level field, or a node original content field. The node relationship field is a field in the tree data to be parsed that describes the parent-child relationship between nodes. The node relationship field can correspond to a parent node pointer field and a child node entry field. When identifying the node fields and node relationship fields in the tree data to be parsed layer by layer according to the level field rules, the root level field name is first determined according to the level field rules, and then the node fields are read starting from the node fragment corresponding to the root level field name; subsequently, the child node fragments in the current node fragment are read according to the child node entry field, and the child node fragments are added to the queue of node fragments to be accessed. For each node fragment read, the node unique identifier is extracted according to the node unique identifier field, the parent node pointer identifier is extracted according to the parent node pointer field, and a node level marker is generated in combination with the level where the node fragment is located. Then, an original content pointer is generated according to the storage location of the node fragment in the tree data to be parsed. The extracted node unique identifier, parent node pointer identifier, node hierarchy marker, and original content pointer together form a standard node entry. Multiple standard node entries are arranged in the order of access to form a standard node sequence. The purpose of the standard node sequence is to transform the hierarchical field differences that were originally affected by course type into a unified node entry structure, so that the generation of subsequent multi-directional cross-reference index records no longer depends on the field differences of the original tree data.

[0024] Specifically, in this application, the node content is not independent text separated from the tree data to be parsed, but rather is associated with the original content of the node in the tree data to be parsed through the original content pointer in the standard node entry. The node position represents the position of the standard node entry in the sequential tiling index, and the node hierarchy represents the relationship between a standard node entry and its parent standard node entry, direct child standard node entries, and adjacent standard node entries. The multi-directional referencing index record is used to uniformly associate the node content, the node position, and the node hierarchy with the same unique node identifier. In this way, when a subsequent parsing access instruction points to a certain unique node identifier, the node position can be determined first through the unique node identifier, and then the node content can be read through the node position. Furthermore, the associated node path can be completed through the node hierarchy corresponding to the unique node identifier. The multi-directional referencing index record is not a single node lookup table, but rather places sequential access, location access, downlink access, and uplink access into the same multi-directional referencing index record, allowing different access directions to share the intermediate data formed by the standard node sequence.

[0025] Specifically, in this application, the target node position refers to the node position of the node specified by the parsing access instruction in the multi-direction referencing index record, and the target relationship direction refers to the relationship access direction specified by the parsing access instruction. When parsing the parsing access instruction, the target node identifier and access direction marker can be read from the parsing access instruction first. Then, the target node position is located in the multi-direction referencing index record based on the target node identifier, and the target relationship direction is determined based on the access direction marker. The target relationship direction can represent an upward direction, a downward direction, or a sequential direction. The upward direction is used to trace the parent node layer by layer from the target node, the downward direction is used to read the direct child nodes from the target node, and the sequential direction is used to read adjacent standard node entries based on adjacent positions in the sequential tiling index. By determining the target node position first and then the target relationship direction, node content reading and associated node path completion can revolve around the same target node, avoiding the traditional recursive method of repeatedly entering the tree structure from the root node under different access requirements.

[0026] Specifically, in this application, when reading node content according to the target node position, the sequential tiling index in the multi-directional referencing index record can be accessed according to the target node position to determine the target standard node entry, and then the node content can be read according to the original content pointer in the target standard node entry. When completing the associated node path according to the target relationship direction, the corresponding uplink relationship index, downlink relationship index, or sequential tiling index can be selected according to the target relationship direction. If the target relationship direction is uplink, the parent node pointer is read layer by layer according to the unique node identifier corresponding to the target node, and the unique node identifiers from the target node to the root node are arranged into an associated node path; if the target relationship direction is downlink, the sequence of unique identifiers of the direct child nodes is read according to the unique node identifier corresponding to the target node, and the sequence of unique identifiers of the target node and the direct child nodes are arranged into an associated node path; if the target relationship direction is sequential, the adjacent standard node entries are read according to the adjacent positions of the target node position in the sequential tiling index, and the unique node identifiers of the target node and the adjacent standard node entries are arranged into an associated node path. The associated node path is determined by the direction of the target relationship, and the associated node path also participates in the generation of path verification markers. Therefore, the associated node path is used both to express the path reading result and to verify whether the path is consistent with the node hierarchy relationship in the multi-directional mutual reference index record.

[0027] Specifically, in this application, the path verification mark is used to indicate the consistency status between the associated node path and the multi-direction referencing index record. When generating the path verification mark, the unique identifiers of the nodes involved in the associated node path can be read, and then the node positions and node hierarchical relationships corresponding to these unique identifiers can be queried in the multi-direction referencing index record. For uplink paths, it is necessary to verify whether there is a correspondence between the unique identifiers of child nodes and the pointer identifiers of parent nodes between two adjacent nodes in the associated node path; for downlink paths, it is necessary to verify whether the sequence of unique identifiers of the direct child nodes corresponding to the target node contains the unique identifiers of the lower-level nodes in the associated node path; for sequential paths, it is necessary to verify whether the node positions of adjacent standard node entries in the sequential tiling index satisfy the adjacent position relationship. If the node hierarchical relationship between the associated node path and the multi-direction referencing index record is consistent, a path verification mark in a passed state is generated; if there are missing unique identifiers, missing node positions, or inconsistent node hierarchical relationships in the associated node path, a path verification mark in a failed state is generated. The path verification mark is output along with the parsing result, so that in addition to returning node content, the parsing result can also express whether the associated node path can be verified by the multi-direction referencing index record.

[0028] Specifically, in this application, the parsing result may include node content, associated node path, source node identifier, and path verification mark. The source node identifier can be generated based on the unique identifier of the node in the target standard node entry, and the source node identifier is used to indicate which standard node entry in the tree data to be parsed the node content originates from. The node content in the parsing result can be used for course node content display, the associated node path in the parsing result can be used for course node path display or generation of the next course node entry, and the path verification mark in the parsing result can be used to mark the abnormal state of the associated node path when the path is abnormal. Compared with the parsing method that only returns node content, this application, by carrying both the source node identifier and the path verification mark in the parsing result, enables the course display page that subsequently uses the parsing result to directly obtain the node content, node source, and path status, reducing the number of times the processing of re-entering the tree data to find the path.

[0029] Optionally, determining the hierarchical field rule that matches the parsing type identifier includes: Read the registered field adaptation table, which records the correspondence between the parsing type identifier and the candidate level chain; Based on the parsing type identifier, determine the candidate hierarchical chain from the registered field adaptation table; Perform root-level validation on the field names in the candidate hierarchy chain, and then perform sub-level validation based on the root-level validation result to generate the hierarchy field rules. The hierarchical field rules define the reading order of the node unique identifier field, parent node pointer field, and child node entry field in each level, and are used to identify the node fields and node relationship fields in the tree data to be parsed.

[0030] Specifically, in this application, the registered field adaptation table can be pre-configured when accessing course types. When pre-configuring the registered field adaptation table, a candidate hierarchy chain is first written for each parsing type identifier, and then a node unique identifier field, a parent node pointer field, and a child node entry field are written for each level in the candidate hierarchy chain. The candidate hierarchy chain describes the field route from the root level to the end level, such as the sequential relationship between the course root level, lesson level, knowledge point level, and content level. The node unique identifier field is used to read the identifier data of the node in that level, the parent node pointer field is used to read the parent node identifier of the node in that level, and the child node entry field is used to locate the position of the child node fragment in that level. The registered field adaptation table does not simply store course names, but rather stores the correspondence between parsing type identifiers and field reading structures. Therefore, after obtaining the parsing type identifier, the candidate hierarchy chain can be directly determined from the registered field adaptation table.

[0031] Specifically, in this application, after determining the candidate hierarchical chain from the registered field adaptation table based on the parsing type identifier, it is necessary to perform root-level verification on the field names in the candidate hierarchical chain. Root-level verification is used to determine whether the first-level field name in the candidate hierarchical chain can be read at the root level of the tree data to be parsed. Root-level verification can be performed through field existence checks, field data type checks, and root-level node fragment readability checks. Field existence checks determine whether the root level of the tree data to be parsed contains the first-level field name in the candidate hierarchical chain; field data type checks determine whether the data corresponding to the first-level field name is of a data type that can continue to read node fragments; root-level node fragment readability checks determine whether the data corresponding to the first-level field name can form an initial node fragment. After the root-level verification passes, a root-level verification result can be obtained, which indicates that the first-level field name of the candidate hierarchical chain can serve as the parsing entry point for the tree data to be parsed.

[0032] Specifically, in this application, when performing sub-level verification based on the root-level verification result, the sub-level verification is executed layer by layer according to the field order in the candidate level chain. Each time a sub-level verification is performed, the child node entry field in the node fragment of the previous level is read, and it is determined whether the child node entry field can provide a child node fragment. If the data corresponding to the child node entry field is empty, it means that the current node fragment will no longer generate child node fragments; if the data corresponding to the child node entry field is not empty, it is further determined whether the child node fragment contains a node unique identifier field and a parent node pointing field. Sub-level verification is used not only to determine whether field names exist, but also to determine whether the data pointing between parent and child levels can form a resolvable relationship. After completing the root-level and sub-level verifications, the candidate level chain that has passed the verification, as well as the node unique identifier field, parent node pointing field, and child node entry field corresponding to each level, are organized into level field rules. These level field rules are then used to identify the node fields and node relationship fields in the tree data to be parsed, so that a continuous technical processing relationship is formed between the field adaptation process and the node sequence generation process.

[0033] Optionally, the step of identifying the node fields and node relationship fields in the tree data to be parsed layer by layer according to the hierarchical field rules, and generating a standard node sequence, includes: According to the hierarchical field rules, the initial node fragment is read from the root level of the tree data to be parsed; Based on the child node entry field in the hierarchy field rules, obtain the child node fragments of the initial node fragment and generate a queue of node fragments to be accessed; For the node fragments in the queue of node fragments to be accessed, extract the unique node identifier according to the unique node identifier field, extract the parent node pointer identifier according to the parent node pointer field, generate a node level marker according to the level of the node fragment, and generate the original content pointer according to the storage location of the node fragment in the tree data to be parsed. Standard node entries are generated based on the node's unique identifier, the parent node's pointer identifier, the node's hierarchy marker, and the original content pointer. The standard node entries are sorted according to the order in which the node fragments are accessed, thereby generating the standard node sequence.

[0034] Specifically, in this application, when reading the initial node fragment from the root level of the tree data to be parsed, the root level data area of ​​the tree data to be parsed is first accessed according to the root level field name in the hierarchy field rules. Then, the data related to the node field and node relationship field in the root level data area is organized into the initial node fragment. The initial node fragment may include the unique identifier field of the root node, the node content field of the root node, and the child node entry field of the root node. If the root node does not have a parent node pointer field, the parent node pointer can be recorded as a null value or a root level placeholder. The initial node fragment serves as the first node fragment in the queue of node fragments to be accessed in subsequent steps. The queue of node fragments to be accessed is used to store node fragments that have not yet completed the generation of standard node entries. By reading the initial node fragment first and then proceeding to the child node fragment reading process from the initial node fragment, the generation order of the standard node sequence can be made consistent with the hierarchical expansion order of the tree data.

[0035] Specifically, in this application, when obtaining the child node fragments of the initial node fragment according to the child node entry field in the hierarchical field rules, the data area indicated by the child node entry field in the initial node fragment is read. If the data area indicated by the child node entry field contains multiple child node fragments, these child node fragments are added to the queue of node fragments to be accessed according to their original arrangement order in the tree data to be parsed; if the data area indicated by the child node entry field is empty, the initial node fragment is marked as a standard node entry without a child node entry field. For each node fragment added to the queue of node fragments to be accessed, the storage location of the node fragment in the tree data to be parsed is retained, and the storage location is subsequently used to generate the original content pointer. The technical function of the queue of node fragments to be accessed is to transform the hierarchical recursive reading of tree data into queued node fragment processing, which facilitates the subsequent generation of standard node entries item by item according to the unified field rules.

[0036] Specifically, in this application, for node fragments in the queue of node fragments to be accessed, a unique node identifier is extracted according to the unique node identifier field. The unique node identifier is used to mark the same node in the standard node sequence, multi-direction index records, and parsing results. A parent node pointer identifier is extracted according to the parent node pointer field, which records the direct relationship between the current node fragment and its parent node fragment. A node level marker is generated based on the level of the node fragment. The node level marker can be generated according to the order of the current fields in the candidate level chain; for example, the root level corresponds to the starting level marker, and the child levels form progressive level markers according to the field reading order. An original content pointer is generated based on the storage location of the node fragment in the tree data to be parsed. The original content pointer can be the path location of the node fragment in the tree data byte stream or structured object, or it can be a data address description that allows the original content of the node to be read again. The original content pointer does not replace the node content but is used to access the original content data in the tree data to be parsed when it is necessary to read the node content.

[0037] Specifically, in this application, when generating standard node entries based on the node's unique identifier, parent node pointer identifier, node hierarchy marker, and original content pointer, each standard node entry includes at least the node's unique identifier field value, parent node pointer field value, node hierarchy marker field value, and original content pointer field value. To facilitate subsequent generation of the downlink index, the standard node entry can also store the direct child node's unique identifier read from the child node's entry field. This direct child node's unique identifier can be added to the corresponding parent node's standard node entry after the child node fragment has completed its node unique identifier extraction. When sorting the standard node entries according to the access order of the node fragments, the access order comes from the reading order of the queue of node fragments to be accessed. After sorting, a standard node sequence is formed. The standard node sequence uniformly stores the node's unique identifier, parent node pointer identifier, node hierarchy marker, and original content pointer for each node, transforming the differences in tree fields for different course types into differences in standard node entries under the same structure. When subsequently generating the sequential tiling index, node positioning index, downlink index, and uplink index, the standard node sequence is directly read without needing to parse the original tree fields again.

[0038] Optionally, when generating the standard node sequence, the method further includes: A hierarchical path signature is generated based on the unique node identifier and parent node pointer identifier recorded in the standard node entries of the standard node sequence. When the same node unique identifier corresponds to different hierarchical path signatures, a conflict node identifier is generated based on the parsing type identifier and the hierarchical path signature; Replace the corresponding unique node identifier with the conflict node identifier, and write the replaced unique node identifier into the corresponding standard node entry. Use the replaced unique node identifier as the locator key of the standard node entry. Generate a standard node sequence with a unique locator key based on the standard node entry with the unique identifier of the replaced node.

[0039] Specifically, in this application, the hierarchical path signature is used to express the source path of a standard node entry in a tree hierarchy. When generating a hierarchical path signature, one can start from the unique identifier of the node recorded in the current standard node entry, search for the parent node standard node entry layer by layer along the parent node's pointer identifier, and organize the unique identifiers and node hierarchy markers of each level in order from the root level to the current level. The organized hierarchical path data is then processed through character concatenation, hash mapping, or fixed-format encoding to form the hierarchical path signature. The hierarchical path signature is not the path text used for display, but rather auxiliary location data used to determine whether the same unique identifier of a node comes from different hierarchical paths. Through the hierarchical path signature, nodes with the same name under different course types or different branches of the same course type can be identified, preventing these nodes with the same name from overwriting each other's node positions in the node location index.

[0040] Specifically, in this application, when the same node unique identifier corresponds to different hierarchical path signatures, it indicates that the node unique identifier cannot be used alone as a stable location basis in the current tree data to be parsed. In this case, a conflict node identifier is generated based on the parsing type identifier and the hierarchical path signature. When generating the conflict node identifier, the parsing type identifier and the hierarchical path signature can be combined according to a fixed field order, and then the combined data is encoded to form a conflict node identifier that can distinguish between different parsing types and different hierarchical paths. The conflict node identifier originates from the parsing type identifier and the hierarchical path signature; therefore, the conflict node identifier has a traceable relationship with the original node unique identifier. For node unique identifiers that do not conflict, the standard node entry continues to use the original node unique identifier as the location key; for node unique identifiers that conflict, the standard node entry replaces the corresponding node unique identifier with the conflict node identifier, and uses the replaced node unique identifier as the location key for that standard node entry.

[0041] Specifically, in this application, when the replaced node unique identifier is written into the corresponding standard node entry, the standard node entry can simultaneously retain both the original node unique identifier and the replaced node unique identifier. The original node unique identifier is used to backtrack the original node in the tree data to be parsed, while the replaced node unique identifier is used to participate in the generation of subsequent node location indexes and multi-directional referencing index records. Based on the standard node entry with the replaced node unique identifier, a standard node sequence with a unique locating key is generated. The standard node sequence with a unique locating key maintains the original access order when generating the subsequent sequential tiling index, uses the replaced node unique identifier to form the locating key when generating the subsequent node location index, and uses the replaced node unique identifier to maintain the correspondence of parent-child relationships when generating the subsequent downlink and uplink relationship indexes. Thus, the hierarchical path signature and conflict node identifier are not isolated added markers, but directly participate in the conversion process from the standard node sequence to the multi-directional referencing index record.

[0042] Optionally, generating multi-directional cross-reference index records based on the standard node sequence includes: Generate a sequential tiled index based on the access order of a standard node sequence with a unique locating key; Generate a node positioning index based on the position of each standard node entry in the sequential tiling index; Generate a downlink index and an uplink index based on the parent node pointer in each standard node entry; Based on the mutual referencing relationship corresponding to the unique identifier of the same node in the sequential tiling index, the node positioning index, the downlink relationship index, and the uplink relationship index, a mutual referencing check code is generated; The multi-directional mutual referencing index record is generated based on the sequential tiling index, the node positioning index, the downlink relationship index, the uplink relationship index, and the mutual referencing check code. The multi-directional mutual referencing index record is used to determine the target node position and the target relationship direction.

[0043] Specifically, in this application, the sequential tiling index is used to record the arrangement of standard node sequences with unique locating keys in a one-dimensional sequential structure. When generating the sequential tiling index, standard node entries are written sequentially into the index according to their access order, and a node position is configured for each standard node entry. The node position can be marked with an incrementing position or a storage address, as long as the corresponding standard node entry can be accessed from the node position. The sequential tiling index transforms the originally multi-layered tree structure into a sequentially accessible data structure. Subsequent sequential accesses can read adjacent standard node entries from adjacent positions of the target node position, thereby reducing the processing of retracing the tree data to find the next course node.

[0044] Specifically, in this application, the node positioning index is used to establish the association between the positioning key and the node position. When generating the node positioning index, the unique node identifier or its replacement in each standard node entry is read, and the node position of that standard node entry in the sequential tiling index is read. Then, the unique node identifier or its replacement is used as the positioning key, and the node position is used as the positioning value to form the node positioning index. When parsing access instructions carrying a target node identifier, the target node identifier can be converted into a target node position using the node positioning index. There is a direct functional cooperation between the node positioning index and the sequential tiling index: the node positioning index is used to determine the target node position, and the sequential tiling index is used to read the target standard node entry based on the target node position.

[0045] Specifically, in this application, the downlink relationship index is used to record the relationship between the unique identifier of a parent node and the sequence of unique identifiers of its direct child nodes. When generating the downlink relationship index, the parent node pointer identifier in each standard node entry is read, and standard node entries with the same parent node pointer identifier are grouped into the same sequence of unique identifiers of their direct child nodes. The unique identifiers of the direct child nodes in the sequence are arranged according to the access order of the child nodes in the standard node sequence, avoiding the loss of the original child node order when reading the downlink path. The uplink relationship index is used to record the relationship between the unique identifier of a child node and the pointer identifier of its parent node. When generating the uplink relationship index, the unique identifier of a node and the pointer identifier of its parent node are read from each non-root standard node entry, and the position mark of the non-root standard node entry in the corresponding sequence of unique identifiers of its direct child nodes is recorded. The downlink relationship index and the uplink relationship index work together to enable the downlink direction to locate the direct child node from the parent node, and the uplink direction to locate the parent node from the child node.

[0046] Specifically, in this application, the cross-reference check code is used to express the consistency of association of the same node's unique identifier in the sequential tiling index, node location index, downlink relationship index, and uplink relationship index. When generating the cross-reference check code, the node position in the sequential tiling index, the location value in the node location index, the sequence of direct child node unique identifiers related to the node's unique identifier in the downlink relationship index, and the parent node pointing identifier and location marker related to the node's unique identifier in the uplink relationship index can be read for the same node's unique identifier. These data are then encoded in a fixed order to generate the cross-reference check code. When subsequently reading node content or generating path verification markers, the association data of the same node's unique identifier in each index can be reread and compared with the cross-reference check code to determine whether there are inconsistencies in the relationships between the multi-directional cross-reference index records. After generating multi-directional cross-reference index records based on the sequential tiling index, node location index, downlink relationship index, uplink relationship index, and cross-reference check code, these records provide a common index basis for determining the target node's location, adapting the target relationship direction, reading node content, and verifying the path.

[0047] Optionally, generating the sequential tiling index based on the access order of the standard node sequence includes: Based on the standard node sequence, the hierarchical field rules, and the parent node pointer identifier, the standard node entry corresponding to the root node is configured as the starting entry; After accessing the current standard node entry, the next standard node entry to be accessed is determined according to the child node entry field in the hierarchy field rules. When there is no unvisited next standard node entry for the current standard node entry, return to the previous level along the parent node pointer and determine the next sibling node, and configure the standard node entry corresponding to the next sibling node as the new current standard node entry. The sequential tiling index is generated based on the obtained access order, and the sequential tiling index records the node position corresponding to each standard node entry.

[0048] Specifically, in this application, when generating the sequential tiling index, the starting entry needs to be determined first. The standard node entry corresponding to the root node can be identified by the parent node pointing to a null value, the parent node pointing to a root-level placeholder, or the node level marker being a root-level marker. After identifying the standard node entry corresponding to the root node, this entry is configured as the starting entry and written to the beginning position of the sequential tiling index. The starting entry is used to determine the access starting point of the sequential tiling index, and subsequent access sequences all begin from this starting entry. Compared to directly writing data into the sequential tiling index according to the original data storage order, determining the starting entry first allows tree data of different course types to form a sequential tiling index based on a unified root-level entry point.

[0049] Specifically, in this application, after accessing the current standard node entry, the next standard node entry to be accessed is determined according to the child node entry field in the hierarchy field rules. Since standard node entries are generated from node fragments, they can retain the direct child node information corresponding to the child node entry field. If the current standard node entry has unaccessed direct child nodes, the standard node entry corresponding to the first direct child node in the access order is determined as the next standard node entry to be accessed. The next standard node entry to be accessed is written to the next node position in the sequential tiling index and configured as the new current standard node entry. Through this process, the sequential tiling index expands downwards preferentially along the child node entry field, ensuring that the parent node and its first direct child node maintain a continuous access relationship in the sequential tiling index, facilitating the subsequent acquisition of the next learning node through adjacent positions.

[0050] Specifically, in this application, when there is no unvisited next standard node entry for the current standard node entry, it indicates that the child node fragments corresponding to the current standard node entry have been visited, or the current standard node entry itself is a standard node entry without a child node entry field. In this case, the process returns to the previous level along the parent node pointer, and determines whether there is an unvisited next sibling node in the parent node standard node entry at the previous level. If a next sibling node exists, the standard node entry corresponding to the next sibling node is configured as the new current standard node entry, and the new current standard node entry is written into the sequential tiling index. If there is also no unvisited next sibling node at the previous level, the process continues to return to a higher level along the parent node pointer until an unvisited next sibling node is found or no unvisited node is found after returning to the root node. The sequential tiling index generated according to the above access order preserves both the downward expansion order of the tree structure and the sequential relationship between sibling nodes. The sequential tiling index records the node position corresponding to each standard node entry, and the node position subsequently participates in the generation of the node positioning index and the sequential path generation.

[0051] Optionally, generating a node positioning index based on the position of each standard node entry in the sequential tiling index includes: A location key is generated based on the parsing type identifier, node unique identifier, and hierarchical path signature corresponding to the standard node entry; A positioning value is generated based on the position of the standard node entry in the sequential tiling index; Generate the node location index based on the location key and the location value; When standard node entries under different parsing types have the same unique node identifier, the positioning key is distinguished by the parsing type identifier and the hierarchical path signature, so that different standard node entries with the same unique node identifier correspond to different positioning values. The node positioning index is used to determine the location of the target node based on the target node identifier.

[0052] Specifically, in this application, the generation of the node location index depends on the node positions in the sequential tiling index. Each standard node entry, after being written into the sequential tiling index, has a corresponding node position. When generating a location key based on the parsing type identifier, node unique identifier, and hierarchical path signature corresponding to the standard node entry, the parsing type identifier is used to distinguish different course types, the node unique identifier is used to express the node's own identifier, and the hierarchical path signature is used to express the hierarchical path where the node belongs. The location key can be formed by combining the parsing type identifier, node unique identifier, and hierarchical path signature in a fixed field order; for standard node entries where no node unique identifier conflict occurs, the parsing type identifier and node unique identifier can also be used to generate the location key, and the verification part of the hierarchical path signature is retained in the location key. The location key is used to receive the target node identifier query in the parsing access instruction, and the relationship between the location key and the location value is used to convert the target node identifier into the target node position.

[0053] Specifically, in this application, when generating a location value based on the position of a standard node entry in the sequential tiling index, the location value can record the node position in the sequential tiling index. The node position can be represented as a position number in the sequential tiling index, or as the storage location of the corresponding standard node entry in the sequential tiling index. After generating the node location index based on the location key and location value, the node location index can directly return the target node position when parsing the access instruction carrying the target node identifier. The node location index does not directly store the complete node content; the node content is still read through the target standard node entry and the original content pointer in the sequential tiling index. This avoids repeatedly storing node content in multiple indexes, clearly separating the node content reading path from the node location path.

[0054] Specifically, in this application, when standard node entries under different parsing types have the same unique node identifier, the locating key is distinguished by the parsing type identifier and the hierarchical path signature. For example, different course types may have the same node number, but these same node numbers correspond to different root levels, lesson levels, or content levels. If only the unique node identifier is used as the locating key, standard node entries under different parsing types will be mapped to the same locating key, resulting in the locating value being overwritten or the query results being unstable. This application incorporates the parsing type identifier and the hierarchical path signature into the locating key, so that different standard node entries with the same unique node identifier correspond to different locating values. Therefore, when the node locating index subsequently determines the location of the target node based on the target node identifier, it can combine the parsing type identifier and the hierarchical path signature for differentiation, thereby reducing the risk of index conflicts caused by the reuse of node identifiers across different course types.

[0055] Optionally, generating the downlink relationship index based on the parent node pointer identifier in each standard node entry includes: Based on the child node entry field in the hierarchy field rules and the parent node pointer identifier, filter the standard node entries with the child node entry field from the standard node sequence. Based on the unique identifier of the parent node's standard node entry and the access order of the direct child nodes, a downlink relationship index is generated from the unique identifier of the parent node to the unique identifier sequence of the direct child nodes. The downlink relationship index is used to determine the direct child node unique identifier sequence based on the node unique identifier corresponding to the target node position when the target relationship direction is downlink, and to determine the direct child node content based on the direct child node unique identifier sequence.

[0056] Specifically, in this application, the downlink relationship index is used to express the unidirectional hierarchical relationship from parent standard node entries to direct child standard node entries. Before generating the downlink relationship index, a standard node sequence has been generated according to the hierarchical field rules. Each standard node entry in the standard node sequence records a unique node identifier, a parent node pointer identifier, a node hierarchy marker, and an original content pointer. Since the hierarchical field rules limit the reading order of the child node entry field in each level, the child node entry field can indicate whether a standard node entry has direct children. Therefore, when generating the downlink relationship index, the standard node entries in the standard node sequence are first checked according to the child node entry field in the hierarchical field rules. Standard node entries that have a child node entry field and whose corresponding data is not empty are determined as parent standard node entries. The parent standard node entries are not newly generated nodes, but standard node entries that already exist in the standard node sequence and have direct children.

[0057] Specifically, in this application, the parent node pointer identifier is used to determine whether a standard node entry is a direct child node of a parent node's standard node entry. After filtering out the parent node's standard node entries, the unique identifier of the node corresponding to the parent node's standard node entry is read, and then the standard node entry whose parent node pointer identifier matches the unique identifier is searched in the standard node sequence. The found standard node entry is the direct child standard node entry of the parent node's standard node entry. In order to maintain the original arrangement relationship of direct child nodes in the tree data to be parsed, the unique identifiers of the direct child standard node entries need to be extracted sequentially according to the access order of the direct child standard node entries in the standard node sequence, thus forming a direct child unique identifier sequence. The direct child unique identifier sequence is used to preserve the order relationship between all direct child nodes under the parent node's standard node entry, avoiding the situation where only the existence of direct child nodes can be determined during downlink access, but the original access order of direct child nodes cannot be restored.

[0058] Specifically, in this application, the downlink relationship index can be stored using a key-value association structure. The unique identifier of the parent node's standard node entry constitutes the query key in the downlink relationship index, and the sequence of unique identifiers of direct child nodes constitutes the query value. After generating the downlink relationship index from the unique identifier of the parent node to the sequence of unique identifiers of direct child nodes, when the target relationship direction is downlink, the index is first paved according to the access order of the target node position to determine the target standard node entry, and then the unique identifier of the node in the target standard node entry is read. After this unique identifier enters the downlink relationship index, the sequence of unique identifiers of direct child nodes can be determined. The sequence of unique identifiers of direct child nodes then enters the node positioning index to determine the position of the direct child node corresponding to each unique identifier of direct child node; then, the index is paved according to the access order of each direct child node position to obtain the corresponding standard node entry of direct child node; finally, the content of the direct child node is read according to the original content pointer in the standard node entry of direct child node. Thus, when the target relationship direction is downlink, the downlink relationship index concatenates the unique identifier of the parent node, the sequence of unique identifiers of direct child nodes, the position of the direct child node, and the content of the direct child node into a clear reading path.

[0059] Specifically, in this application, within the tree-structured data of online education courses, a course node typically includes lesson nodes, a lesson node typically includes knowledge point nodes, and a knowledge point node typically includes content unit nodes. The downlink index is suitable for scenarios where the content of the next-level course node is read from the current course node. For example, when the target node position corresponds to a lesson node, the unique identifier of the node in the target standard node entry can be entered into the downlink index to determine the sequence of unique identifiers of the direct child nodes corresponding to the knowledge point node. After this sequence of unique identifiers of the direct child nodes is converted into multiple direct child node positions through the node positioning index, the content of the direct child nodes of the knowledge point node can be read one by one. Thus, reading downwards does not require retracing from the course root level to the lesson node; instead, it directly reads the node hierarchy based on the downlink index already generated in the multi-directional cross-reference index record.

[0060] Optionally, generating the uplink relationship index based on the parent node pointer identifier in each standard node entry includes: Based on the parent node pointer and the direct child node unique identifier sequence, filter non-root standard node entries from the standard node sequence; Based on the unique identifier of the non-root standard node entry, the parent node pointing identifier of the non-root standard node entry, and the position mark of the non-root standard node entry in the corresponding direct child node unique identifier sequence, an uplink relationship index from the child node unique identifier to the parent node pointing identifier is generated. The location marker is used to verify the relative position of the non-root standard node entry in the corresponding direct child node unique identifier sequence; The uplink relationship index is used to determine the parent node pointing identifier based on the unique identifier of the node corresponding to the target node position when the target relationship direction is uplink, and to determine the parent node content and uplink path based on the parent node pointing identifier.

[0061] Specifically, in this application, the uplink index is used to express the unidirectional hierarchical relationship from non-root standard node entries to parent standard node entries. When generating the uplink index, non-root standard node entries are first filtered from the standard node sequence based on the parent node pointer identifier. A non-root standard node entry is a standard node entry whose parent node pointer identifier is not null and is not a root-level placeholder identifier. Since the standard node entry corresponding to the root node does not have a parent node, it is not included in the uplink index. For each non-root standard node entry, its node unique identifier is read as the child node unique identifier, its parent node pointer identifier is read as the parent node pointer identifier, and combined with the sequence of direct child node unique identifiers of the corresponding parent standard node entry in the downlink index, the position marker of the non-root standard node entry in the corresponding direct child node unique identifier sequence is determined.

[0062] Specifically, in this application, the position marker is used to express the relative position of a non-root standard node entry within the sequence of unique identifiers of its corresponding direct child nodes. In practice, the sequence of unique identifiers of the corresponding direct child nodes is first determined in the downlink relationship index using the parent node pointer identifier in the non-root standard node entry. Then, the unique identifier of the non-root standard node entry is searched within this sequence. If the unique identifier exists in the sequence, its position within that sequence is recorded as the position marker. If the unique identifier does not exist, a relationship missing status is generated and used for subsequent path verification marker generation. Thus, the position marker not only expresses the order of child nodes relative to their parent nodes but also participates in verifying the consistency between the uplink and downlink relationship indices.

[0063] Specifically, in this application, when generating the uplink index from the unique identifier of a child node to the pointer identifier of its parent node, the unique identifier of the non-root standard node entry is used as the query key, and the pointer identifier and position marker of the parent node of the non-root standard node entry are used as the query values. Thus, when the target relationship direction is uplink, the target standard node entry can be read based on the target node position, and then the unique identifier of the target standard node entry can be used to enter the uplink index to determine the pointer identifier and position marker of the parent node. After the pointer identifier of the parent node enters the node positioning index, the position of the parent node can be determined; after the position of the parent node enters the sequential tiling index, the standard node entry of the parent node can be obtained; the original content pointer in the standard node entry of the parent node is used to read the content of the parent node. If it is necessary to continue generating uplink paths, the unique identifier of the parent node's standard node entry is continued to be input into the uplink index, and the pointer identifier of the parent node at a higher level is determined layer by layer in the same way, until the standard node entry corresponding to the root node is reached.

[0064] Specifically, in this application, the uplink path can be used for course path navigation. For example, when the target node position corresponds to a content unit node, the uplink relationship index can first determine the knowledge point node corresponding to the content unit node, then determine the lesson node from the knowledge point node, and finally determine the course root node from the lesson node. The unique node identifiers obtained by the above layer-by-layer determination process form the uplink path in the order from the target node to the root node, and then be converted into the uplink path from the root node to the target node according to the display or subsequent processing needs. The uplink relationship index directly looks up the parent node pointer identifier through the unique identifier of the child node, which is different from the method of scanning the standard node sequence layer by layer to find the parent node, and can reduce the repeated traversal in the process of generating parent node content and uplink path.

[0065] Optionally, determining the target node location and target relationship direction from the multi-directional cross-reference index record according to the parsing access instruction includes: Parse the access command to generate a target node identifier and an access direction marker; The target node location is determined in the node location index based on the target node identifier, where the target node identifier is either a unique node identifier or a conflicting node identifier. Generate the target relationship direction based on the access direction marker; When the target node location exists, the node content is read and the associated node path is completed based on the target node location and the target relationship direction; If the target node does not exist, a field rule mismatch flag and a path verification flag indicating a failed state are generated, and node reading is terminated.

[0066] Specifically, in this application, the parsing access instruction can be triggered by a course node access operation or a course content display request on the learning device. The parsing access instruction includes at least a target node identifier and an access direction marker. The target node identifier indicates the node to be accessed in this request; the access direction marker indicates the access direction to be executed in this request. When parsing the parsing access instruction, the target node identifier field is first read to obtain the target node identifier; then the access direction marker field is read to obtain the access direction marker. If the parsing access instruction includes a parsing type identifier, the parsing type identifier and the target node identifier are used together to generate the location key; if the parsing access instruction does not directly contain a parsing type identifier, the parsing type identifier already obtained in this parsing request is used.

[0067] Specifically, in this application, the target node identifier is either a unique node identifier or a conflicting node identifier. When the target node identifier is a unique node identifier, it means that the unique node identifier does not conflict under the current parsing type identifier and hierarchical path signature conditions, and the target node identifier can directly enter the node positioning index. When the target node identifier is a conflicting node identifier, it means that the original unique node identifier has already been replaced according to the parsing type identifier and hierarchical path signature during the standard node sequence generation process, and the target node identifier needs to enter the node positioning index according to the conflicting node identifier. The node positioning index returns the target node position based on the target node identifier. If a positioning key corresponding to the target node identifier exists in the node positioning index, the positioning value corresponding to the positioning key is the target node position; if a positioning key corresponding to the target node identifier does not exist in the node positioning index, it means that the target node identifier in the parsing access instruction cannot establish a positioning relationship with the current multi-directional cross-reference index record.

[0068] Specifically, in this application, when generating the target relationship direction based on the access direction marker, the access direction marker can be mapped to an uplink direction, a downlink direction, or a sequential direction. When the access direction marker indicates reading the parent node path, the generated target relationship direction is uplink; when the access direction marker indicates reading the direct child node, the generated target relationship direction is downlink; when the access direction marker indicates reading adjacent standard node entries, the generated target relationship direction is sequential. The target relationship direction is not independent of the target node position, but rather, together with the target node position, determines the subsequent processing route. The target node position is used to determine which standard node entry to start reading the node content from, and the target relationship direction is used to determine whether, after reading the node content, the associated node path needs to be completed using an uplink relationship index, a downlink relationship index, or a sequential tiling index.

[0069] Specifically, in this application, when the target node location exists, node content is read and associated node path completion is performed based on the target node location and the target relationship direction. At this time, the target node location first enters the sequential tiling index to read the target standard node entry and node content; the target relationship direction enters the associated node path completion process to select the uplink relationship index, downlink relationship index, or sequential tiling index to generate the uplink path, downlink path, or sequential path. Conversely, when the target node location does not exist, continuing to read node content will result in a missing read object, thus generating a field rule mismatch flag and a path verification flag indicating a failed state, and terminating node reading. The field rule mismatch flag indicates that the target node identifier in the parsed access instruction cannot be recognized by the current node positioning index, and the path verification flag indicating a failed state indicates that the current associated node path cannot be verified through the multi-direction mutual referencing index record. The above processing can stop subsequent invalid readings when the target node location is missing, avoiding the return of node content from unknown sources.

[0070] Optionally, reading the node content according to the target node position includes: Access the sequential tiling index based on the target node position to obtain the target standard node entry; Read the node content based on the original content pointer of the target standard node entry; The mutual reference relationship between the target standard node entry, the target node position, and the location key in the node location index is verified according to the mutual reference check code. When the mutual referral relationship verification passes, the source node identifier is generated based on the unique node identifier in the target standard node entry, and the associated node path is completed using the target relationship direction. When the mutual reference relationship verification fails, a path verification flag indicating a failed status is generated.

[0071] Specifically, in this application, the target node position is derived from the node location index, and the sequential tiling index is used to read the target standard node entry based on the target node position. When accessing the sequential tiling index, the corresponding storage location in the sequential tiling index is first found using the target node position, and then the target standard node entry is read from that storage location. The target standard node entry contains at least a unique node identifier, a parent node pointer identifier, a node level marker, and a pointer to the original content. Since the sequential tiling index records the sequential arrangement of standard node entries, the target node position can directly locate the target standard node entry, without needing to rescan the tree data to be parsed starting from the root node.

[0072] Specifically, in this application, when reading node content based on the original content pointer of the target standard node entry, the original content pointer points to the storage location of the corresponding node fragment in the tree data to be parsed. When reading node content, the process first returns to the corresponding node fragment in the tree data to be parsed based on the original content pointer, and then reads the node content field from the corresponding node fragment. The node content field can correspond to the course node name, course node display data, content unit description data, or the original content data of the course node. The read node content then enters the parsing result generation process to generate node data items. Since the node content comes from the node fragment pointed to by the original content pointer, there is a traceable relationship between the node content and the target standard node entry, and the source node identifier can also correspond to the unique node identifier in the target standard node entry.

[0073] Specifically, in this application, the cross-reference checksum is used to verify the cross-reference relationship between the target standard node entry, the target node location, and the location key in the node location index. During verification, the unique identifier of the node in the target standard node entry is read, and the corresponding location key is searched in the node location index based on the unique identifier. If the location value corresponding to the found location key matches the target node location, it indicates that the location relationship between the node location index and the sequential tiling index is consistent. Subsequently, the cross-reference checksum corresponding to the unique identifier of the node is read from the multi-directional cross-reference index record. Then, temporary verification data is regenerated based on the target standard node entry, the target node location, and the location key, and the temporary verification data is compared with the cross-reference checksum. If the comparison results match, the cross-reference relationship verification passes; if the comparison results do not match, the cross-reference relationship verification fails. Cross-reference relationship verification can reduce misreading of node content caused by asynchronous updates between the node location index and the sequential tiling index.

[0074] Specifically, in this application, when the cross-reference verification passes, a source node identifier is generated based on the unique node identifier in the target standard node entry. The source node identifier can be directly derived from the unique node identifier in the target standard node entry, or it can be generated by combining the unique node identifier and the resolution type identifier in the target standard node entry to express the resolution type and node source of the node content. The source node identifier is then included in the resolution result to indicate which target standard node entry the node content originates from. After the cross-reference verification passes, the associated node path is completed using the target relationship direction; that is, processing does not terminate after the node content is read, but rather the associated node path is further generated based on the target relationship direction. Conversely, when the cross-reference verification fails, a path verification flag is generated indicating a failed state. The path verification flag in the failed state is used to prevent erroneous node content and erroneous associated node paths from being output as normal resolution results.

[0075] Optionally, the step of completing the associated node path according to the target relationship direction includes: When the target relationship direction is upward, the parent node pointing identifier is determined layer by layer according to the upward relationship index, and an upward path from the target node to the root node is generated. When the target relationship direction is the downlink direction, the unique identifier sequence of the direct child node is determined based on the downlink relationship index, and a downlink path from the target node to the direct child node is generated; When the target relationship direction is a sequential direction, a sequential path is generated based on the adjacent positions of the target node positions in the sequential tiling index; The uplink path, the downlink path, or the sequential path is determined as the associated node path, and a path verification mark is generated based on the unique identifier of the node involved in the associated node path and the multi-directional mutual reference index record.

[0076] Specifically, in this application, when the target relationship direction is upward, the associated node path needs to express the parent node tracing relationship between the target node and the root node. When generating the upward path, the unique identifier of the node in the target standard node entry is first read and written into the first path node of the upward path. Then, the upward relationship index is accessed based on this unique identifier to determine the parent node pointer. After the parent node pointer is entered into the node positioning index, the parent node position is determined. The parent node position is then entered into the sequential tiling index to obtain the parent node standard node entry. The unique identifier of the node in the parent node standard node entry is then read and written into the upward path. This process is repeated until the standard node entry corresponding to the root node is read, or there is no further upward-pointing parent node pointer in the upward relationship index. The generated upward path is used to express the hierarchical tracing path between the target node and the root node and can be used for course path display.

[0077] Specifically, in this application, when the target relationship direction is downward, the associated node path needs to express the subordinate relationship between the target node and its direct child nodes. When generating the downward path, the unique identifier of the node in the target standard node entry is first read and written into the first path node of the downward path; then, the downward relationship index is accessed based on this unique identifier to determine the sequence of unique identifiers of the direct child nodes. Each unique identifier of a direct child node in the sequence is sequentially entered into the node positioning index to determine the position of the corresponding direct child node; the position of the direct child node is then entered into the sequential tiling index to obtain the standard node entry of the direct child node; the original content pointer in the standard node entry of the direct child node can further read the content of the direct child node. The downward path can record the correspondence between the target node and the sequence of unique identifiers of the direct child nodes, and it can also record the correspondence between the target node and the content of the direct child nodes. Because the sequence of unique identifiers of the direct child nodes maintains the order of child node access, the downward path can retain the original child node arrangement when returning the content of the direct child nodes.

[0078] Specifically, in this application, when the target relationship direction is sequential, the associated node path needs to express the sequential relationship between the target node and adjacent standard node entries. When generating the sequential path, the target node position is read, and adjacent positions are determined in the sequential tiling index based on the target node position. Adjacent positions can be those following the target node position; in some course learning paths, adjacent node positions can also be those preceding the target node position as specified by the parsing access instruction. After determining the adjacent positions, the sequential tiling index is accessed based on the adjacent positions to obtain the adjacent standard node entries. Then, the unique identifiers of the nodes in the adjacent standard node entries are read, and the unique identifiers of the target standard node entries and the adjacent standard node entries are combined to form the sequential path. When the sequential path is used to obtain the next course node entry, it can directly rely on the adjacent positions in the sequential tiling index to determine adjacent nodes, without needing to re-derive the next node based on the tree hierarchy.

[0079] Specifically, in this application, after determining the uplink, downlink, or sequential path as the associated node path, a path verification flag needs to be generated based on the unique identifiers of the nodes involved in the associated node path and the multi-directional cross-reference index records. For the uplink path, each child node's unique identifier is checked item by item to see if the parent node pointing to it in the uplink relationship index is equal to the unique identifier of the next-level node in the uplink path. For the downlink path, the sequence of direct child node unique identifiers corresponding to the parent node in the downlink relationship index is checked to see if it contains the direct child node unique identifiers in the downlink path. For the sequential path, the positions of the nodes corresponding to the unique identifiers of the two nodes in the sequential tiling index are checked to see if they satisfy the adjacent position relationship. After the above verification, a path verification flag in a passed state or a path verification flag in a failed state is generated. The path verification flag is included in the parsing result along with the associated node path, so that the parsing result can express whether the current path completion is consistent with the multi-directional cross-reference index records.

[0080] Optionally, after generating the multi-directional cross-reference index record, the method further includes: Receive the updated tree data corresponding to the parsing type identifier; The updated tree data is parsed according to the hierarchical field rules to generate an updated node sequence; An update-level path signature is generated based on the unique identifier of the node and the parent node pointer identifier in the update node sequence, and a standard-level path signature is generated based on the unique identifier of the node and the parent node pointer identifier in the standard node sequence. The updated hierarchical path signature is compared with the standard hierarchical path signature to determine the affected node segments; Based on the affected node segment, a local index fragment is regenerated. The local index fragment includes a sequentially tiled index fragment, a node positioning index fragment, a downlink relationship index fragment, and an uplink relationship index fragment corresponding to the affected node segment. The multi-directional referencing index record is updated based on the local index fragment. The updated multi-directional referencing index record is used to determine the target node position and the target relationship direction.

[0081] Specifically, in this application, the updated tree data can be course tree data with content changes under the same parsing type identifier, such as adding course nodes, deleting lesson nodes, adjusting the order of knowledge point nodes, or replacing content unit nodes. After receiving the updated tree data corresponding to the parsing type identifier, the original multi-direction index records are not directly discarded. Instead, the updated tree data is parsed using the hierarchical field rules that match the parsing type identifier. Since the updated tree data and the tree data to be parsed correspond to the same parsing type identifier, the candidate hierarchical chain, node unique identifier field, parent node pointer field, and child node entry field in the hierarchical field rules can still be used to identify the node fields and node relationship fields of the updated tree data. After parsing the updated tree data according to the hierarchical field rules, an updated node sequence is generated. The structure of the updated node sequence is consistent with the structure of the standard node sequence, both containing a node unique identifier, a parent node pointer identifier, a node hierarchical marker, and an original content pointer. Therefore, the updated node sequence can be compared with the standard node sequence for path comparison and index fragment replacement.

[0082] Specifically, in this application, the updated hierarchical path signature is used to express the hierarchical source path of standard node entries in the updated node sequence, and the standard hierarchical path signature is used to express the hierarchical source path of standard node entries in the standard node sequence. When generating the updated hierarchical path signature, the unique identifier of the node and the parent node pointer identifier in the updated node sequence are read, and the path data from the root level to the current node is organized layer by layer along the parent node pointer identifier. When generating the standard hierarchical path signature, the unique identifier of the node and the parent node pointer identifier in the standard node sequence are read, and the path data is generated according to the same organization method. Since the updated hierarchical path signature and the standard hierarchical path signature use the same generation method, they can be directly compared. During the comparison, if the updated hierarchical path signature matches the standard hierarchical path signature, the hierarchical source path of the corresponding node has not changed; if the updated hierarchical path signature does not exist in the standard hierarchical path signature, it means that the updated tree data has added a node path; if the standard hierarchical path signature does not exist in the updated hierarchical path signature, it means that the node path in the standard node sequence has been deleted in the updated tree data; if the unique identifiers of the corresponding nodes are the same but the hierarchical path signatures are different, it means that the hierarchical position of the node has changed.

[0083] Specifically, in this application, the affected node segment refers to the range of continuous or non-contiguous nodes in the standard node sequence that require regeneration of the index fragment. When determining the affected node segment, the changed nodes can first be identified based on the comparison between the updated hierarchical path signature and the standard hierarchical path signature. Then, the parent node standard node entries related to the changed node are determined upwards along the parent node pointer identifier, and the direct child node standard node entries related to the changed node are determined downwards along the child node entry field. The changed nodes, parent node standard node entries, and direct child node standard node entries together form the affected node segment. For cases where only the node content changes and the node hierarchy remains unchanged, the affected node segment may only contain the corresponding standard node entry and its original content pointer; for cases where the node hierarchy changes, the affected node segment needs to contain the relevant standard node entries on the parent-child relationship chain where the changed node resides. The affected node segment is used to limit the scope of subsequent index reconstruction, allowing the sequential tiling index, node positioning index, downlink relationship index, and uplink relationship index, which are unaffected by the update, to be retained.

[0084] Specifically, in this application, when regenerating local index fragments based on the affected node segment, a sequentially tiled index fragment is first regenerated based on the updated node sequence in the affected node segment. The sequentially tiled index fragment records the update access order and updated node position of standard node entries within the affected node segment. Then, a node positioning index fragment is regenerated based on the updated node position in the sequentially tiled index fragment, recording the updated positioning key and positioning value. Next, a downlink relationship index fragment and an uplink relationship index fragment are regenerated based on the parent node pointer identifier of each standard node entry within the affected node segment. The downlink relationship index fragment records the relationship between the unique identifier of the node corresponding to the affected parent node's standard node entry and the updated sequence of unique identifiers of its direct child nodes; the uplink relationship index fragment records the relationship between the unique identifier of the affected child nodes and the updated pointer identifier of its parent node. Since the local index fragment includes a sequentially tiled index fragment, a node positioning index fragment, a downlink relationship index fragment, and an uplink relationship index fragment, the local index fragment can replace the index content corresponding to the affected node segment in the multi-direction referencing index record.

[0085] Specifically, in this application, when updating a multi-directional cross-reference index record based on a local index fragment, the original index content corresponding to the affected node segment in the multi-directional cross-reference index record is first located, and then the original index content is replaced with the local index fragment. The replacement order can be: first, replace the sequential tiled index fragment; then, replace the node positioning index fragment; and finally, replace the downlink relationship index fragment and the uplink relationship index fragment. After the replacement is completed, the corresponding cross-reference checksum is regenerated based on the updated sequential tiled index fragment, node positioning index fragment, downlink relationship index fragment, and uplink relationship index fragment, and the regenerated cross-reference checksum is written into the updated multi-directional cross-reference index record. The updated multi-directional cross-reference index record continues to be used to determine the target node location and target relationship direction. In this way, when the course tree data undergoes local changes, it is not necessary to regenerate a complete index for the entire course tree data, which can reduce the impact of the update process on the access paths of unchanged nodes.

[0086] Optionally, generating the parsing result includes: Generate node data items based on the node content; Generate path data items based on the associated node paths; Generate a trusted location item based on the source node identifier and the path verification mark; The parsing result is generated based on the node data item, the path data item, and the trusted location item; When the path verification is marked as failed, the corresponding associated node path is marked as an abnormal path item, and the abnormal path item is included in the parsing result.

[0087] Specifically, in this application, node data items are used to store the node content read during the current parsing process. When generating node data items, the original content pointer in the target standard node entry is read first, and then the node content is read from the tree data to be parsed based on the original content pointer. The read node content can be structured according to the course node display field, the course node original content field, and the node hierarchy marker, thus forming node data items. Node data items do not change the node content itself; instead, they place the node content and the node hierarchy marker related to the node content into the same node data item. In this way, when the subsequent course display page reads the parsing results, it can directly obtain the node content from the node data item and determine whether the node content belongs to the course root level, lesson level, knowledge point level, or content level based on the node hierarchy marker.

[0088] Specifically, in this application, the path data item is used to store the path of associated nodes. When generating the path data item, the direction of the target relationship is first determined to determine whether the associated node path is an uplink path, a downlink path, or a sequential path. Then, the node position and node level marker corresponding to the unique identifier of each node in the associated node path are read. For an uplink path, the path data item can record the node unique identifier, node position, and node level marker in the order from the target node to the root node, or it can record the above data in the order from the root node to the target node. For a downlink path, the path data item records the unique identifier of the target node and the sequence of unique identifiers of its direct child nodes, and retains the access order in the sequence of unique identifiers of the direct child nodes. For a sequential path, the path data item records the unique identifier of the target node, the unique identifiers of adjacent standard node entries, and the adjacent positional relationship. The path data item and the node data item are entered into the parsing result together, so that the parsing result expresses both the node content and the path relationship in which the node content is located.

[0089] Specifically, in this application, the trusted location item is used to store the source node identifier and the path verification mark. The source node identifier is derived from the unique identifier of the node in the target standard node entry, and the path verification mark is derived from the consistency check between the associated node path and the multi-directional cross-reference index record. When generating the trusted location item, the source node identifier and the path verification mark are associated, so that the source node identifier is used to express the source of the node content, and the path verification mark is used to express the verification status of the associated node path. The trusted location item does not participate in the display of the node content itself, but it can provide source tracking data for subsequent course path display, course node jumps, and the generation of the next course node entry. If the parsing result needs to investigate which standard node entry the node content comes from, the source node identifier in the trusted location item can be read directly; if the parsing result needs to determine whether the associated node path can continue to be used, the path verification mark in the trusted location item can be read directly.

[0090] Specifically, in this application, when generating the parsing result based on node data items, path data items, and trusted location items, the parsing result can be saved in a structured data format. The node data items in the parsing result provide node content, the path data items provide associated node paths, and the trusted location items provide source node identifiers and path verification flags. The node data items, path data items, and trusted location items are associated with the same source node identifier, ensuring that the node content, associated node paths, and path verification status in the parsing result all point to the same target standard node entry. In this way, the parsing result can be used for displaying course node content, course node paths, or generating the next course node entry, without needing to subsequently reverse-engineer the node path based on the node content.

[0091] Specifically, in this application, when a path verification mark is in a failed state, the corresponding associated node path is marked as an abnormal path item, and the abnormal path item is included in the parsing result. The abnormal path item indicates that the associated node path failed the multi-direction cross-reference index record verification. When generating an abnormal path item, the path verification mark in the failed state, the corresponding associated node path, and the unique identifier of the node that failed verification in the associated node path can be read and organized into an abnormal path item. After the abnormal path item enters the parsing result, the course display page using the parsing result can continue to display the node content in the node data item, while avoiding course path jumps using associated node paths that failed verification based on the abnormal path item. Therefore, the parsing result retains the node content and source node identifier even when path verification fails, and expresses the abnormal path status through the abnormal path item, avoiding outputting abnormal paths as normal paths.

[0092] In a specific application scenario, the tree data to be parsed is the original tree-structured JSON data used in the learning machine's course content. JSON is an abbreviation for JavaScript Object Notation, representing a tree-structured data description format. The parsing type identifier is the course type identifier `courseType`, which represents the course type field used to distinguish course types such as synchronous courses, topic courses, English courses, composition courses, or experimental courses. The parsing access command is generated by clicking on course nodes or jumping through learning paths on the learning machine terminal. Taking a four-layer course structure corresponding to a certain course type as an example, the course structure includes a course root node, lesson nodes, knowledge point nodes, and content unit nodes in sequence. In the pre-configured registered field adaptation table, a set of JSON hierarchical parsing rules is recorded for this course type identifier. The JSON hierarchical parsing rules include the number of layers, the JSON field name for each layer, node ID field mapping, and parent-child relationship field mapping, where ID is an abbreviation for Identifier, representing an identifier. In this embodiment, the node ID corresponds to a unique identifier for the node. After receiving the original tree-structured JSON data and the course type identifier, the corresponding JSON hierarchical parsing rules are read according to the course type identifier and used as hierarchical field rules. Then, the JSON fields of the course root node are identified according to the rules of the hierarchical fields, the unique identifier ID of the course root node is extracted, and the fields of the next level nodes are read along the child node fields to obtain the node ID, parent node ID and child node ID list of each node.

[0093] In this embodiment, the standard node sequence can be represented by a standardized node list. Each standard node entry in the standardized node list includes nodeId, parentId, childIds, level, and content. Here, nodeId represents the node's unique identifier field, corresponding to the node's unique identifier; parentId represents the parent node identifier field, corresponding to the parent node's pointer identifier; childIds represents the child node identifier list field, corresponding to the sequence of unique identifiers for direct child nodes; level represents the node level field, corresponding to the node level marker; and content represents the node's original content field, corresponding to the node's original content data. Taking the course root node P1, lesson node L1, knowledge point node K1, content unit node C1, and content unit node C2 as an example, P1 represents the unique identifier of the course root node, L1 represents the unique identifier of the lesson node, K1 represents the unique identifier of the knowledge point node, C1 represents the unique identifier of the first content unit node, and C2 represents the unique identifier of the second content unit node. The parsed standardized node list can be represented as follows: P1's parentId is empty, level is 0, and childIds include L1; L1's parentId is P1, level is 1, and childIds include K1; K1's parentId is L1, level is 2, and childIds include C1 and C2; C1's parentId is K1, level is 3, and childIds are empty; C2's parentId is K1, level is 3, and childIds are empty. This standardized node list transforms inconsistent JSON field names across different course types into unified node fields, enabling the subsequent four-dimensional indexes to be generated based on the same standardized node entry format.

[0094] In this embodiment, the sequential tiling index can be represented by a tree-structured tiling array `treeNodesIdx`, where `treeNodesIdx` is an abbreviation for Tree Nodes Index, used to record the array of standard node entries after tiling according to the access order. The tree-structured tiling array stores the standard node entries in the access order from the root node to the terminal leaf node, with the array index increasing from 0. For example, the tree-structured tiling array can be represented as: treeNodesIdx = [ 0: {nodeId:"P1", parentId:"", level:0, content:course root node content}, 1: {nodeId:"L1", parentId:"P1", level:1, content:Lesson node content}, 2: {nodeId:"K1", parentId:"L1", level:2, content:knowledge point node content}, 3: {nodeId:"C1", parentId:"K1", level:3, content:content of content unit node C1}, 4: {nodeId:"C2", parentId:"K1", level:3, content:content of content unit node C2} ] The above tree structure tiling array corresponds to the sequential tiling index. After the original 4-level tree structure is written into a one-dimensional sequential structure, the node position can be represented by the array index. For example, the node position of P1 is 0, the node position of L1 is 1, the node position of K1 is 2, the node position of C1 is 3, and the node position of C2 is 4. In this way, when it is necessary to obtain the next learning node, the adjacent position can be directly accessed according to the current node position. For example, when the current node is K1, the node position of K1 in the tree structure tiling array is 2, and the next node position is 3. Accessing position 3 in the tree structure tiling array will give you the content unit node C1.

[0095] In this embodiment, the node location index can be represented by a tree-structured tiled index, `treeNodeIdxMap`, which is an abbreviation for Tree Node Index Map. It records the mapping relationship between a node's unique identifier and the subscript of the tree-structured tiled array. `Map` represents a key-value mapping structure. For example: treeNodeIdxMap = { "P1": 0, "L1": 1, "K1": 2, "C1": 3, "C2": 4 } The above-described tree structure's tiling index corresponds to the node location index. When parsing the access instruction carrying the target node identifier K1, querying K1 through `treeNodeIdxMap` yields the target node position 2; then accessing index 2 in `treeNodesIdx` retrieves the target standard node entry {nodeId:"K1", parentId:"L1", level:2, content: knowledge point node content}. This process transforms "finding a node based on its ID" into a two-stage access process of "obtaining an array index through a hash mapping, and then reading the standard node entry based on the array index." The hash mapping represents a data structure for location based on key-value relationships. In this embodiment, the key is the unique identifier of the node, and the value is the node position. Through this two-stage access process, it is not necessary to start from P1 and proceed layer by layer to L1, K1, and then read the node content of K1.

[0096] In this embodiment, the downlink relationship index can be represented by a forward-linked list, `treeMap`, which is an abbreviation for Tree Map and is used to record the mapping relationship from parent node IDs to child node ID arrays. The child node ID arrays in the forward-linked list are arranged in their original order. For example: treeMap = { "P1": ["L1"], "L1": ["K1"], "K1": ["C1", "C2"] } The above forward relationship list corresponds to the downward relationship index. When generating the forward relationship list, the standardized node list is traversed to identify all nodes with child nodes, that is, to identify standard node entries whose childIds are not empty. Then, the nodeId of the standard node entry is used as the query key, and the childIds of the standard node entry is used as the query value. The childIds of leaf nodes C1 and C2 are empty, so C1 and C2 are not used as query keys in the forward relationship list. When the target relationship direction is downward and the target node is identified as K1, the target node position of K1 is first determined to be 2 through treeNodeIdxMap, then the target standard node entry of K1 is read through treeNodesIdx, and then K1 is used to query treeMap to obtain the unique identifier sequence of direct child nodes ["C1", "C2"]. C1 and C2 in the direct child node unique identifier sequence are then entered into treeNodeIdxMap to obtain the direct child node positions 3 and 4. Finally, positions 3 and 4 in treeNodesIdx are accessed to read the content of the direct child nodes corresponding to C1 and C2.

[0097] In this embodiment, the uplink relationship index can be represented by a reverse relationship linked list, navMap, which is short for Navigation Map. It records the mapping relationship between child node IDs, parent node IDs, and position indices. Here, Navigation represents the navigation relationship, and Map represents a key-value mapping structure. In the reverse relationship linked list, ParentId represents the parent node ID, and Index represents the position index of the child node in the parent node's child node list. For example: navMap = { "L1": {ParentId:"P1", Index:0}, "K1": {ParentId:"L1", Index:0}, "C1": {ParentId:"K1", Index:0}, "C2": {ParentId:"K1", Index:1} } The above reverse relationship list corresponds to the uplink relationship index. When generating the reverse relationship list, all nodes in the standardized node list are traversed. The parentId of the course root node P1 is empty, so P1 is not entered into the navMap. For L1, the nodeId is extracted as the query key, P1 in the parentId is extracted as the ParentId, and the position index of L1 in the child node list of P1 is recorded as 0. For K1, the nodeId is extracted as the query key, L1 in the parentId is extracted as the ParentId, and the position index of K1 in the child node list of L1 is recorded as 0. For C1 and C2, their ParentId is recorded as K1, and their indices are 0 and 1, respectively. The position index is used to verify the position of a child node in the childIds of its parent node. For example, if the index of C2 in navMap is 1, and the child node ID array of K1 in treeMap is ["C1","C2"], and C2 is located at position 1 in the child node ID array, when the two are consistent, the reverse relationship from C2 to K1 and the forward relationship from K1 to C2 can be mutually verified.

[0098] In this embodiment, if the parsed access instruction indicates obtaining the breadcrumb navigation path of the current content unit node C2, then the target node is identified as C2, and the access direction is marked as the uplink direction. First, C2 is queried through treeNodeIdxMap to obtain the target node position 4, and then the target standard node entry corresponding to C2 is read through treeNodesIdx. Subsequently, C2 is queried through navMap to obtain ParentId as K1 and Index as 1; then K1 is queried through navMap to obtain ParentId as L1 and Index as 0; then L1 is queried through navMap to obtain ParentId as P1 and Index as 0; when P1 is queried through navMap, since P1 is the course root node, there is no uplink relationship index entry, and the tracing ends. This yields the upward path C2, K1, L1, P1 from the current node to the course root node. When used for page display, this upward path can be reversed to P1, L1, K1, C2, forming a breadcrumb navigation path for the course root node, lesson node, knowledge point node, and content unit node.

[0099] In this embodiment, if the parsed access instruction indicates retrieving the list of child nodes of the current knowledge point node K1, then the target node is identified as K1, and the access direction is marked as the downlink direction. First, the target node position 2 of K1 is obtained through `treeNodeIdxMap`, then position 2 in `treeNodesIdx` is accessed to obtain the target standard node entry for K1; subsequently, the array of child node IDs corresponding to K1 in `treeMap` is queried to obtain ["C1", "C2"]; then, `C1` and `C2` are used to query `treeNodeIdxMap` respectively to obtain positions 3 and 4; finally, positions 3 and 4 in `treeNodesIdx` are accessed to obtain the complete node content of C1 and C2. This process corresponds to the process of obtaining the child node list in the unified interface, that is, querying the forward relational linked list to obtain the array of child node IDs, and then reading the complete node data by retrieving the node based on the ID.

[0100] In this embodiment, if the parsed access instruction indicates retrieving the parent node of the current knowledge point node K1, then the target node is identified as K1, and the access direction is marked as the upward direction, but only one parent node needs to be read. First, the target node position 2 of K1 is queried through `treeNodeIdxMap`, then `treeNodesIdx` is accessed to read the target standard node entry of K1; subsequently, K1 is used to query `navMap` to obtain ParentId as L1; then L1 is used to query `treeNodeIdxMap` to obtain the parent node position 1; finally, position 1 in `treeNodesIdx` is accessed to obtain the parent node content corresponding to L1. This process corresponds to the process of obtaining the parent node in the unified interface, that is, querying the reverse relational list to obtain the parent node ID, and then reading the parent node data by retrieving the node based on the ID.

[0101] In this embodiment, if the parsed access instruction indicates retrieving the next learning node of the current knowledge point node K1, then the target node is identified as K1, and the access direction is marked with the corresponding sequential direction. First, K1 is queried through `treeNodeIdxMap` to obtain the target node position 2; then, the next node position 3 is determined based on the adjacent positions of the target node position in the sequential tiling index; subsequently, position 3 in `treeNodesIdx` is accessed to read the adjacent standard node entries and node content corresponding to C1. This process corresponds to the process of retrieving the next learning node in the unified interface, i.e., querying the tree structure tiling index to obtain the current index, incrementing the index by 1, and then accessing the tree structure tiling array to obtain the next node. For course content access scenarios with more reads than writes, the above process can determine the next learning node without re-executing a depth-first traversal.

[0102] In this embodiment, the path verification flag can be generated based on the mutual reference relationship between treeNodesIdx, treeNodeIdxMap, treeMap, and navMap. Taking the breadcrumb navigation path of C2 as an example, the parentId of C2 in navMap is read as K1, and the index is 1; then the child node ID array ["C1", "C2"] corresponding to K1 in treeMap is read, and the node at position 1 in the child node ID array is confirmed to be C2; ​​at the same time, the node at position 4 corresponding to C2 in treeNodeIdxMap is read, and the nodeId at position 4 in treeNodesIdx is confirmed to be C2. When all three relationships are consistent, the path verification flag is in a passed state. If the parentId of C2 in navMap is K1, but the child node ID array of K1 in treeMap does not contain C2, or the position of C2 in treeNodeIdxMap is inconsistent with the corresponding nodeId in treeNodesIdx, then the path verification flag is in a failed state. After the path verification flag is entered into the parsing results, it can be used to distinguish between path data that can be used directly and abnormal path items that need to be isolated.

[0103] In this embodiment, the parsing results can be organized according to node data items, path data items, and trusted location items. For example, when the learning machine terminal requests to display the content unit page of C2 and generates a breadcrumb navigation path, the node data item can store the content of C2, that is, the content of the content unit node C2; ​​the path data item can store the breadcrumb navigation path of P1, L1, K1, and C2; and the trusted location item can store the source node identifier C2 and the path verification mark. If the path verification mark is in a passed state, the learning machine terminal can display the navigation path between the course root node, lesson node, knowledge point node, and content unit node according to the path data item; if the path verification mark is in a failed state, the corresponding associated node path is marked as an abnormal path item, and the abnormal path item is included in the parsing result, so that the page can continue to display the C2 content in the node data item, while avoiding the use of the path that failed the verification for course jump.

[0104] In this embodiment, if the course content is updated, for example, a new content unit node C3 is added under K1, where C3 represents the unique identifier of the third content unit node, then the updated tree data corresponding to the course type identifier is received. The updated tree data is parsed according to the original JSON hierarchical parsing rules to obtain the updated node sequence. In the updated node sequence, the childIds of K1 can be changed from ["C1","C2"] to ["C1","C2","C3"], and {nodeId:"C3", parentId:"K1",level:3, content:content of content unit node C3} is added. An updated hierarchical path signature is generated based on the updated node sequence, and the updated hierarchical path signature is compared with the standard hierarchical path signature generated by the original standard node sequence to determine that the affected node segments include K1, C1, C2, and C3. Subsequently, the sequential tiling index fragment, node positioning index fragment, downlink relationship index fragment, and uplink relationship index fragment corresponding to the affected node segments are regenerated. In the updated treeMap, the child node ID array corresponding to K1 is ["C1","C2","C3"], and in the updated navMap, C3 corresponds to {ParentId:"K1",Index:2}. The updated treeNodeIdxMap records the new array position for C3. After writing these local index fragments back to the multi-direction reference index record, the new parsing access instructions can obtain the node content, parent node content, or breadcrumb navigation path based on C3.

[0105] In this embodiment, if the course type is expanded from synchronous courses to topic-based courses, adding a new course type only requires adding the corresponding JSON hierarchical parsing rules for topic-based courses to the registered field adaptation table, and defining the number of levels for this course type, the JSON field names for each level, the node ID field mapping, and the parent-child relationship field mapping. The parsing process still first reads the JSON hierarchical parsing rules based on the course type identifier, then generates a standardized node list, and subsequently generates treeNodesIdx, treeNodeIdxMap, treeMap, and navMap. Since the standardized node list is unified as nodeId, parentId, childIds, level, and content, adding a new course type will not change the generation process of the four-dimensional index data structure, nor will it change the unified interface processing process for obtaining nodes by ID, obtaining the child node list, obtaining the parent node, obtaining the breadcrumb navigation path, and obtaining the next learning node. This implementation method restricts the differences between different course types to the JSON hierarchical parsing rules, and the subsequent index construction and query processes remain consistent.

[0106] like Figure 2 As shown, this application discloses a data parsing apparatus, comprising: The request retrieval unit is configured to retrieve the tree data to be parsed, the parsing type identifier, and the parsing access instruction in response to a parsing request for tree data; The rule determination unit is configured to determine the hierarchical field rules that match the parsing type identifier; The sequence generation unit is configured to identify the node fields and node relationship fields in the tree data to be parsed layer by layer according to the hierarchical field rules, and generate a standard node sequence. The index generation unit is configured to generate multi-directional cross-reference index records based on the standard node sequence, wherein the multi-directional cross-reference index records associate node content, node position, and node hierarchy with the unique identifier of the same node. The access positioning unit is configured to determine the target node location and target relationship direction from the multi-directional mutual reference index record according to the parsed access instruction; The content path processing unit is configured to read node content according to the target node position and complete the associated node path according to the target relationship direction; The verification mark generation unit is configured to generate a path verification mark based on the associated node path and the multi-directional cross-reference index record; The result generation unit is configured to generate a parsing result, which includes the source node identifier and the path verification flag.

[0107] like Figure 3 As shown, an electronic device according to an embodiment of this application includes a processor and a memory. The memory stores a computer program, which, when executed by the processor, implements the data parsing method described above.

[0108] like Figure 4 As shown, this is a computer-readable storage medium according to an embodiment of the present application. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the data parsing method described above.

[0109] like Figure 5 As shown, this is an embodiment of a learning machine course tree data parsing system according to this application, including a learning machine terminal, a course tree data storage server, and a data parsing server; The learning machine terminal is configured to generate a parsing request for tree-shaped data in response to a course node access operation. The parsing request carries a parsing type identifier and a parsing access instruction, and receives the parsing result. The course tree data storage server is configured to store tree data to be parsed corresponding to the parsing type identifier, and to provide the tree data to be parsed to the data parsing server; The data parsing server is configured to acquire the tree data to be parsed, the parsing type identifier, and the parsing access instruction; determine the hierarchical field rules matching the parsing type identifier; identify the node fields and node relationship fields in the tree data to be parsed layer by layer according to the hierarchical field rules, and generate a standard node sequence; generate a multi-directional mutual reference index record based on the standard node sequence; determine the target node position and target relationship direction from the multi-directional mutual reference index record according to the parsing access instruction; read the node content according to the target node position and complete the associated node path according to the target relationship direction; generate a path verification mark according to the associated node path and the multi-directional mutual reference index record; generate a parsing result containing the source node identifier and the path verification mark, and send the parsing result to the learning machine terminal. The learning machine terminal is also configured to display course node content, course node path, or the next course node entry based on the parsing results.

[0110] Figures 2-5 For an exemplary description, please refer to the above. Figure 1 This will not be elaborated upon here.

Claims

1. A data parsing method, characterized in that, include: In response to a request to parse tree data, obtain the tree data to be parsed, the parsing type identifier, and the parsing access instructions; Determine the hierarchical field rules that match the parsing type identifier, and identify the node fields and node relationship fields in the tree data to be parsed layer by layer according to the hierarchical field rules to generate a standard node sequence; A multi-directional mutual reference index record is generated based on the standard node sequence. The multi-directional mutual reference index record associates node content, node position, and node hierarchy with the unique identifier of the same node. Based on the parsing access instruction, determine the target node position and target relationship direction from the multi-directional mutual reference index record; Read the node content according to the target node position, complete the associated node path according to the target relationship direction, and generate a path verification mark based on the associated node path and the multi-directional mutual reference index record; Generate a parsing result, which includes the source node identifier and the path verification flag.

2. The data parsing method according to claim 1, characterized in that, The rule for determining the hierarchical field that matches the parsing type identifier includes: Read the registered field adaptation table, which records the correspondence between the parsing type identifier and the candidate level chain; Based on the parsing type identifier, determine the candidate hierarchical chain from the registered field adaptation table; Perform root-level validation on the field names in the candidate hierarchy chain, and then perform sub-level validation based on the root-level validation result to generate the hierarchy field rules. The hierarchical field rules define the reading order of the node unique identifier field, parent node pointer field, and child node entry field in each level, and are used to identify the node fields and node relationship fields in the tree data to be parsed.

3. The data parsing method according to claim 2, characterized in that, The step of identifying the node fields and node relationship fields in the tree data to be parsed layer by layer according to the hierarchical field rules, and generating a standard node sequence, includes: According to the hierarchical field rules, the initial node fragment is read from the root level of the tree data to be parsed; Based on the child node entry field in the hierarchy field rules, obtain the child node fragments of the initial node fragment and generate a queue of node fragments to be accessed; For the node fragments in the queue of node fragments to be accessed, extract the unique node identifier according to the unique node identifier field, extract the parent node pointer identifier according to the parent node pointer field, generate a node level marker according to the level of the node fragment, and generate the original content pointer according to the storage location of the node fragment in the tree data to be parsed. Standard node entries are generated based on the node's unique identifier, the parent node's pointer identifier, the node's hierarchy marker, and the original content pointer. The standard node entries are sorted according to the order in which the node fragments are accessed, thereby generating the standard node sequence.

4. The data parsing method according to claim 3, characterized in that, The generation of the standard node sequence also includes: A hierarchical path signature is generated based on the unique node identifier and parent node pointer identifier recorded in the standard node entries of the standard node sequence. When the same node unique identifier corresponds to different hierarchical path signatures, a conflict node identifier is generated based on the parsing type identifier and the hierarchical path signature; Replace the corresponding unique node identifier with the conflict node identifier, and write the replaced unique node identifier into the corresponding standard node entry. Use the replaced unique node identifier as the locator key of the standard node entry. Generate a standard node sequence with a unique locator key based on the standard node entry with the unique identifier of the replaced node.

5. The data parsing method according to claim 4, characterized in that, The generation of multi-directional cross-reference index records based on the standard node sequence includes: Generate a sequential tiled index based on the access order of a standard node sequence with a unique locating key; Generate a node positioning index based on the position of each standard node entry in the sequential tiling index; Generate a downlink index and an uplink index based on the parent node pointer in each standard node entry; Based on the mutual referencing relationship corresponding to the unique identifier of the same node in the sequential tiling index, the node positioning index, the downlink relationship index, and the uplink relationship index, a mutual referencing check code is generated; The multi-directional mutual referencing index record is generated based on the sequential tiling index, the node positioning index, the downlink relationship index, the uplink relationship index, and the mutual referencing check code. The multi-directional mutual referencing index record is used to determine the target node position and the target relationship direction.

6. The data parsing method according to claim 5, characterized in that, The step of generating a sequentially tiled index based on the access order of the standard node sequence includes: Based on the standard node sequence, the hierarchical field rules, and the parent node pointer identifier, the standard node entry corresponding to the root node is configured as the starting entry; After accessing the current standard node entry, the next standard node entry to be accessed is determined according to the child node entry field in the hierarchy field rules. When there is no unvisited next standard node entry for the current standard node entry, return to the previous level along the parent node pointer and determine the next sibling node, and configure the standard node entry corresponding to the next sibling node as the new current standard node entry. The sequential tiling index is generated based on the obtained access order, and the sequential tiling index records the node position corresponding to each standard node entry.

7. A data parsing device, characterized in that, include: The request retrieval unit is configured to retrieve the tree data to be parsed, the parsing type identifier, and the parsing access instruction in response to a parsing request for tree data; The rule determination unit is configured to determine the hierarchical field rules that match the parsing type identifier; The sequence generation unit is configured to identify the node fields and node relationship fields in the tree data to be parsed layer by layer according to the hierarchical field rules, and generate a standard node sequence. The index generation unit is configured to generate multi-directional cross-reference index records based on the standard node sequence, wherein the multi-directional cross-reference index records associate node content, node position, and node hierarchy with the unique identifier of the same node. The access positioning unit is configured to determine the target node location and target relationship direction from the multi-directional mutual reference index record according to the parsed access instruction; The content path processing unit is configured to read node content according to the target node position and complete the associated node path according to the target relationship direction; The verification mark generation unit is configured to generate a path verification mark based on the associated node path and the multi-directional cross-reference index record; The result generation unit is configured to generate a parsing result, which includes the source node identifier and the path verification flag.

8. An electronic device, characterized in that, It includes a processor and a memory, wherein the memory stores a computer program that, when executed by the processor, implements the data parsing method as described in any one of claims 1 to 9.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the data parsing method as described in any one of claims 1 to 9.

10. A learning machine course tree data parsing system, characterized in that, This includes learning machine terminals, a course tree-structured data storage server, and a data parsing server; The learning machine terminal is configured to generate a parsing request for tree-shaped data in response to a course node access operation. The parsing request carries a parsing type identifier and a parsing access instruction, and receives the parsing result. The course tree data storage server is configured to store tree data to be parsed corresponding to the parsing type identifier, and to provide the tree data to be parsed to the data parsing server; The data parsing server is configured to acquire the tree data to be parsed, the parsing type identifier, and the parsing access instruction; determine the hierarchical field rules matching the parsing type identifier; identify the node fields and node relationship fields in the tree data to be parsed layer by layer according to the hierarchical field rules, and generate a standard node sequence; generate a multi-directional mutual reference index record based on the standard node sequence; determine the target node position and target relationship direction from the multi-directional mutual reference index record according to the parsing access instruction; read the node content according to the target node position and complete the associated node path according to the target relationship direction; generate a path verification mark according to the associated node path and the multi-directional mutual reference index record; generate a parsing result containing the source node identifier and the path verification mark, and send the parsing result to the learning machine terminal. The learning machine terminal is also configured to display course node content, course node path, or the next course node entry based on the parsing results.