Method for generating data table based on mind map
Through the method of generating data tables based on brain maps, the problems of inefficient data conversion efficiency and insufficient tool integration in the existing technology are solved, and the rapid generation and accuracy of data analysis tables are achieved, and the efficiency of data analysis is improved.
Patent Information
- Application Number
- CN202410756104.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-13
- Publication Date
- 2024-12-06
- Estimated Expiration
- 2044-06-13
AI Technical Summary
Existing brain map-based data analysis methods are inefficient and prone to errors when converting data from brain map to target data analysis tables, and traditional tools lack direct integration with data analysis software, resulting in cumbersome and time-consuming data conversion.
A method of generating data tables based on brain maps is proposed. By obtaining the data set to be analyzed, converting it into brain map representations, and expanding it hierarchically according to the data analysis dimension sequence, automatically generating the target data analysis table, realizing the data from brain map to data analysis Quick conversion of tables.
It improves the efficiency of data analysis and processing, ensures the integrity and accuracy of data, simplifies the data conversion process, reduces manual operation errors, and realizes rapid conversion between brain maps and data analysis tables.
Smart Images

Figure CN118656370B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data processing, and in particular to a method for generating a data table based on a brain map. Background Art
[0002] With the rapid development of information technology, data analysis and processing have become an indispensable part of all walks of life. In the process of data analysis, the visualization of data is crucial for understanding and analyzing data. As an intuitive and hierarchical way of displaying data, mind maps are widely used in fields such as data analysis and knowledge management because they are easy to understand and operate.
[0003] However, existing mind-map-based data analysis methods still have some technical shortcomings. First, although mind maps can intuitively display the hierarchical structure of data, when converting data from mind maps to target data analysis tables, manual hierarchical expansion and data sorting are usually required, which is not only inefficient but also prone to errors. Second, traditional mind mapping tools lack direct integration with data analysis software, making the conversion of data between mind maps and data analysis tables cumbersome and time-consuming. Summary of the invention
[0004] The purpose of this application is to propose a method for generating a data table based on a mind map, so as to solve or alleviate the technical problems existing in the prior art.
[0005] The technical solutions provided by the embodiments of this application are as follows:
[0006] A method for generating a data table based on a brain map, comprising:
[0007] Get the data set to be analyzed;
[0008] Converting the data set to be analyzed into a brain map representation;
[0009] Acquiring a sequence of data analysis dimensions to hierarchically expand the brain map representation;
[0010] Generate a target data analysis table based on the hierarchically expanded mind map representation.
[0011] Optionally, obtaining the analysis data set includes:
[0012] Build data access requests based on database query statements;
[0013] Based on the data access request, a database connector is constructed to access a target data source through the database connector and obtain target data therefrom, wherein the database query statement includes: at least one of a SELECT statement, a JOIN operation, and a WHERE clause;
[0014] Based on the data access object model and according to the object relational mapping framework, the acquired target data is encapsulated and temporarily stored in a pre-set container to form a data set to be analyzed through object mapping.
[0015] Optionally, constructing a data access request based on a database query statement includes:
[0016] Based on a database query statement, the database query statement is parameterized and compiled to construct a data access request.
[0017] Optionally, constructing a database connector based on the data access request to access a target data source through the database connector and obtain target data therefrom includes:
[0018] Based on the data access request, instantiate the API of the database interface and create a database session;
[0019] Based on the database session, the connection string format of the target database is parsed to construct a connection string including the host, port, and database name;
[0020] Build a database connector based on the constructed connection string;
[0021] Based on the database connector, create a cursor object;
[0022] The cursor object is instantiated to access the target data source and obtain target data therefrom.
[0023] Optionally, based on the data access object mode and according to the object relation mapping framework, encapsulating the acquired target data to temporarily store it in a pre-set container to form a data set to be analyzed through object mapping includes:
[0024] Create data access logic based on the data access object pattern;
[0025] Encapsulating the data access logic according to an object-relational mapping framework to establish a data encapsulation engine;
[0026] Based on the data encapsulation engine, a data encapsulation task is started to encapsulate the acquired target data to temporarily store it in a pre-set list and form a data set to be analyzed through object mapping.
[0027] Optionally, converting the data set to be analyzed into a brain map representation includes:
[0028] Preprocessing the data set to be analyzed to generate brain map input data;
[0029] Encoding the mind map input data to generate mind map node data and mind map link structure data;
[0030] A mind map representation is generated according to the mind map node data and the mind map link structure data.
[0031] Optionally, the preprocessing of the data set to be analyzed to generate brain map input data includes:
[0032] Performing data cleaning on the data set to be analyzed to remove invalid or erroneous data records therein;
[0033] Based on the pre-built special project, the cleaned data set to be analyzed is converted to obtain the mind map input data, where the date is converted to a timestamp and the non-date data is converted to a label.
[0034] Optionally, encoding the mind map input data to generate mind map node data and mind map link structure data includes:
[0035] Based on the trained feature cross matrix, the mind map input data is feature cross-encoded to generate mind map node data and mind map link structure data, wherein the feature cross-coding includes at least one of numerical feature cross-coding, classification feature cross-coding, date and time feature cross-coding, and text feature cross-coding.
[0036] Optionally, the feature cross encoding of the brain map input data based on the trained feature cross matrix to generate brain map node data and brain map link structure data includes:
[0037] Based on the trained feature cross matrix, the brain map input data is subjected to feature cross encoding to obtain an original cross feature encoding vector;
[0038] Performing multicollinearity diagnosis on the original cross-feature coding vector to determine a variance inflation factor;
[0039] According to the variance expansion factor, remove or merge cross-feature coding vectors whose correlation is greater than a set correlation threshold and obtain a valid cross-feature coding vector;
[0040] Parsing the effective cross-feature coding vector to determine the node attributes and relationship attributes of the brain map;
[0041] According to the mind map node attributes and relationship attributes; the mind map node data and the mind map link structure data are generated.
[0042] Optionally, generating a mind map representation according to the mind map node data and the mind map link structure data comprises:
[0043] Instantiate a mind map object to generate a mind map representation according to the mind map node data and the mind map link structure data, and add an interactive function component to the mind map representation.
[0044] Optionally, the instantiating of the mind map object to generate a mind map representation according to the mind map node data and the mind map link structure data, and adding an interactive function component to the mind map representation, comprises:
[0045] Instantiate the mind map object to create a class for caching mind map node data and a structure for caching mind map link structure data;
[0046] The matched mind map representation layout is obtained, and the class and the structure are mapped to the mind map representation layout to generate the mind map representation, and an interactive function component is added to the mind map representation.
[0047] Optionally, adding an interactive functional component to the mind map representation includes:
[0048] The defined interaction event is obtained, and a callback function is compiled based on the interaction event, and the callback function is registered as an event delegate of the mind map representation, so as to add an interaction function component to the mind map representation.
[0049] Optionally, registering the callback function as an event delegate of the mind map representation to add an interactive functional component to the mind map representation includes: registering an event listener on a mind map container element; and registering the callback function as an event delegate of the mind map representation based on the event listener to add an interactive functional component to the mind map representation.
[0050] Optionally, the acquiring of the data analysis dimension sequence to hierarchically expand the mind map representation includes:
[0051] Acquire a data analysis dimension sequence, and recursively analyze the data analysis dimension sequence to obtain a recursive analysis tree;
[0052] Iterating the dimension of the mind map representation based on the recursive parse tree to add real-time links in the mind map;
[0053] According to the added real-time links, the mind map representation is hierarchically expanded.
[0054] Optionally, generating a target data analysis table according to the hierarchically expanded mind map includes:
[0055] Capturing the node and link relationships of the hierarchically expanded mind map;
[0056] Tracing the captured nodes and link relationships back to the dataset for metadata matching;
[0057] The matched metadata is filled into the initialized data analysis table to generate a target data analysis table.
[0058] In this application, a method for generating a data table based on a mind map is proposed. The method first obtains the data set to be analyzed and converts it into a mind map representation to intuitively display the hierarchical structure of the data. Then, by obtaining the data analysis dimension sequence, the mind map representation is automatically hierarchically expanded to ensure the integrity and accuracy of the data. Finally, according to the hierarchically expanded mind map representation, the target data analysis table is automatically generated to achieve rapid conversion of data from the mind map to the data analysis table, thereby improving the efficiency of data analysis and processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] Hereinafter, some specific embodiments of the present application will be described in detail in an exemplary and non-limiting manner with reference to the accompanying drawings. The same reference numerals in the accompanying drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. In the accompanying drawings:
[0060] Figure 1 This is a flow chart of a method for generating a data table based on a mind map according to an embodiment of the present application. DETAILED DESCRIPTION
[0061] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the embodiments of the present application should fall within the scope of protection of the embodiments of the present application.
[0062] Figure 1 The following is a flow chart of a method for generating a data table based on a mind map according to an embodiment of the present application. A method for generating a data table based on a mind map comprises:
[0063] Get the data set to be analyzed;
[0064] Converting the data set to be analyzed into a brain map representation;
[0065] Acquiring a sequence of data analysis dimensions to hierarchically expand the brain map representation;
[0066] Generate a target data analysis table based on the hierarchically expanded mind map representation.
[0067] In this application, a method for generating a data table based on a mind map is proposed. The method first obtains the data set to be analyzed and converts it into a mind map representation to intuitively display the hierarchical structure of the data. Then, by obtaining the data analysis dimension sequence, the mind map representation is automatically hierarchically expanded to ensure the integrity and accuracy of the data. Finally, according to the hierarchically expanded mind map representation, the target data analysis table is automatically generated to achieve rapid conversion of data from the mind map to the data analysis table, thereby improving the efficiency of data analysis and processing.
[0068] Optionally, obtaining the analysis data set includes:
[0069] Build data access requests based on database query statements;
[0070] Based on the data access request, a database connector is constructed to access a target data source through the database connector and obtain target data therefrom, wherein the database query statement includes: at least one of a SELECT statement, a JOIN operation, and a WHERE clause;
[0071] Based on the data access object model and the object relation mapping framework, the acquired target data is encapsulated and temporarily stored in a pre-set container to form a data set to be analyzed through object mapping.
[0072] To this end, the above method of constructing and obtaining the data set to be analyzed based on database query statements and data access object patterns has the following technical advantages:
[0073] (1) Improved flexibility in data acquisition: Through database query statements (such as SELECT statements, JOIN operations, WHERE clauses, etc.), data access requests can be customized according to specific data analysis needs, thereby obtaining target data that meets the analysis requirements.
[0074] (2) Enhanced efficiency and accuracy of data access: The database connector can automatically handle the connection and communication with the target data source, avoiding the tedious process of manually connecting to the data source and reducing the errors that may be introduced by manual operations.
[0075] (3) Simplified data encapsulation and processing: Through the data access object model and the object-relational mapping framework, the acquired target data can be encapsulated as objects and temporarily stored in a pre-set container to form a data set to be analyzed through object mapping. This method makes data easier to manage and operate, and facilitates subsequent mind map conversion and data analysis.
[0076] To this end, the above method for constructing and obtaining a data set to be analyzed based on a database query statement and a data access object pattern has an exemplary implementation code as follows:
[0077]
[0078]
[0079] Optionally, constructing a data access request based on a database query statement includes:
[0080] Based on a database query statement, the database query statement is parameterized and compiled to construct a data access request.
[0081] To this end, parameterizing the database query statement to construct a data access request has the following technical benefits:
[0082] (1) Prevent SQL injection attacks: Through parameterized compilation, the parameters in the query statement are safely passed to the database instead of being directly spliced into the query string. This can effectively prevent malicious users from tampering with the query statement by entering specific parameter values and performing illegal operations.
[0083] (2) Improve query performance: Database systems usually cache parameterized queries. When the same query is executed again, the results can be directly obtained from the cache without recompiling and executing the query statement. This can significantly improve query performance, especially in high-concurrency scenarios.
[0084] (3) Simplify code writing: Parameterized compilation makes the code more concise and easy to read, while also reducing the errors that may be introduced by manually concatenating query strings.
[0085] Optionally, constructing a database connector based on the data access request to access a target data source through the database connector and obtain target data therefrom includes:
[0086] Based on the data access request, instantiate the API of the database interface and create a database session;
[0087] Based on the database session, parse the connection string format of the target database and construct a connection string including the host, port, and database name;
[0088] Build a database connector based on the constructed connection string;
[0089] Based on the database connector, create a cursor object;
[0090] The cursor object is instantiated to access the target data source and obtain target data therefrom.
[0091] To this end, the above method of building a database connector based on a data access request and accessing a target data source through the connector to obtain target data has the following technical benefits:
[0092] (1) Flexibility and scalability: By instantiating the database interface API, it can easily support a variety of database systems, such as MySQL, PostgreSQL, SQLite, etc., making the data access solution more flexible and easy to expand.
[0093] (2) Security and stability: Parsing the connection string format of the target database and constructing a connection string containing the host, port, and database name can ensure the accuracy and security of the connection information and reduce data access problems caused by configuration errors.
[0094] (3) Efficiency and ease of use: Creating a cursor object and instantiating it to access the target data source can achieve efficient access and operation of the database. At the same time, by encapsulating the underlying database access details, the upper-level application code is more concise and easy to use, reducing the difficulty of development.
[0095] To this end, the above method of building a database connector and accessing the target data source to obtain target data has an exemplary implementation code as follows:
[0096] from sqlalchemy import create_engine
[0097] from sqlalchemy.orm import sessionmaker
[0098] #Database connection string
[0099] #The format of the database connection string is usually
[0100] "dialect+driver: / / username:password@host:port / database"
[0101] DATABASE_URL=
[0102] 'mysql+pymysql: / / username:password@localhost:3306 / mydatabase'
[0103] #Create a database engine (ie database connector)
[0104] engine=create_engine(DATABASE_URL)
[0105] #Create a session class based on the database engine
[0106] Session=sessionmaker(bind=engine)
[0107] #Instantiate the session class and create a session object (ie, database session)
[0108] session=Session()
[0109] # Execute the query using the session object
[0110] #Define User data model
[0111] #Query all users
[0112] users=session.query(User).all()
[0113] #Process the query results...
[0114] for user in users:
[0115] print(user.username)
[0116] #Close the session
[0117] session.close()
[0118] Optionally, based on the data access object mode and according to the object relation mapping framework, encapsulating the acquired target data to temporarily store it in a pre-set container to form a data set to be analyzed through object mapping includes:
[0119] Create data access logic based on the data access object pattern;
[0120] Encapsulating the data access logic according to an object-relational mapping framework to establish a data encapsulation engine;
[0121] Based on the data encapsulation engine, a data encapsulation task is started to encapsulate the acquired target data to temporarily store it in a pre-set list and form a data set to be analyzed through object mapping.
[0122] To this end, the method of encapsulating the acquired target data based on the data access object pattern (DAO) and object relational mapping (ORM) framework to temporarily store it in a pre-set container to form a data set to be analyzed through object mapping has the following technical advantages:
[0123] (1) Code decoupling and maintainability: By separating data access logic from business logic, the data access logic created based on the DAO pattern makes the code structure clearer and easier to maintain. When the database structure or business logic changes, only the corresponding DAO class needs to be modified without modifying the entire business logic.
[0124] (2) Abstraction and reuse of data access: Through the ORM framework, the table structure in the database can be mapped to objects in the programming language, allowing developers to operate the database like operating objects. This abstract method makes data access simpler and more intuitive, and also improves the reusability of code.
[0125] (3) Improve the efficiency and security of data operations: ORM frameworks usually automatically handle data type conversion, validation, and binding processes, reducing the tediousness and errors of manually writing SQL statements. In addition, ORM frameworks can also automatically handle security issues such as SQL injection, improving the security and efficiency of data operations.
[0126] To this end, the above method of encapsulating target data into a pre-set container has an exemplary implementation code as follows:
[0127]
[0128] Optionally, converting the data set to be analyzed into a brain map representation includes:
[0129] Preprocessing the data set to be analyzed to generate brain map input data;
[0130] Encoding the mind map input data to generate mind map node data and mind map link structure data;
[0131] A mind map representation is generated according to the mind map node data and the mind map link structure data.
[0132] To this end, the above method of converting the data set to be analyzed into a brain map representation has the following technical benefits:
[0133] (1) Intuitive visual representation: By converting the dataset to be analyzed into a mind map representation, users can more intuitively understand and analyze the relationship and structure between the datasets, which helps to quickly locate problems and discover potential patterns.
[0134] (2) Enhanced data insight: Mind map representation allows users to explore the deep relationships of data through hierarchical structures and node links, thereby enhancing insight and analysis capabilities of the data.
[0135] (3) Flexibility and scalability: This method allows customized preprocessing and encoding according to specific needs and data characteristics, thereby generating brain map representations that are suitable for different application scenarios. At the same time, the generated brain map representations are also easy to integrate and expand with other analysis tools or platforms.
[0136] Use networkx, matplotlib, or specialized mind map libraries (such as the mind map function of pyecharts) to generate and display mind maps.
[0137]
[0138] Optionally, the preprocessing of the data set to be analyzed to generate brain map input data includes:
[0139] Performing data cleaning on the data set to be analyzed to remove invalid or erroneous data records therein;
[0140] Based on the pre-built special project, the cleaned data set to be analyzed is converted to obtain the mind map input data, where the date is converted to a timestamp and the non-date data is converted to a label.
[0141] To this end, the above method of preprocessing the data set to be analyzed to generate brain map input data has the following technical advantages:
[0142] (1) Improve data quality: By cleaning data and removing invalid or erroneous data records, we can ensure that the data used in the subsequent mind map generation process is accurate and reliable, thereby improving the accuracy and credibility of the mind map.
[0143] (2) Optimize data format: Based on pre-built special projects, convert data into a format suitable for mind map generation, such as converting dates into timestamps and non-date data into labels. This conversion ensures that the data is presented in a clear and intuitive way in the mind map, making it easier for users to understand and analyze.
[0144] (3) Improving analysis efficiency: By converting the data into a format suitable for brain map generation through the preprocessing step, the complexity and time cost of subsequent data processing can be reduced, thereby improving the efficiency of the entire analysis process.
[0145] To show an example implementation of the above preprocessing steps, we can use Python's pandas library to process the dataset and the datetime module to process date data. The following is the example code:
[0146]
[0147] Optionally, encoding the mind map input data to generate mind map node data and mind map link structure data includes:
[0148] Based on the trained feature cross matrix, the mind map input data is feature cross-encoded to generate mind map node data and mind map link structure data, wherein the feature cross-coding includes at least one of numerical feature cross-coding, classification feature cross-coding, date and time feature cross-coding, and text feature cross-coding.
[0149] To this end, the above method of performing feature cross-coding on the brain map input data to generate brain map node data and brain map link structure data has the following technical advantages:
[0150] (1) Enhanced data expression capabilities: Through feature cross-coding, new features can be created, which may capture the hidden relationships and patterns in the original data, thereby enhancing the data expression capabilities and improving the accuracy of mind map representation.
[0151] (2) Adaptability to multiple types of data: This method supports multiple types of data encoding, such as numerical feature crossover, categorical feature crossover, date and time feature crossover, and text feature crossover. It can adapt to data sets of different structures and types, thus increasing the versatility and flexibility of the method.
[0152] (3) Improving model effects: The new features generated by feature cross-coding can provide more useful information for the mind map generation algorithm, helping the algorithm to better learn and understand the intrinsic structure and relationship of the data, thereby improving the effect and quality of mind map generation.
[0153] Due to the specific implementation of feature cross encoding, a simplified example code is provided below:
[0154]
[0155]
[0156] Optionally, the feature cross encoding of the brain map input data based on the trained feature cross matrix to generate brain map node data and brain map link structure data includes:
[0157] Based on the trained feature cross matrix, the brain map input data is subjected to feature cross encoding to obtain an original cross feature encoding vector;
[0158] Performing multicollinearity diagnosis on the original cross-feature coding vector to determine a variance inflation factor;
[0159] According to the variance expansion factor, remove or merge cross-feature coding vectors whose correlation is greater than a set correlation threshold and obtain a valid cross-feature coding vector;
[0160] Parsing the effective cross-feature coding vector to determine the node attributes and relationship attributes of the brain map;
[0161] According to the mind map node attributes and relationship attributes; the mind map node data and the mind map link structure data are generated.
[0162] Technical benefits
[0163] To this end, the method of performing feature cross encoding on brain map input data based on the trained feature cross matrix and performing multicollinearity diagnosis processing to generate brain map node data and brain map link structure data has the following technical advantages:
[0164] (1) Improve model prediction accuracy: Through feature cross-coding, the model can learn nonlinear associations in the data, thereby improving the prediction accuracy of brain map node and link structures. Multicollinearity diagnosis further reduces redundant and highly correlated features, helping to prevent overfitting, thereby further improving model performance.
[0165] (2) Reduce data redundancy and computational complexity: By removing or merging cross-feature coding vectors whose correlation is greater than a set threshold, redundant information in the data is effectively reduced, reducing storage and computational costs. At the same time, the simplified feature set makes model training more efficient and speeds up data processing and analysis.
[0166] (3) Enhanced data interpretability: After feature cross-coding and multicollinearity diagnosis, the effective cross-feature coding vector has a clearer meaning and helps to explain the properties and relationships of nodes and links in the brain map. This helps researchers better understand and analyze the structure and function of brain maps and discover new biological significance.
[0167] To this end, the exemplary code of the method for performing feature cross encoding on the brain map input data based on the trained feature cross matrix and performing multicollinearity diagnosis processing to generate brain map node data and brain map link structure data is as follows:
[0168]
[0169]
[0170] Optionally, generating a mind map representation according to the mind map node data and the mind map link structure data comprises:
[0171] Instantiate a mind map object to generate a mind map representation according to the mind map node data and the mind map link structure data, and add an interactive function component to the mind map representation.
[0172] To this end, the above method of instantiating a mind map object and generating a mind map representation with interactive functional components according to the mind map node data and the mind map link structure data has the following technical advantages:
[0173] (1) Enhanced user experience: By adding interactive functional components to the mind map representation, users can more conveniently browse, analyze, and operate mind map data. For example, users can click on a node to view detailed information, drag a node to adjust the layout, or quickly locate a specific node through the search function.
[0174] (2) Improve data visualization: By instantiating mind map objects, the mind map node data and link structure data can be intuitively displayed in a graphical way. This visualization method helps users better understand the structure and relationship of the data and discover the patterns and trends in the data.
[0175] (3) Facilitating data exploration: The addition of interactive functional components allows users to dynamically modify the mind map representation, such as adding or deleting nodes, changing link relationships, etc. This flexibility facilitates user exploration and analysis of data and helps discover new insights.
[0176] (4) Facilitate knowledge management and sharing: The generated mind map representation can be used as part of knowledge management to record and organize complex information structures. At the same time, due to its interactivity, the mind map representation can be easily shared and discussed with other users, promoting the dissemination and application of knowledge.
[0177] Here, we show an example implementation code of how to generate a mind map representation with interactive functions based on the mind map node data and link structure data:
[0178]
[0179]
[0180] Optionally, the instantiating of the mind map object to generate a mind map representation according to the mind map node data and the mind map link structure data, and adding an interactive function component to the mind map representation, comprises:
[0181] Instantiate the mind map object to create a class for caching mind map node data and a structure for caching mind map link structure data;
[0182] The matched mind map representation layout is obtained, and the class and the structure are mapped to the mind map representation layout to generate the mind map representation, and an interactive function component is added to the mind map representation.
[0183] To this end, the above method of instantiating a mind map object, creating a class and a structure for caching mind map node data and link structure data, mapping to a mind map representation layout to generate a mind map representation, and adding interactive functional components thereon, has the following technical benefits:
[0184] (1) Improve performance: By creating cache classes and structures to store mind map node data and link structure data, frequent access to the database or external data source when generating mind map representations can be avoided, thereby significantly improving performance.
[0185] (2) Optimize memory usage: The cache mechanism can reduce unnecessary memory allocation and release, reduce the risk of memory fragmentation, and improve memory usage efficiency.
[0186] (3) Support dynamic update: The cached node data and link structure data can be easily updated. When the data changes, only the cache needs to be updated without regenerating the entire mind map representation, thus achieving dynamic update.
[0187] (4) Enhanced interactivity: Adding interactive functional components to the generated mind map representation, such as node click events and link dragging, can enrich the user experience and enable users to browse, analyze, and operate mind map data more conveniently.
[0188] (5) Flexibility: By mapping node data and link structure data to the mind map representation layout, the layout and style of the mind map can be flexibly adjusted to meet different display requirements.
[0189] The following is an example code that shows how to instantiate a mind map object, create a cache class and structure, map to the mind map representation layout, and add interactive functional components.
[0190]
[0191]
[0192] Optionally, adding an interactive functional component to the mind map representation includes:
[0193] The defined interaction event is obtained, and a callback function is compiled based on the interaction event, and the callback function is registered as an event delegate of the mind map representation, so as to add an interaction function component to the mind map representation.
[0194] Technical benefits
[0195] To this end, when adding interactive functional components to the mind map representation, the method of obtaining defined interactive events and compiling callback functions based on these events, and then registering these callback functions as event delegates of the mind map representation has the following technical benefits:
[0196] (1) Decoupling and modularization: By separating interactive events and callback functions, code decoupling is achieved, the degree of modularization is improved, and the code is easier to understand and maintain.
[0197] (2) Flexibility and scalability: By adding interactive functions based on event delegation, you can easily add, modify, or delete interactive events without affecting other parts of the code. This flexibility allows the system to easily adapt to new interactive requirements.
[0198] (3) Improve code reusability: By defining reusable callback functions, you can avoid repeating the same code in multiple places, thereby improving code reusability.
[0199] (4) Optimize performance: Event delegation reduces memory usage and DOM operations by binding event listeners to parent elements instead of each child element, thereby improving performance.
[0200] (5) Enhanced user experience: By adding interactive functional components, users can have richer interactions with the mind map representation, such as clicking on nodes to view detailed information, dragging nodes to adjust the layout, etc., thereby enhancing the user experience.
[0201] The following is an example code that shows how to compile callback functions based on interaction events and register these callback functions as event delegates of the mind map representation to add interactive functional components to the mind map representation:
[0202]
[0203] Optionally, registering the callback function as an event delegate of the mind map representation to add an interactive functional component to the mind map representation includes: registering an event listener on a mind map container element; and registering the callback function as an event delegate of the mind map representation based on the event listener to add an interactive functional component to the mind map representation.
[0204] To this end, the method of registering an event listener on the mind map container element and registering a callback function as an event delegate of the mind map representation based on the event listener to add an interactive function component to the mind map representation has the following technical benefits:
[0205] (1) Reduce the number of DOM event listeners: By registering an event listener on the mind map container element instead of registering a listener on each mind map node or link, the number of DOM event listeners can be greatly reduced and performance can be improved.
[0206] (2) Convenience of event delegation: By utilizing the event bubbling feature, events from child elements (i.e., mind map nodes or links) can be listened to on the mind map container element. This makes event processing more centralized and unified, and easier to manage and maintain.
[0207] (3) Support for dynamic content: Since the event listener is registered on the container element, even if new mind map nodes or links are added dynamically later, they will automatically inherit this event listener without the need for additional registration.
[0208] (4) Code simplicity and readability: Through event delegation, the event processing logic can be concentrated in one place, making the code more concise and easy to read.
[0209] (5) Enhanced maintainability: When the interactive function needs to be modified or expanded, it is only necessary to modify the event listener registered on the container element, without having to traverse the entire mind map representation to modify the event listener of each node or link.
[0210] Here is an example code using JavaScript and a hypothetical graphics library such as D3.js or Cytoscape.js, showing how to register an event listener on a mind map container element and register the callback function as an event delegate:
[0211]
[0212]
[0213] Optionally, the acquiring of the data analysis dimension sequence to hierarchically expand the mind map representation includes:
[0214] Acquire a data analysis dimension sequence, and recursively analyze the data analysis dimension sequence to obtain a recursive analysis tree;
[0215] Iterating the dimension of the mind map representation based on the recursive parse tree to add real-time links in the mind map;
[0216] According to the added real-time links, the mind map representation is hierarchically expanded.
[0217] To this end, the above method of obtaining a data analysis dimension sequence, recursively analyzing the data analysis dimension sequence to obtain a recursive analysis tree, iterating the dimension of the mind map representation based on the recursive analysis tree to add real-time links in the mind map, and hierarchically expanding the mind map representation according to the added real-time links has the following technical advantages:
[0218] (1) Dynamic and real-time: Through recursive analysis and iterative addition of real-time links, the mind map representation can be dynamically expanded and updated as the data analysis dimension changes, maintaining real-time synchronization between data analysis and mind map representation.
[0219] (2) Flexibility and scalability: Recursive analysis trees can handle complex data analysis dimension sequences. Whether they are linear or nonlinear dimension sequences, they can be effectively processed through recursive analysis. At the same time, this method also supports adding new analysis dimensions to the mind map, expanding the representation capabilities of the mind map.
[0220] (3) Intuitiveness and ease of understanding: Through the hierarchical mind map representation, users can intuitively see the hierarchical structure of data analysis and the relationship between dimensions, making it easier for users to understand and analyze data.
[0221] (4) Reduce manual operations: Automatic recursive analysis and dimension iteration reduce the workload of users in manually creating and updating mind map representations, thereby improving work efficiency.
[0222] (5) Support for multiple data types: Due to the universality of the recursive analysis tree, this method can support data analysis dimension sequences of multiple data types and formats and has wide applicability.
[0223] The following is a simplified example code to illustrate the basic implementation logic of the above solution:
[0224]
[0225]
[0226] Optionally, generating a target data analysis table according to the hierarchically expanded mind map includes: capturing nodes and link relationships of the hierarchically expanded mind map;
[0227] The captured nodes and link relationships are traced back to the data set to match metadata; the matched metadata is filled into the initialized data analysis table to generate a target data analysis table.
[0228] To this end, the above method of generating a target data analysis table based on a hierarchically expanded mind map has the following technical advantages:
[0229] (1) Intuitiveness and operability: Through the hierarchical mind map, users can intuitively understand the structure and relationship of the data. Converting the nodes and links in the mind map into a data analysis table further enhances the operability and analysis of the data, allowing users to more conveniently perform operations such as data query, screening, and statistics.
[0230] (2) Data relevance preservation: In the process of tracing back the nodes and links in the mind map to the dataset for metadata matching, the data relevance is preserved. This means that the generated target data analysis table can accurately reflect the relationships and hierarchical structures in the original data, providing strong support for subsequent data analysis.
[0231] (3) Automation and efficiency: The entire process is implemented through automated scripts or programs, reducing the possibility of human intervention and errors. At the same time, due to the reduction of manual operations, the efficiency of data processing is greatly improved, allowing users to obtain the required data analysis results more quickly.
[0232] (4) Flexibility and scalability: This method is not only applicable to specific data sets and mind map structures, but can also be flexibly adjusted and expanded according to actual needs. For example, the matching rules of nodes and links can be customized, and the format and style of data analysis tables can be adjusted to meet the needs of different users and analysis scenarios.
[0233] The following is a simplified example code to illustrate the basic implementation logic of generating a target data analysis table based on a hierarchical mind map:
[0234]
[0235]
[0236] The above description is only a preferred embodiment of the present application and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the present application is not limited to the technical solution formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above invention concept. For example, the above features are replaced with the technical features with similar functions disclosed in this application (but not limited to) by each other to form a technical solution.
Claims
1. A method for generating a data table based on a mind map, characterized in that: include: Get the data set to be analyzed; Converting the data set to be analyzed into a brain map representation; Acquiring a sequence of data analysis dimensions to hierarchically expand the brain map representation; Generate a target data analysis table based on the hierarchical brain map representation; Wherein, obtaining the data set to be analyzed includes: Build data access requests based on database query statements; Based on the data access request, a database connector is constructed to access a target data source through the database connector and obtain target data therefrom, wherein the database query statement includes: at least one of a SELECT statement, a JOIN operation, and a WHERE clause; Based on the data access object model and the object relation mapping framework, the acquired target data is encapsulated and temporarily stored in a pre-set container to form a data set to be analyzed through object mapping; The step of constructing a data access request based on a database query statement includes: Based on a database query statement, parameterizing and compiling the database query statement to construct a data access request; The step of converting the data set to be analyzed into a brain map representation includes: Preprocessing the data set to be analyzed to generate brain map input data; Encoding the mind map input data to generate mind map node data and mind map link structure data; Generate a mind map representation according to the mind map node data and the mind map link structure data; The step of encoding the mind map input data to generate mind map node data and mind map link structure data includes: Based on the trained feature cross matrix, the mind map input data is feature cross-encoded to generate mind map node data and mind map link structure data, wherein the feature cross-coding includes at least one of numerical feature cross-coding, classification feature cross-coding, date and time feature cross-coding, and text feature cross-coding.
2. The method for generating a data table based on a brain map according to claim 1, characterized in that: The step of constructing a database connector based on the data access request to access a target data source through the database connector and obtain target data therefrom includes: Based on the data access request, instantiate the API of the database interface and create a database session; Based on the database session, parse the connection string format of the target database and construct a connection string including the host, port, and database name; Build a database connector based on the constructed connection string; Based on the database connector, create a cursor object; The cursor object is instantiated to access the target data source and obtain target data therefrom.
3. The method for generating a data table based on a brain map according to claim 2, characterized in that: Based on the data access object mode and according to the object relationship mapping framework, the acquired target data is encapsulated and temporarily stored in a pre-set container to form a data set to be analyzed through object mapping, including: Create data access logic based on the data access object pattern; Encapsulating the data access logic according to an object-relational mapping framework to establish a data encapsulation engine; Based on the data encapsulation engine, a data encapsulation task is started to encapsulate the acquired target data to temporarily store it in a pre-set list and form a data set to be analyzed through object mapping.
4. The method for generating a data table based on a brain map according to claim 1, characterized in that: The preprocessing of the data set to be analyzed to generate brain map input data includes: Performing data cleaning on the data set to be analyzed to remove invalid or erroneous data records therein; Based on the pre-built special project, the cleaned data set to be analyzed is converted to obtain the mind map input data, where the date is converted to a timestamp and the non-date data is converted to a label.
5. The method for generating a data table based on a brain map according to claim 1, characterized in that: The step of generating a mind map representation according to the mind map node data and the mind map link structure data comprises: Instantiating a mind map object to generate a mind map representation according to the mind map node data and the mind map link structure data, and adding an interactive function component to the mind map representation; The instantiation of the mind map object to generate a mind map representation according to the mind map node data and the mind map link structure data, and adding an interactive function component to the mind map representation, includes: Instantiate the mind map object to create a class for caching mind map node data and a structure for caching mind map link structure data; The matched mind map representation layout is obtained, and the class and the structure are mapped to the mind map representation layout to generate the mind map representation, and an interactive function component is added to the mind map representation.
6. The method for generating a data table based on a brain map according to claim 5, characterized in that: The components for adding interactive functions to the mind map representation include: The defined interaction event is obtained, and a callback function is compiled based on the interaction event, and the callback function is registered as an event delegate of the mind map representation, so as to add an interaction function component to the mind map representation.
7. The method for generating a data table based on a brain map according to claim 1, characterized in that: The acquiring of the data analysis dimension sequence to hierarchically expand the brain map representation includes: Acquire a data analysis dimension sequence, and recursively analyze the data analysis dimension sequence to obtain a recursive analysis tree; Iterating the dimension of the mind map representation based on the recursive parse tree to add real-time links in the mind map; According to the added real-time links, the mind map representation is hierarchically expanded.
8. The method for generating a data table based on a brain map according to claim 1, characterized in that: The target data analysis table is generated according to the hierarchically expanded mind map, including: Capturing the node and link relationships of the hierarchically expanded mind map; Tracing the captured nodes and link relationships back to the dataset for metadata matching; The matched metadata is filled into the initialized data analysis table to generate a target data analysis table.
