Data processing method and device, medium and electronic equipment
By determining the leaf node path and node to be merged in the tree structure data and merging it into the target node, the problems of low merging efficiency and high workload in the existing technology are solved, and efficient data maintenance and storage are achieved.
Patent Information
- Application Number
- CN202411039885.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-11-15
AI Technical Summary
The prior art in the course data stored in tree structures, the merge efficiency is inefficient and the workload is high, resulting in high data storage and maintenance complexity.
By receiving data merging instructions, the leaf node path information in the tree structure data is determined, and the node to be merged is determined from multiple leaf nodes based on the specified data, the node to be merged into the target node, and the target tree structure data is constructed.
It improves the efficiency of merging data in tree structure, simplifies the data processing process, reduces the complexity and workload of data maintenance, and improves the efficiency of data maintenance.
Smart Images

Figure CN118964354A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular, to a data processing method, device, medium and electronic device. Background Art
[0002] At present, course data is stored in a tree structure. With the promotion of quality-oriented education, a large amount of course data needs to be sealed. If it is stored in a complex tree structure, it is not conducive to saving data storage space and data maintenance. In order to further reduce the amount of data stored, it is necessary to effectively merge the complex tree structure. However, the current merging method has problems such as large workload and low merging efficiency. Summary of the invention
[0003] In order to achieve the above objectives, the present disclosure provides a data processing method, device, medium and electronic device.
[0004] According to a first aspect of an embodiment of the present disclosure, a data processing method is provided, the method comprising: In response to receiving the data merge instruction, determining path information corresponding to a plurality of leaf nodes in the current tree structure data; In a case where it is determined that the path information includes the specified data, determining a plurality of nodes to be merged from the plurality of leaf nodes according to the specified data; The multiple nodes to be merged are merged into a target node to obtain merged target tree structure data.
[0005] Optionally, the specified data includes a plurality of preset tags, and determining a plurality of nodes to be merged from the plurality of leaf nodes according to the specified data includes: Determining a designated path for each leaf node in the plurality of leaf nodes; In the case that the designated path of the leaf node includes the preset label, the leaf node is used as the node to be merged, so as to obtain the multiple nodes to be merged corresponding to the multiple preset labels.
[0006] Optionally, merging the multiple nodes to be merged into a target node to obtain merged target tree structure data includes: Using the node data corresponding to the multiple nodes to be merged as the node data of the target node; Determine the parent nodes corresponding to the multiple nodes to be merged; A hierarchical relationship between the target node and the parent node is constructed to obtain the target tree structure data.
[0007] Optionally, before determining the path information corresponding to the plurality of leaf nodes in the current tree structure data in response to receiving the data merging instruction, the method further comprises: In the case of determining that a data storage instruction triggered by a user is received, the data storage instruction includes a path to be stored and data to be stored, and determining a target storage node from the standby tree structure data according to the path to be stored; In the case where it is determined that the data to be stored is stored in the target storage node, the data merging instruction is generated.
[0008] Optionally, the method further comprises: In the case where it is determined that a data query instruction triggered by a user is received, the data query instruction includes multi-level path identifiers, and the data to be queried is determined from the specified tree structure data according to the multi-level path identifiers.
[0009] Optionally, determining the data to be queried from the specified tree structure data according to the multi-level path identifiers includes: In the case where it is determined that the bottom-level identifier in the path identifier is not a node identifier in the specified tree structure data, determining the next bottom-level identifier in the path identifier; If it is determined that the secondary bottom layer identifier in the path identifier is a node identifier in the specified tree structure data, a target search node is determined in the specified tree structure data according to the secondary bottom layer identifier; The data to be queried is determined in the data corresponding to the target search node.
[0010] Optionally, determining the data to be queried from the specified tree structure data according to the multi-level path identifiers includes: In the case where it is determined that the bottom-level identifier in the path identifier is a node identifier in the specified tree structure data, determining a target search node in the specified tree structure data according to the bottom-level identifier; The data to be queried is determined in the data corresponding to the target search node.
[0011] Optionally, after determining the data to be queried in the data corresponding to the target search node, the method further includes: Generate a split node corresponding to the path identifier, and store the data to be queried in the split node; The data to be queried in the target search node is deleted, and the target search node is used as the parent node of the split node to obtain the tree structure data after splitting.
[0012] According to a second aspect of an embodiment of the present disclosure, a data processing device is provided, the device comprising: A first determination module is configured to determine path information corresponding to a plurality of leaf nodes in the current tree structure data in response to receiving a data merging instruction; A second determining module is configured to determine a plurality of nodes to be merged from the plurality of leaf nodes according to the specified data when it is determined that the path information contains the specified data; The third determining module is configured to merge the multiple nodes to be merged into a target node to obtain merged target tree structure data.
[0013] Optionally, the specified data includes a plurality of preset tags, and the second determining module is configured to: Determining a designated path for each leaf node in the plurality of leaf nodes; In the case that the designated path of the leaf node includes the preset label, the leaf node is used as the node to be merged, so as to obtain the multiple nodes to be merged corresponding to the multiple preset labels.
[0014] Optionally, the third determining module is configured to: Using the node data corresponding to the multiple nodes to be merged as the node data of the target node; Determine the parent nodes corresponding to the multiple nodes to be merged; A hierarchical relationship between the target node and the parent node is constructed to obtain the target tree structure data.
[0015] Optionally, the first determining module is configured to: In the case of determining that a data storage instruction triggered by a user is received, the data storage instruction includes a path to be stored and data to be stored, and determining a target storage node from the standby tree structure data according to the path to be stored; In the case where it is determined that the data to be stored is stored in the target storage node, the data merging instruction is generated.
[0016] Optionally, the device further comprises: The fourth determination module is configured to determine the data to be queried from the specified tree structure data according to the multi-level path identifiers when it is determined that a data query instruction triggered by a user is received, and the data query instruction includes multi-level path identifiers.
[0017] Optionally, the fourth determining module is configured to: In the case where it is determined that the bottom-level identifier in the path identifier is not a node identifier in the specified tree structure data, determining the next bottom-level identifier in the path identifier; If it is determined that the secondary bottom layer identifier in the path identifier is a node identifier in the specified tree structure data, a target search node is determined in the specified tree structure data according to the secondary bottom layer identifier; The data to be queried is determined in the data corresponding to the target search node.
[0018] Optionally, after determining the data to be queried in the data corresponding to the target search node, the device further includes: A generating module is configured to generate a split node corresponding to the path identifier, and store the data to be queried in the split node; The fifth determining module is configured to delete the to-be-queried data in the target search node, and use the target search node as the parent node of the split node to obtain the split tree structure data.
[0019] Optionally, the fourth determining module is configured to: In the case where it is determined that the bottom-level identifier in the path identifier is a node identifier in the specified tree structure data, determining a target search node in the specified tree structure data according to the bottom-level identifier; The data to be queried is determined in the data corresponding to the target search node.
[0020] According to a third aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the data processing method provided in the first aspect of the present disclosure are implemented.
[0021] According to a fourth aspect of an embodiment of the present disclosure, there is provided an electronic device, including: a memory having a computer program stored thereon; A processor is used to execute the computer program in the memory to implement the steps of the data processing method provided in the first aspect of the present disclosure.
[0022] The above technical scheme determines the path information corresponding to multiple leaf nodes in the current tree structure data in response to receiving a data merge instruction. When it is determined that the path information contains specified data, multiple nodes to be merged are determined from the multiple leaf nodes according to the specified data, and the multiple nodes to be merged are merged into a target node to obtain the merged target tree structure data. In this way, multiple nodes to be merged can be accurately determined from multiple leaf nodes through the specified data, and the merged target tree structure data can be effectively obtained by merging multiple nodes to be merged into a target node. The merging efficiency of the tree structure data can be improved, the process of data processing operations can be simplified, and the complexity of data maintenance can be reduced, thereby effectively reducing the workload of data maintenance and improving the efficiency of data maintenance.
[0023] Other features and advantages of the present disclosure will be described in detail in the following detailed description. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure but do not constitute a limitation of the present disclosure. In the accompanying drawings: Figure 1 is a schematic diagram of tree structure data according to an exemplary embodiment; Figure 2 is a flow chart of a data processing method according to an exemplary embodiment; Figure 3 is a flow chart of another data processing method according to an exemplary embodiment; Figure 4 is a flow chart of another data processing method according to an exemplary embodiment; Figure 5 is a flow chart of another data processing method according to an exemplary embodiment; Figure 6 is a schematic diagram of a data processing device according to an exemplary embodiment; Figure 7 is a block diagram of an electronic device 700 according to an exemplary embodiment; Figure 8 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION
[0025] The specific implementation of the present disclosure is described in detail below in conjunction with the accompanying drawings. It should be understood that the specific implementation described herein is only used to illustrate and explain the present disclosure, and is not used to limit the present disclosure.
[0026] Before describing the specific implementation methods of the present disclosure, first, the application scenario of the present disclosure is described. The present disclosure is applied to a course data management system. Traditional education courses focus on imparting single knowledge and cultivating students' test-taking ability. However, with the development of society, single knowledge and test-taking ability cannot meet the society's demand for talents. People pay more and more attention to cultivating students' quality education. It is necessary to seal a large amount of course data in the past through a tree structure. Figure 1 is a schematic diagram of tree structure data according to an exemplary embodiment. Figure 1As shown, the use of a complex tree structure to store course data is not conducive to saving data storage space or data maintenance. In order to further reduce the amount of data stored, the complexity of the tree structure can be reduced by merging. However, the current merging method has problems such as large workload and low merging efficiency.
[0027] To solve the above problems, the present disclosure provides a data processing method, device, medium and electronic device, the data processing method comprising: in response to receiving a data merging instruction, determining the path information corresponding to multiple leaf nodes in the current tree structure data, and in the case of determining that the path information contains the specified data, determining multiple nodes to be merged from the multiple leaf nodes according to the specified data, merging the multiple nodes to be merged into the target node, so as to obtain the merged target tree structure data. By responding to receiving a data merging instruction, determining the path information corresponding to multiple leaf nodes in the current tree structure data, and in the case of determining that the path information contains the specified data, determining multiple nodes to be merged from the multiple leaf nodes according to the specified data, merging the multiple nodes to be merged into the target node, so as to obtain the merged target tree structure data. It is possible to accurately determine multiple nodes to be merged from multiple leaf nodes through the specified data, and effectively obtain the merged target tree structure data by merging multiple nodes to be merged into the target node, which can improve the merging efficiency of the tree structure data, simplify the process of data processing operations, and reduce the complexity of data maintenance, thereby effectively reducing the workload of data maintenance and improving the efficiency of data maintenance.
[0028] Figure 2 is a flow chart of a data processing method according to an exemplary embodiment. Figure 2 As shown, the data processing method may include the following steps: In step 201, in response to receiving a data merge instruction, path information corresponding to a plurality of leaf nodes in the current tree structure data is determined.
[0029] The path information can be understood as the identification sequence from the root node to the leaf node in the tree structure data, for example: Figure 1 In the tree structure data shown, the leaf node can be Chinese, and the path information corresponding to the Chinese node can be high school department->high school grade->A system->A1->tenth grade->regular face-to-face teaching->Chinese. The leaf node can be eleventh grade, and the path information corresponding to the tenth grade node can be high school department->high school grade->A system->A1->eleventh grade.
[0030] In step 202, when it is determined that the path information includes designated data, a plurality of nodes to be merged are determined from the plurality of leaf nodes according to the designated data.
[0031] The specified data includes a plurality of preset labels, which may be node identifiers of leaf nodes in the current tree structure data, for example, the preset labels may be Chinese, mathematics, English, and physics, etc., or may be grade 10, grade 11, and grade 12, etc. The specific implementation method of determining a plurality of nodes to be merged from the plurality of leaf nodes according to the specified data in this step may be to determine a specified path for each of the plurality of leaf nodes; and when the specified path of the leaf node includes the preset label, the leaf node is used as the node to be merged, so as to obtain the plurality of nodes to be merged corresponding to the plurality of preset labels.
[0032] It should be noted that, when it is determined that the path information does not contain the specified data, the data in the current tree structure data is not merged, and the process of the data processing method can be terminated.
[0033] For example, the specified data may include language preset tags, mathematics preset tags, English preset tags, physics preset tags, geography preset tags, politics preset tags, history preset tags, biology preset tags, and chemistry preset tags, such as Figure 1 As shown, the current tree structure data may include data as shown in Table 1:
[0034] Table 1 As shown in Table 1, the path information in the current tree structure data can be high school->high school grade->A system->A1->tenth grade->regular face-to-face teaching, and the leaf nodes corresponding to the path information include Chinese, mathematics, English, physics, geography, politics, history and chemistry. It can be determined that the specified path of the Chinese leaf node is high school->high school grade->A system->A1->tenth grade->regular face-to-face teaching->Chinese, the specified path of the mathematics leaf node is high school->high school grade->A system->A1->tenth grade->regular face-to-face teaching->mathematics, the specified path of the English leaf node is high school->high school grade->A system->A1->tenth grade->regular face-to-face teaching->English, the specified path of the physics leaf node is high school->high school grade->A system->A1->tenth grade->regular face-to-face teaching->physics, the specified path of the geography leaf node is high school->high school grade->A system->A1->tenth grade->regular face-to-face teaching->geography, and the specified path of the politics leaf node is high school->high school grade->A system->A1->tenth grade-> Conventional face-to-face teaching->Politics, the specified paths of the history leaf nodes are high school->high school grade->A system->A1->tenth grade->conventional face-to-face teaching->history, the specified path of the biology leaf node is high school->high school grade->A system->A1->tenth grade->conventional face-to-face teaching->biology, and the specified path of the chemistry leaf node is high school->high school grade->A system->A1->tenth grade->conventional face-to-face teaching->chemistry. The specified path of the leaf node includes the Chinese preset label, mathematics preset label, English preset label, physics preset label, geography preset label, politics preset label, history preset label, biology preset label and chemistry preset label in the specified data. The Chinese leaf node, mathematics leaf node, English leaf node, physics leaf node, geography leaf node, politics leaf node, history leaf node and chemistry leaf node can be used as nodes to be merged to obtain the nodes to be merged corresponding to the Chinese preset label, mathematics preset label, English preset label, physics preset label, geography preset label, politics preset label, history preset label, biology preset label and chemistry preset label.
[0035] In step 203, the multiple nodes to be merged are merged into a target node to obtain merged target tree structure data.
[0036] The specific implementation of this step can be to use the node data corresponding to the multiple nodes to be merged as the node data of the target node, determine the parent nodes corresponding to the multiple nodes to be merged, and construct a hierarchical relationship between the target node and the parent node to obtain the target tree structure data. The parent nodes corresponding to the multiple nodes to be merged can be used as the target node, or the target node can be obtained by deleting the multiple nodes to be merged and creating new child nodes in the parent nodes corresponding to the multiple nodes to be merged.
[0037] By way of example, the plurality of nodes to be merged may include a Chinese node, a mathematics node, an English node, a physics node, a geography node, a political node, a history node, a biology node, and a chemistry node. The node data corresponding to the Chinese node, the mathematics node, the English node, the physics node, the geography node, the political node, the history node, the biology node, and the chemistry node may be used as the node data of the target node. The parent nodes corresponding to the Chinese node, the mathematics node, the English node, the physics node, the geography node, the political node, the history node, the biology node, and the chemistry node may be determined to be regular face-to-face teaching nodes. A hierarchical relationship between the target node and the regular face-to-face teaching node may be constructed, that is, the regular face-to-face teaching node may be level 6, the target node may be level 6, and the target tree structure data may be obtained. The target tree structure data may be high school department->high school grade->A system->A1->tenth grade->regular face-to-face teaching, wherein the path information of high school department->high school grade->A system->A1->tenth grade->regular face-to-face teaching stores all subject data contained in the specified data. The target node may also be level 7, and the target tree structure data including the path information of high school department->high school grade->A system->A1->tenth grade->regular face-to-face teaching is obtained.
[0038] The above technical scheme can accurately determine multiple nodes to be merged from multiple leaf nodes by specifying data, and effectively obtain the merged target tree structure data by merging multiple nodes to be merged into target nodes. It can improve the merging efficiency of tree structure data, simplify the process of data processing operations, and reduce the complexity of data maintenance, thereby effectively reducing the workload of data maintenance and improving the efficiency of data maintenance.
[0039] Figure 3 is a flowchart of another data processing method according to an exemplary embodiment. Figure 1 Before step 201 shown in FIG. Figure 3 As shown, the data processing method may further include the following steps: In step 301, when it is determined that a data storage instruction triggered by a user is received, the data storage instruction includes a path to be stored and data to be stored, and a target storage node is determined from the standby tree structure data according to the path to be stored.
[0040] The target storage node can be understood as a node in the tree structure data to be used corresponding to the last path identifier in the path to be stored. The tree structure data to be used can be understood as pre-stored tree structure data.
[0041] It should be noted that when a data storage instruction is received, all nodes of the tree structure data to be used can be searched through the path to be stored in the data storage instruction, the target storage node can be determined from the tree structure data to be used, and the data to be stored in the data storage instruction can be stored to the searched target storage node.
[0042] For example, the path to be stored in the data storage instruction can be high school->high school grade->A system->A1->tenth grade->regular face-to-face teaching->Chinese, and the data to be stored in the data storage instruction can be video data of the Chinese subject. Through high school->high school grade->A system->A1->tenth grade->regular face-to-face teaching->Chinese, the corresponding high school node, high school grade node, A system node, A1 node, tenth grade node, regular face-to-face teaching node and Chinese node are searched in the standby tree structure data in turn. When the Chinese node corresponding to the Chinese identifier in the path to be stored is found in the standby data structure data, the Chinese node is used as the target storage node, and the video data of the Chinese subject is stored in the Chinese node. When the tenth grade node corresponding to the tenth grade in the path to be stored is found in the standby data structure data, and the regular face-to-face teaching node corresponding to the regular face-to-face teaching in the path to be stored is not found, the regular face-to-face teaching node and the Chinese node are added in the tenth grade node in accordance with the hierarchical relationship, the newly added Chinese node is used as the target storage node, and the video data of the Chinese subject is stored in the Chinese node.
[0043] In step 302, when it is determined that the data to be stored is to be stored in the target storage node, the data merging instruction is generated.
[0044] It should be noted that, when the data to be stored is stored in the target storage node, it is determined whether the data in the tree structure data to be used can be merged, and the above is executed by generating a data merging instruction. Figure 2 In the steps shown, the tree structure data of the data to be stored is stored in the target storage node as the current tree structure data. When it is determined that the path information corresponding to multiple leaf nodes in the current tree structure data contains specified data, multiple nodes to be merged are determined from the multiple leaf nodes according to the specified data, and the multiple nodes to be merged are merged into the target node to obtain the merged target tree structure data; when it is determined that the path information corresponding to multiple leaf nodes in the current tree structure data does not contain the specified data, the data in the current tree structure data is not merged.
[0045] The above technical scheme can accurately determine multiple nodes to be merged from multiple leaf nodes by specifying data, and effectively obtain the merged target tree structure data by merging multiple nodes to be merged into target nodes. It can improve the merging efficiency of tree structure data, simplify the process of data processing operations, and reduce the complexity of data maintenance, thereby effectively reducing the workload of data maintenance and improving the efficiency of data maintenance.
[0046] Figure 4 is a flowchart of another data processing method according to an exemplary embodiment. Figure 4 As shown, the data processing method may further include the following steps: In step 401, when it is determined that a data query instruction triggered by a user is received, the data query instruction includes multi-level path identifiers, and the data to be queried is determined from the specified tree structure data according to the multi-level path identifiers.
[0047] The path identifier may be understood as a node identifier corresponding to each level node in the specified tree structure data.
[0048] By way of example, the path identifier in the data query instruction may include the first-level high school department, the second-level high school grades, the third-level A system, the fourth-level A1, the fifth-level twelfth grade, and the sixth-level regular face-to-face teaching. When it is determined that the data query instruction triggered by the user is received, the first-level high school department, the second-level high school grades, the third-level A system, the fourth-level A1, the fifth-level twelfth grade, and the sixth-level regular face-to-face teaching are searched from the specified tree structure data to obtain the data to be queried, that is, the data corresponding to the high school department, high school grades, the third-level A system, A1, the twelfth grade, and regular face-to-face teaching.
[0049] A specific implementation method of determining the data to be queried from the specified tree structure data based on the multi-level path identifier in this step may be, when it is determined that the lowest level identifier in the path identifier is not a node identifier in the specified tree structure data, determining the second lowest level identifier in the path identifier; if it is determined that the second lowest level identifier in the path identifier is a node identifier in the specified tree structure data, determining the target search node in the specified tree structure data based on the second lowest level identifier, and determining the data to be queried in the data corresponding to the target search node.
[0050] By way of example, the specified tree structure data may include a first-level high school department, a second-level high school grade, a third-level A system, and a fourth-level A1. The path identifier in the data query instruction may include a first-level high school department identifier, a second-level high school grade identifier, a third-level A system identifier, a fourth-level A1 identifier, and a fifth-level twelfth grade identifier. It can be determined that the lowest-level identifier of the path identifier in the data query instruction, i.e., the fifth-level twelfth grade identifier, is a node identifier in the non-specified tree structure data, and the second-bottom-level identifier of the path identifier in the data query instruction, i.e., the fourth-level A1 identifier, is a node identifier in the specified tree structure data. The second-bottom-level identifier of the path identifier in the data query instruction, i.e., the fourth-level A1 identifier, is used to determine the data corresponding to the target search node, i.e., the A1 node, in the specified tree structure data to determine the data to be queried, i.e., the data corresponding to the high school department, high school grade, A system, A1, and twelfth grade.
[0051] Another specific implementation method of determining the data to be queried from the specified tree structure data according to the multi-level path identifier in this step may be, when the lowest level identifier in the path identifier is determined to be a node identifier in the specified tree structure data, a target search node is determined in the specified tree structure data according to the lowest level identifier, and the data to be queried is determined in the data corresponding to the target search node.
[0052] For example, the specified tree structure data may include a first-level high school department, a second-level high school grade, a third-level A system, a fourth-level A1, and a fifth-level twelfth grade. The path identifier in the data query instruction may include a first-level high school department identifier, a second-level high school grade identifier, a third-level A system identifier, a fourth-level A1 identifier, and a fifth-level twelfth grade identifier. The bottom-level identifier of the path identifier in the data query instruction, i.e., the fifth-level twelfth grade identifier, may be determined as a node identifier in the specified tree structure data. Through the bottom-level identifier of the path identifier in the data query instruction, i.e., the fifth-level twelfth grade identifier, the data to be queried, i.e., the data corresponding to the high school department, high school grade, A system, A1, and twelfth grade, may be determined in the data corresponding to the target search node, i.e., the twelfth grade node, in the specified tree structure data.
[0053] The above technical scheme can accurately determine multiple nodes to be merged from multiple leaf nodes by specifying data, and effectively obtain the merged target tree structure data by merging multiple nodes to be merged into target nodes. It can improve the merging efficiency of tree structure data, simplify the process of data processing operations, and reduce the complexity of data maintenance, thereby effectively reducing the workload of data maintenance and improving the efficiency of data maintenance.
[0054] Figure 5is a flowchart of another data processing method according to an exemplary embodiment, wherein after determining the data to be queried in the data corresponding to the target search node, as follows Figure 5 As shown, the data processing method may further include the following steps: In step 402, a split node corresponding to the path identifier is generated, and the data to be queried is stored in the split node.
[0055] For example, through the path identifier's first-level high school department identifier, the second-level high school grade identifier, the third-level A system identifier, the fourth-level A1 identifier, and the fifth-level twelfth grade identifier, a split node twelfth grade node corresponding to the path identifier can be generated, and the data to be queried can be stored in the split node twelfth grade node.
[0056] In step 403, the to-be-queried data in the target search node is deleted, and the target search node is used as the parent node of the split node to obtain the split tree structure data.
[0057] For example, the target search node can be high school department->high school grade->A system->A1->grade 12, the data to be queried can be the data corresponding to the high school department, high school grade, A system, A1, grade 12, and regular face-to-face teaching, and the split node can be the regular face-to-face teaching node. The data to be queried in high school department->high school grade->A system->A1->grade 12, that is, the data corresponding to the regular face-to-face teaching, can be deleted, and the grade 12 node can be used as the parent node of the regular face-to-face teaching node to obtain the tree structure data after the split.
[0058] The above technical scheme can accurately determine multiple nodes to be merged from multiple leaf nodes by specifying data, and effectively obtain the merged target tree structure data by merging multiple nodes to be merged into target nodes. It can improve the merging efficiency of tree structure data, simplify the process of data processing operations, and reduce the complexity of data maintenance, thereby effectively reducing the workload of data maintenance and improving the efficiency of data maintenance.
[0059] Figure 6 is a schematic diagram of a data processing device according to an exemplary embodiment. Figure 6 As shown, the data processing device may include: A first determination module 601 is configured to determine path information corresponding to multiple leaf nodes in the current tree structure data in response to receiving a data merging instruction; A second determining module 602 is configured to determine a plurality of nodes to be merged from the plurality of leaf nodes according to the specified data when it is determined that the path information contains the specified data; The third determining module 603 is configured to merge the multiple nodes to be merged into a target node to obtain merged target tree structure data.
[0060] Optionally, the specified data includes a plurality of preset tags, and the second determining module 602 is configured to: Determining a designated path for each leaf node in the plurality of leaf nodes; In the case that the designated path of the leaf node includes the preset label, the leaf node is used as the node to be merged, so as to obtain the multiple nodes to be merged corresponding to the multiple preset labels.
[0061] Optionally, the third determining module 603 is configured to: Using the node data corresponding to the multiple nodes to be merged as the node data of the target node; Determine the parent nodes corresponding to the multiple nodes to be merged; A hierarchical relationship between the target node and the parent node is constructed to obtain the target tree structure data.
[0062] Optionally, the first determining module 601 is configured to: In the case of determining that a data storage instruction triggered by a user is received, the data storage instruction includes a path to be stored and data to be stored, and determining a target storage node from the standby tree structure data according to the path to be stored; In the case where it is determined that the data to be stored is stored in the target storage node, the data merging instruction is generated.
[0063] Optionally, the device may further include: The fourth determination module 604 is configured to determine the data to be queried from the specified tree structure data according to the multi-level path identifiers when it is determined that a data query instruction triggered by a user is received, and the data query instruction includes multi-level path identifiers.
[0064] Optionally, the fourth determining module 604 is configured to: In the case where it is determined that the bottom-level identifier in the path identifier is not a node identifier in the specified tree structure data, determining the next bottom-level identifier in the path identifier; If it is determined that the secondary bottom layer identifier in the path identifier is a node identifier in the specified tree structure data, determining a target search node in the specified tree structure data according to the secondary bottom layer identifier; The data to be queried is determined in the data corresponding to the target search node.
[0065] Optionally, after determining the data to be queried in the data corresponding to the target search node, the device may further include: A generating module 605 is configured to generate a split node corresponding to the path identifier, and store the to-be-queried data in the split node; The fifth determining module 606 is configured to delete the to-be-queried data in the target search node, and use the target search node as the parent node of the split node to obtain the split tree structure data.
[0066] Optionally, the fourth determining module 604 is configured to: In the case where it is determined that the bottom-level identifier in the path identifier is a node identifier in the specified tree structure data, determining a target search node in the specified tree structure data according to the bottom-level identifier; The data to be queried is determined in the data corresponding to the target search node.
[0067] The above technical scheme can accurately determine multiple nodes to be merged from multiple leaf nodes by specifying data, and effectively obtain the merged target tree structure data by merging multiple nodes to be merged into target nodes. It can improve the merging efficiency of tree structure data, simplify the process of data processing operations, and reduce the complexity of data maintenance, thereby effectively reducing the workload of data maintenance and improving the efficiency of data maintenance.
[0068] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0069] Figure 7 FIG. 7 is a block diagram of an electronic device 700 according to an exemplary embodiment. Figure 7 As shown, the electronic device 700 may include: a first processor 701 , a first memory 702 . The electronic device 700 may also include one or more of a multimedia component 703 , a first input / output (I / O) interface 704 , and a first communication component 705 .
[0070] The first processor 701 is used to control the overall operation of the electronic device 700 to complete all or part of the steps in the above-mentioned data processing method. The first memory 702 is used to store various types of data to support the operation of the electronic device 700. For example, these data may include instructions for any application or method used to operate on the electronic device 700, and application-related data, such as contact data, sent and received messages, pictures, audio, video, etc. The first memory 702 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random Access Memory, referred to as SRAM), electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, referred to as EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, referred to as EPROM), programmable read-only memory (Programmable Read-Only Memory, referred to as PROM), read-only memory (Read-Only Memory, referred to as ROM), magnetic memory, flash memory, magnetic disk or optical disk. The multimedia component 703 may include a screen and an audio component. The screen may be, for example, a touch screen, and the audio component is used to output and / or input audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may be further stored in the first memory 702 or sent through the first communication component 705. The audio component also includes at least one speaker for outputting audio signals. The first I / O interface 704 provides an interface between the first processor 701 and other interface modules, and the above-mentioned other interface modules may be keyboards, mice, buttons, etc. These buttons may be virtual buttons or physical buttons. The first communication component 705 is used for wired or wireless communication between the electronic device 700 and other devices. Wireless communication, such as Wi-Fi, Bluetooth, Near Field Communication (NFC), 2G, 3G, 4G, NB-IOT, eMTC, or other 5G, etc., or a combination of one or more of them, is not limited here. Therefore, the corresponding first communication component 705 may include: Wi-Fi module, Bluetooth module, NFC module, etc.
[0071] In an exemplary embodiment, the electronic device 700 can be implemented by one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned data processing method.
[0072] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by a processor, the steps of the above-mentioned data processing method are implemented. For example, the computer-readable storage medium can be the above-mentioned first memory 702 including program instructions, and the above-mentioned program instructions can be executed by the first processor 701 of the electronic device 700 to complete the above-mentioned data processing method.
[0073] Figure 8 8 is a block diagram of an electronic device according to an exemplary embodiment. For example, the electronic device 800 may be provided as a server. Figure 8 The electronic device 800 includes a second processor 822, which may be one or more, and a second memory 832 for storing a computer program executable by the second processor 822. The computer program stored in the second memory 832 may include one or more modules each corresponding to a set of instructions. In addition, the second processor 822 may be configured to execute the computer program to perform the above-mentioned data processing method.
[0074] In addition, the electronic device 800 may further include a power supply component 826 and a second communication component 850, the power supply component 826 may be configured to perform power management of the electronic device 800, and the second communication component 850 may be configured to implement communication of the electronic device 800, for example, wired or wireless communication. In addition, the electronic device 800 may further include a second input / output (I / O) interface 858. The electronic device 800 may operate based on an operating system stored in the second memory 832.
[0075] In another exemplary embodiment, a computer-readable storage medium including program instructions is also provided, and when the program instructions are executed by the processor, the steps of the above-mentioned data processing method are implemented. For example, the non-transitory computer-readable storage medium can be the above-mentioned second memory 832 including program instructions, and the above-mentioned program instructions can be executed by the second processor 822 of the electronic device 800 to complete the above-mentioned data processing method.
[0076] In another exemplary embodiment, a computer program product is also provided. The computer program product includes a computer program executable by a programmable device, and the computer program has a code portion for executing the above data processing method when executed by the programmable device.
[0077] The preferred embodiments of the present disclosure are described in detail above in conjunction with the accompanying drawings; however, the present disclosure is not limited to the specific details in the above embodiments. Within the technical concept of the present disclosure, a variety of simple modifications can be made to the technical solution of the present disclosure, and these simple modifications all fall within the protection scope of the present disclosure.
[0078] It should also be noted that the various specific technical features described in the above specific embodiments can be combined in any suitable manner without contradiction. In order to avoid unnecessary repetition, the present disclosure will not further describe various possible combinations.
[0079] In addition, various embodiments of the present disclosure may be arbitrarily combined, and as long as they do not violate the concept of the present disclosure, they should also be regarded as the contents disclosed by the present disclosure.
Claims
1. A data processing method, characterized in that: The method comprises: In response to receiving the data merge instruction, determining path information corresponding to a plurality of leaf nodes in the current tree structure data; In a case where it is determined that the path information includes the specified data, determining a plurality of nodes to be merged from the plurality of leaf nodes according to the specified data; The multiple nodes to be merged are merged into a target node to obtain merged target tree structure data.
2. The method according to claim 1, characterized in that: The specified data includes a plurality of preset tags, and determining a plurality of nodes to be merged from the plurality of leaf nodes according to the specified data includes: Determining a designated path for each leaf node in the plurality of leaf nodes; In the case that the designated path of the leaf node includes the preset label, the leaf node is used as the node to be merged, so as to obtain the multiple nodes to be merged corresponding to the multiple preset labels.
3. The method according to claim 1, characterized in that The step of merging the plurality of nodes to be merged into a target node to obtain merged target tree structure data includes: Using the node data corresponding to the multiple nodes to be merged as the node data of the target node; Determine the parent nodes corresponding to the multiple nodes to be merged; A hierarchical relationship between the target node and the parent node is constructed to obtain the target tree structure data.
4. The method according to claim 1, characterized in that: Before determining the path information corresponding to the plurality of leaf nodes in the current tree structure data in response to receiving the data merging instruction, the method further includes: In the case of determining that a data storage instruction triggered by a user is received, the data storage instruction includes a path to be stored and data to be stored, and determining a target storage node from the standby tree structure data according to the path to be stored; In the case where it is determined that the data to be stored is stored in the target storage node, the data merging instruction is generated.
5. The method according to claim 1, characterized in that The method further comprises: In the case where it is determined that a data query instruction triggered by a user is received, the data query instruction includes multi-level path identifiers, and the data to be queried is determined from the specified tree structure data according to the multi-level path identifiers.
6. The method according to claim 5, characterized in that The step of determining the data to be queried from the specified tree structure data according to the multi-level path identifiers includes: In the case where it is determined that the bottom-level identifier in the path identifier is not a node identifier in the specified tree structure data, determining the next bottom-level identifier in the path identifier; If it is determined that the secondary bottom layer identifier in the path identifier is a node identifier in the specified tree structure data, a target search node is determined in the specified tree structure data according to the secondary bottom layer identifier; The data to be queried is determined in the data corresponding to the target search node.
7. The method according to claim 5, characterized in that The step of determining the data to be queried from the specified tree structure data according to the multi-level path identifiers includes: In the case where it is determined that the bottom-level identifier in the path identifier is a node identifier in the specified tree structure data, determining a target search node in the specified tree structure data according to the bottom-level identifier; The data to be queried is determined in the data corresponding to the target search node.
8. The method according to claim 6, characterized in that After determining the data to be queried in the data corresponding to the target search node, the method further includes: Generate a split node corresponding to the path identifier, and store the data to be queried in the split node; The data to be queried in the target search node is deleted, and the target search node is used as the parent node of the split node to obtain the tree structure data after splitting.
9. A data processing device, characterized in that: The device comprises: A first determination module is configured to determine path information corresponding to a plurality of leaf nodes in the current tree structure data in response to receiving a data merging instruction; A second determining module is configured to determine a plurality of nodes to be merged from the plurality of leaf nodes according to the specified data when it is determined that the path information contains the specified data; The third determining module is configured to merge the multiple nodes to be merged into a target node to obtain merged target tree structure data.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method described in any one of claims 1 to 8 are implemented.
11. An electronic device, characterized in that: include: a memory having a computer program stored thereon; A processor, configured to execute the computer program in the memory to implement the steps of the method according to any one of claims 1 to 8.
