[go: up one dir, main page]

CN118656370B - Method for generating data table based on brain graph - Google Patents

Method for generating data table based on brain graph Download PDF

Info

Publication number
CN118656370B
CN118656370B CN202410756104.9A CN202410756104A CN118656370B CN 118656370 B CN118656370 B CN 118656370B CN 202410756104 A CN202410756104 A CN 202410756104A CN 118656370 B CN118656370 B CN 118656370B
Authority
CN
China
Prior art keywords
data
brain
graph
brain map
map
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202410756104.9A
Other languages
Chinese (zh)
Other versions
CN118656370A (en
Inventor
韩涵
王晓文
何江
谢开浪
马文龙
陈善君
夏暄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Zhongshuruizhi Technology Co ltd
Original Assignee
Beijing Zhongshuruizhi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Zhongshuruizhi Technology Co ltd filed Critical Beijing Zhongshuruizhi Technology Co ltd
Priority to CN202410756104.9A priority Critical patent/CN118656370B/en
Publication of CN118656370A publication Critical patent/CN118656370A/en
Application granted granted Critical
Publication of CN118656370B publication Critical patent/CN118656370B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2282Tablespace storage structures; Management thereof
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/215Improving data quality; Data cleansing, e.g. de-duplication, removing invalid entries or correcting typographical errors
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/242Query formulation
    • G06F16/2433Query languages
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Software Systems (AREA)
  • Mathematical Physics (AREA)
  • Computational Linguistics (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请提出一种基于脑图生成数据表的方法,该方法首先获取待分析数据集,并将其转换为脑图表示,以直观展示数据的层级结构。然后,通过获取数据分析维度序列,对脑图表示进行自动的层级展开,确保数据的完整性和准确性。最后,根据层级展开的脑图表示,自动生成目标数据分析表,实现数据从脑图到数据分析表的快速转换,从而提高数据分析和处理的效率。

The present application proposes a method for generating a data table based on a mind map. 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, a target data analysis table is automatically generated to achieve rapid conversion of data from a mind map to a data analysis table, thereby improving the efficiency of data analysis and processing.

Description

Method for generating data table based on brain graph
Technical Field
The application relates to the technical field of data processing, in particular to a method for generating a data table based on brain images.
Background
With the rapid development of information technology, data analysis and processing have become an integral part of various industries. In the data analysis process, visual representation of data is critical to understanding and analyzing the data. The brain graph is used as an intuitive and hierarchical data display mode, and is widely applied to the fields of data analysis, knowledge management and the like because of easy understanding and operation.
However, existing brain map-based data analysis methods still have some technical drawbacks. First, although brain maps can intuitively show the hierarchical structure of data, when converting data from brain maps to target data analysis tables, manual hierarchy expansion and data sorting are often required, which is not only inefficient, but also prone to errors. Second, conventional brain map tools lack direct integration with data analysis software, making the conversion of data between brain maps and data analysis tables cumbersome and time consuming.
Disclosure of Invention
The application aims to provide a method for generating a data table based on a brain map, which is used for solving or relieving the technical problems in the prior art.
The technical scheme provided by the embodiment of the application is as follows:
a method of generating a data table based on a brain map, comprising:
Acquiring a data set to be analyzed;
converting the data set to be analyzed into a brain map representation;
acquiring a data analysis dimension sequence to perform hierarchical expansion on the brain graph representation;
and generating a target data analysis table according to the hierarchical unfolded brain chart representation.
Optionally, the acquiring the analysis dataset includes:
constructing a data access request based on the database query statement;
constructing a database connector based on the data access request to access a target data source through the database connector and acquire target data from the target data source, wherein the database query statement comprises at least one of a SELECT statement, a JOIN operation and a WHERE clause;
and based on the data access object mode, according to the object relation mapping frame, packaging the obtained target data to be temporarily stored in a preset container so as to form a data set to be analyzed through object mapping.
Optionally, the constructing a data access request based on the database query statement includes:
based on the database query statement, parameterizing and compiling the database query statement to construct a data access request.
Optionally, the constructing a database connector based on the data access request to access a target data source and obtain target data therefrom through the database connector includes:
based on the data access request, instantiating an API of the database interface to create a database session;
Based on the database session, analyzing the connection character string format of the target database, and constructing a connection character string containing a host, a port and a database name;
constructing a database connector according to the constructed connection character string;
creating a cursor object based on the database connector;
instantiate the cursor object to access the target data source and obtain target data therefrom.
Optionally, based on the data access object mode, according to an object relation mapping framework, the packaging of the obtained target data is performed to temporarily store the target data in a preset container, so as to form a data set to be analyzed through object mapping, including:
Creating data access logic based on the data access object schema;
encapsulating the data access logic according to an object relation mapping frame to establish a data encapsulation engine;
and starting a data packaging task based on the data packaging engine to package the acquired target data so as to be temporarily stored in a preset list and form a data set to be analyzed through object mapping.
Optionally, the 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 brain map input data to generate brain map node data and brain map link structure data;
and generating a brain graph representation according to the brain graph node data and the brain graph link structure data.
Optionally, the preprocessing 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 a pre-constructed special engineering, converting the data set to be analyzed after data cleaning to obtain brain graph input data, wherein date is converted into a time stamp, and non-date data is converted into a label.
Optionally, the encoding the brain map input data to generate brain map node data and brain map link structure data includes:
And performing feature cross coding on the brain graph input data based on the trained feature cross matrix to generate brain graph node data and brain graph link structure data, wherein the feature cross coding comprises at least one of numerical feature cross, classification feature cross, date and time feature cross and text feature cross.
Optionally, the performing feature cross coding on the brain graph input data based on the trained feature cross matrix to generate brain graph node data and brain graph link structure data includes:
Performing feature cross coding on the brain graph input data based on the trained feature cross matrix to obtain an original cross feature coding vector;
Performing multiple collinearity diagnosis on the original cross feature coding vector to determine a variance expansion factor;
Removing or combining cross feature code vectors with the correlation degree larger than a set correlation degree threshold according to the variance expansion factor, and obtaining effective cross feature code vectors;
Analyzing the effective cross feature coding vector to determine brain graph node attributes and relationship attributes;
And generating brain map node data and brain map link structure data according to the brain map node attribute and the relation attribute.
Optionally, the generating a brain graph representation according to the brain graph node data and the brain graph link structure data includes:
Instantiating a brain map object to generate a brain map representation according to the brain map node data and brain map link structure data, and adding an interactive function component in the brain map representation.
Optionally, the instantiating the brain map object to generate a brain map representation according to the brain map node data and brain map link structure data, and adding an interactive function component in the brain map representation, including:
instantiating a brain map object to create a class of cached brain map node data, and a structure of cached brain map link structure data;
And obtaining a matched brain graph representation layout, mapping the class and the structure body to the brain graph representation layout to generate the brain graph representation, and adding an interactive function component in the brain graph representation.
Optionally, the adding an interactive function component in the brain chart includes:
And acquiring defined interaction events, compiling a callback function based on the interaction events, and registering the callback function as an event commission represented by the brain graph so as to represent an added interaction function component in the brain graph.
Optionally, registering the callback function as the event delegate of the brain graph representation to add the interactive function component in the brain graph representation comprises registering an event listener on a brain graph container element, and registering the callback function as the event delegate of the brain graph representation based on the event listener to add the interactive function component in the brain graph representation.
Optionally, the acquiring data analyzes a dimensional sequence to perform hierarchical expansion on the brain graph representation, including:
acquiring a data analysis dimension sequence, and carrying out recursion analysis on the data analysis dimension sequence to obtain a recursion analysis tree;
performing dimension iteration on the brain graph representation based on the recursion analysis tree to add real-time links in the brain graph;
and carrying out hierarchical expansion on the brain graph representation according to the added real-time links.
Optionally, the generating a target data analysis table according to the brain map expanded by the hierarchy includes:
Capturing node and link relation of the brain graph expanded by the hierarchy;
Backtracking the captured node and the link relation to the data set to match metadata;
And filling the matched metadata into the initialized data analysis table to generate a target data analysis table.
The application provides a method for generating a data table based on a brain map. The method comprises the steps of firstly obtaining a data set to be analyzed, and converting the data set to be analyzed into brain graph representation so as to intuitively display the hierarchical structure of the data. And then, automatically expanding the brain graph representation in a hierarchy way by acquiring the data analysis dimension sequence, so as to ensure the integrity and the accuracy of the data. Finally, according to the hierarchical expanded brain graph representation, a target data analysis table is automatically generated, and the rapid conversion of data from the brain graph to the data analysis table is realized, so that the efficiency of data analysis and processing is improved.
Drawings
Some specific embodiments of the application will be described in detail hereinafter by way of example and not by way of limitation with reference to the accompanying drawings. The same reference numbers will be used throughout the drawings to refer to the same or like parts or portions. It will be appreciated by those skilled in the art that the drawings are not necessarily drawn to scale. In the accompanying drawings:
fig. 1 is a flowchart of a method for generating a data table based on a brain map according to an embodiment of the present application.
Detailed Description
In order to better understand the technical solutions in the embodiments of the present application, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which are derived by a person skilled in the art based on the embodiments of the present application, shall fall within the scope of protection of the embodiments of the present application.
Fig. 1 is a flowchart of a method for generating a data table based on a brain map according to an embodiment of the present application. A method of generating a data table based on a brain map, comprising:
Acquiring a data set to be analyzed;
converting the data set to be analyzed into a brain map representation;
acquiring a data analysis dimension sequence to perform hierarchical expansion on the brain graph representation;
and generating a target data analysis table according to the hierarchical unfolded brain chart representation.
The application provides a method for generating a data table based on a brain map. The method comprises the steps of firstly obtaining a data set to be analyzed, and converting the data set to be analyzed into brain graph representation so as to intuitively display the hierarchical structure of the data. And then, automatically expanding the brain graph representation in a hierarchy way by acquiring the data analysis dimension sequence, so as to ensure the integrity and the accuracy of the data. Finally, according to the hierarchical expanded brain graph representation, a target data analysis table is automatically generated, and the rapid conversion of data from the brain graph to the data analysis table is realized, so that the efficiency of data analysis and processing is improved.
Optionally, the acquiring the analysis dataset includes:
constructing a data access request based on the database query statement;
constructing a database connector based on the data access request to access a target data source through the database connector and acquire target data from the target data source, wherein the database query statement comprises at least one of a SELECT statement, a JOIN operation and a WHERE clause;
and based on the data access object mode, according to the object relation mapping frame, packaging the obtained target data to be temporarily stored in a preset container so as to form a data set to be analyzed through object mapping.
For this purpose, the method for constructing and acquiring the data set to be analyzed based on the database query statement and the data access object mode has the following technical advantages:
(1) The flexibility of data acquisition is improved, namely, a data access request can be customized according to specific data analysis requirements through database query sentences (such as SELECT sentences, JOIN operations, WHERE clauses and the like), so that target data meeting analysis requirements can be acquired.
(2) The efficiency and the accuracy of data access are enhanced, namely, the database connector can automatically process the connection and the communication with the target data source, so that the tedious process of manually connecting the data source is avoided, and meanwhile, the errors possibly caused by manual operation are reduced.
(3) The method simplifies the data packaging and processing process, namely, the obtained target data can be packaged into an object through a data access object mode and combined with an object relation mapping framework and temporarily stored in a preset container to form a data set to be analyzed through object mapping. This approach makes the data easier to manage and manipulate, facilitating subsequent brain map transformations and data analysis.
For this purpose, the above method for constructing and acquiring a data set to be analyzed based on a database query statement and a data access object schema is implemented as follows:
Optionally, the constructing a data access request based on the database query statement includes:
based on the database query statement, parameterizing and compiling the database query statement to construct a data access request.
For this purpose, parameterized compiling is performed on database query sentences to construct data access requests, which has the following technical advantages:
(1) SQL injection attacks are prevented in that parameters in query statements are securely passed to the database through parameterized compilation rather than being spliced directly into the query string. Therefore, malicious users can be effectively prevented from tampering with the query statement by inputting specific parameter values, and illegal operations are further executed.
(2) The query performance is improved, namely the database system usually caches the parameterized query, and when the same query is executed again, the result can be directly obtained from the cache without recompilation and execution of query sentences. This can significantly improve query performance, especially in high concurrency scenarios.
(3) Simplified code writing, parameterized compiling makes the code more concise and readable, and simultaneously reduces errors possibly introduced by manually splicing query strings.
Optionally, the constructing a database connector based on the data access request to access a target data source and obtain target data therefrom through the database connector includes:
based on the data access request, instantiating an API of the database interface to create a database session;
Based on the database session, analyzing the connection character string format of the target database, and constructing a connection character string containing a host, a port and a database name;
constructing a database connector according to the constructed connection character string;
creating a cursor object based on the database connector;
instantiate the cursor object to access the target data source and obtain target data therefrom.
Therefore, the method for constructing the database connector based on the data access request and accessing the target data source to acquire the target data through the connector has the following technical advantages:
(1) The flexibility and the expandability are that various database systems, such as MySQL, postgreSQL, SQLite, can be conveniently supported through instantiation of the database interface API, so that the data access scheme is more flexible and easy to expand.
(2) The security and stability are that the connection character string format of the target database is analyzed, and the connection character string containing the host, the port and the database name is constructed, so that the accuracy and the security of the connection information can be ensured, and the data access problem caused by configuration errors is reduced.
(3) Efficient and easy-to-use-creating cursor objects and instantiating to access a target data source, efficient access and manipulation of databases can be achieved. Meanwhile, the access details of the bottom database are packaged, so that the upper application code is simpler and more convenient to use, and the development difficulty is reduced.
To this end, the above method for constructing a database connector and accessing a target data source to obtain target data is implemented as follows:
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
Database connection string
The format of the # database connection string is typically
"dialect+driver://username:password@host:port/database"
DATABASE_URL=
'mysql+pymysql://username:password@localhost:3306/mydatabase'
# Create database Engine (i.e., database connector)
engine=create_engine(DATABASE_URL)
Creating session class based on database engine #
Session=sessionmaker(bind=engine)
Instantiation of a Session class, creation of a Session object (i.e., database Session)
session=Session()
# Use session object to perform queries
# Definition User data model
Query all users #
users=session.query(User).all()
Process query results.
for user in users:
print(user.username)
# Close session
session.close()
Optionally, based on the data access object mode, according to an object relation mapping framework, the packaging of the obtained target data is performed to temporarily store the target data in a preset container, so as to form a data set to be analyzed through object mapping, including:
Creating data access logic based on the data access object schema;
encapsulating the data access logic according to an object relation mapping frame to establish a data encapsulation engine;
and starting a data packaging task based on the data packaging engine to package the acquired target data so as to be temporarily stored in a preset list and form a data set to be analyzed through object mapping.
For this purpose, the method for encapsulating the obtained target data based on the data access object model (DAO) and Object Relation Mapping (ORM) framework to temporarily store the target data in a preset container to form the data set to be analyzed through object mapping has the following technical advantages:
(1) Code decoupling and maintainability by separating the data access logic from the business logic, the data access logic created based on the DAO mode makes the code structure clearer and easy to maintain. When the database structure or business logic changes, only the corresponding DAO class need be modified, and the whole business logic does not need to be modified.
(2) Abstraction and reuse of data access table structures in a database can be mapped to objects in a programming language through an ORM framework so that a developer can manipulate the database like objects. This abstract way makes data access simpler and more intuitive, while also improving code reusability.
(3) The efficiency and the safety of data operation are improved, the ORM framework can automatically process the type conversion, verification, binding and other processes of the data, and the complexity and the errors of manually writing SQL sentences are reduced. In addition, the ORM framework can automatically process SQL injection and other safety problems, and the safety and efficiency of data operation are improved.
For this, the above method for encapsulating target data into a predetermined container is implemented as follows:
Optionally, the 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 brain map input data to generate brain map node data and brain map link structure data;
and generating a brain graph representation according to the brain graph node data and the brain graph link structure data.
For this purpose, the above-described method for converting a data set to be analyzed into a brain map representation has the following technical advantages:
(1) Visual visualization means that by converting the data sets to be analyzed into brain graph representations, the user can more intuitively understand and analyze the relationships and structures between the data sets, helping to quickly locate problems and discover potential patterns.
(2) Enhanced data insight-brain representations allow users to explore deep relationships of data through hierarchical structures and node links, thereby enhancing insight and analysis capabilities of the data.
(3) The method allows customized preprocessing and encoding according to specific requirements and data characteristics, so that brain graph representations adapting to different application scenes are generated. At the same time, the generated brain map representation is also easy to integrate and expand with other analysis tools or platforms.
Brain maps are generated and presented using, for example, networkx, matplotlib or a specialized brain map library (e.g., the brain map functions of pyecharts).
Optionally, the preprocessing 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 a pre-constructed special engineering, converting the data set to be analyzed after data cleaning to obtain brain graph input data, wherein date is converted into a time stamp, and non-date data is converted into a label.
For this purpose, the method for preprocessing the data set to be analyzed to generate brain map input data has the following technical advantages:
(1) The data quality is improved, namely invalid or wrong data records are removed through data cleaning, so that the accuracy and reliability of data used in the subsequent brain map generation process can be ensured, and the accuracy and reliability of the brain map are improved.
(2) Optimizing data format, converting data into a format suitable for brain map generation based on pre-constructed engineering, such as converting date into time stamp and converting non-date data into label. The conversion can ensure that the data is presented in a clear and visual way in the brain graph, so that the user can understand and analyze the data conveniently.
(3) The analysis efficiency is improved, namely, the data is converted into a format suitable for brain map generation through a preprocessing step, so that the complexity and time cost of subsequent data processing can be reduced, and the efficiency of the whole analysis process is improved.
To demonstrate an exemplary implementation of the preprocessing step described above, we can use the pandas library of Python to process the dataset and datetime module to process the date data. The following are example codes:
optionally, the encoding the brain map input data to generate brain map node data and brain map link structure data includes:
And performing feature cross coding on the brain graph input data based on the trained feature cross matrix to generate brain graph node data and brain graph link structure data, wherein the feature cross coding comprises at least one of numerical feature cross, classification feature cross, date and time feature cross and text feature cross.
Therefore, the method for performing feature cross coding on brain graph input data to generate brain graph node data and brain graph link structure data has the following technical advantages:
(1) And the data expression capacity is enhanced, namely new features can be created through feature cross coding, and the features can capture hidden relations and modes in the original data, so that the data expression capacity is enhanced, and the accuracy of brain graph representation is improved.
(2) The method supports data coding of a plurality of types such as numerical feature crossing, classification feature crossing, date and time feature crossing, text feature crossing and the like, can adapt to data sets of different structures and types, and increases the universality and flexibility of the method.
(3) The model effect is improved, namely the new features generated by the feature cross coding can provide more useful information for the brain map generation algorithm, and the algorithm is facilitated to learn and understand the internal structure and relation of the data better, so that the effect and quality of brain map generation are improved.
Due to the specific implementation of feature cross-coding, one simplified exemplary code is provided below:
optionally, the performing feature cross coding on the brain graph input data based on the trained feature cross matrix to generate brain graph node data and brain graph link structure data includes:
Performing feature cross coding on the brain graph input data based on the trained feature cross matrix to obtain an original cross feature coding vector;
Performing multiple collinearity diagnosis on the original cross feature coding vector to determine a variance expansion factor;
Removing or combining cross feature code vectors with the correlation degree larger than a set correlation degree threshold according to the variance expansion factor, and obtaining effective cross feature code vectors;
Analyzing the effective cross feature coding vector to determine brain graph node attributes and relationship attributes;
And generating brain map node data and brain map link structure data according to the brain map node attribute and the relation attribute.
Technical advantage
Therefore, the method for performing feature cross coding on brain graph input data based on the trained feature cross matrix and generating brain graph node data and brain graph link structure data through multiple co-linearity diagnosis processing has the following technical advantages:
(1) The prediction accuracy of the model is improved, namely, through feature cross coding, the model can learn nonlinear association relation in data, so that the prediction accuracy of brain map nodes and link structures is improved. Multiple co-linearity diagnostics further reduce redundancy and highly correlated features, helping to prevent over-fitting and thus further improve model performance.
(2) And the redundancy and the calculation complexity of the data are reduced, namely, the redundancy information in the data is effectively reduced and the storage and calculation cost is reduced by removing or combining the cross feature coding vectors with the correlation degree larger than the set threshold value. Meanwhile, the simplified feature set enables model training to be more efficient, and data processing and analysis speed is increased.
(3) The data interpretation is enhanced, namely the effective cross feature coding vector after feature cross coding and multiple co-linearity diagnosis processing has more definite meaning, and is helpful for interpreting the attribute and the relation of nodes and links in the brain graph. This helps researchers better understand and analyze the structure and function of brain patterns and discover new biological implications.
For this purpose, the above-mentioned method for performing feature cross coding on brain graph input data based on the trained feature cross matrix and performing multiple co-linearity diagnosis processing to generate brain graph node data and brain graph link structure data is as follows:
Optionally, the generating a brain graph representation according to the brain graph node data and the brain graph link structure data includes:
Instantiating a brain map object to generate a brain map representation according to the brain map node data and brain map link structure data, and adding an interactive function component in the brain map representation.
For this purpose, the above method for instantiating brain map objects and generating brain map representations with interactive functional components based on brain map node data and brain map link structure data has the following technical advantages:
(1) The user experience is enhanced by adding interactive functional components to the brain map representation, the user is able to more conveniently browse, analyze and manipulate the brain map data. For example, the user may click on a node to view detailed information, drag the node to adjust the layout, or quickly locate a particular node through a search function.
(2) The data visualization effect is improved, namely, brain graph node data and link structure data can be intuitively displayed in a graphical mode by instantiating brain graph objects. This way of visualization helps the user to better understand the structure and relationship of the data and discover rules and trends in the data.
(3) Facilitating data exploration the addition of interactive functionality components allows a user to dynamically modify brain graph representations, such as adding or deleting nodes, changing linking relationships, and so forth. This flexibility facilitates the exploration and analysis of data by users, helping to discover new insights and insights.
(4) Facilitating knowledge management and sharing, the generated brain graph representation can be used as part of knowledge management for recording and organizing complex information structures. Meanwhile, due to interactivity, the brain graph representation can be conveniently shared and discussed with other users, and knowledge propagation and application are promoted.
Here, exemplary implementation code showing how to generate a brain graph representation with interactive functions from brain graph node data and link structure data is shown:
optionally, the instantiating the brain map object to generate a brain map representation according to the brain map node data and brain map link structure data, and adding an interactive function component in the brain map representation, including:
instantiating a brain map object to create a class of cached brain map node data, and a structure of cached brain map link structure data;
And obtaining a matched brain graph representation layout, mapping the class and the structure body to the brain graph representation layout to generate the brain graph representation, and adding an interactive function component in the brain graph representation.
To this end, the above-described method of instantiating a brain map object by creating classes and structures that cache brain map node data and link structure data and mapping to a brain map representation layout to generate a brain map representation and adding interactive function components thereto has the following technical advantages:
(1) The performance is improved by creating a cache class and a structure body to store brain map node data and link structure data, so that frequent access to a database or an external data source when generating brain map representation can be avoided, and the performance is improved remarkably.
(2) The cache mechanism can reduce unnecessary memory allocation and release, reduce the risk of memory fragmentation and improve the memory use efficiency.
(3) And supporting dynamic update, namely, the cached node data and the link structure data can be conveniently updated, and when the data changes, the cache is only updated without regenerating the whole brain chart representation, so that dynamic update is realized.
(4) The interactivity is enhanced, namely, an interactive functional component such as a node click event, link drag and the like is added on the generated brain graph representation, so that the user experience can be enriched, and the user can browse, analyze and operate brain graph data more conveniently.
(5) Flexibility by mapping node data and link structure data to brain map representation layout, the layout and style of brain maps can be flexibly adjusted to accommodate different display requirements.
The following is an exemplary code that demonstrates how to instantiate a brain graph object, create cache classes and constructs, map to a brain graph representation layout, and add interactive function components.
Optionally, the adding an interactive function component in the brain chart includes:
And acquiring defined interaction events, compiling a callback function based on the interaction events, and registering the callback function as an event commission represented by the brain graph so as to represent an added interaction function component in the brain graph.
Technical advantage
For this purpose, the above method for adding interactive function components in brain graph representation by acquiring defined interactive events and compiling callback functions based on the events, and then registering the callback functions as event delegation of brain graph representation has the following technical advantages:
(1) Decoupling and modularization, namely decoupling of codes is realized by separating interaction events from callback functions, and the modularization degree is improved, so that the codes are easier to understand and maintain.
(2) Flexibility and extensibility-adding interactive functions based on event delegation can facilitate adding, modifying or deleting interactive events without affecting other portions of code. This flexibility enables the system to easily adapt to new interaction requirements.
(3) The code reusability is improved, namely, by defining reusable callback functions, the repeated writing of the same codes in a plurality of places can be avoided, and the code reusability is improved.
(4) The event delegation reduces memory usage and DOM operations by binding the event listener to the parent element, rather than to each child element, thereby improving performance.
(5) The user experience is enhanced, namely, through adding the interaction function component, the user can perform richer interaction with the brain graph representation, such as clicking the node to view detailed information, dragging the node to adjust the layout and the like, so that the user experience is enhanced.
The following is an exemplary code that demonstrates how callback functions are formulated based on interaction events and registered as event delegates for brain graph representations to add interaction function components in the brain graph representations:
Optionally, registering the callback function as the event delegate of the brain graph representation to add the interactive function component in the brain graph representation comprises registering an event listener on a brain graph container element, and registering the callback function as the event delegate of the brain graph representation based on the event listener to add the interactive function component in the brain graph representation.
For this purpose, the above method for registering an event listener on a brain graph container element and registering a callback function as an event delegate of a brain graph representation based on the event listener to add an interactive function component in the brain graph representation has the following technical advantages:
(1) The number of DOM event listeners is reduced by registering one event listener on the brain map container element instead of registering listeners on each brain map node or link separately, which can greatly reduce the number of DOM event listeners and improve performance.
(2) The convenience of event delegation-by taking advantage of the nature of event bubbling, events from its child elements (i.e., brain graph nodes or links) can be listened to on the brain graph container element. This makes the event handling more centralized and unified, and easy to manage and maintain.
(3) Dynamic content is supported because event listeners are registered with the container element, they will automatically inherit this event listener without additional registration even if new brain graph nodes or links are dynamically added later.
(4) Code conciseness and readability by way of event delegation, event processing logic can be concentrated in one place, so that the code is more concise and easier to read.
(5) The maintainability is enhanced by modifying the event listener registered on the container element when the interactive function needs to be modified or extended, without traversing the entire brain graph representation to modify the event listener for each node or link.
The following is an exemplary code using JavaScript and a hypothetical graphics library (e.g., d3.Js or cytoscape. Js) that demonstrates how to register an event listener on a brain graph container element and register a callback function as an event delegate:
Optionally, the acquiring data analyzes a dimensional sequence to perform hierarchical expansion on the brain graph representation, including:
acquiring a data analysis dimension sequence, and carrying out recursion analysis on the data analysis dimension sequence to obtain a recursion analysis tree;
performing dimension iteration on the brain graph representation based on the recursion analysis tree to add real-time links in the brain graph;
and carrying out hierarchical expansion on the brain graph representation according to the added real-time links.
Therefore, the method for performing recursion analysis on the data analysis dimension sequence to obtain a recursion analysis tree, performing dimension iteration on the brain graph representation based on the recursion analysis tree to add real-time links in the brain graph, and performing hierarchical expansion on the brain graph representation according to the added real-time links has the following technical advantages:
(1) Dynamic and real-time, namely, by means of recursion analysis and iterative addition of real-time links, the brain graph representation can be dynamically unfolded and updated along with the change of data analysis dimensions, and the real-time synchronization of the data analysis and the brain graph representation is maintained.
(2) Flexibility and scalability-recursive analysis trees are able to handle complex data analysis dimensional sequences, both linear and non-linear, efficiently by recursive analysis. Meanwhile, the method also supports adding new analysis dimension in the brain graph, and expands the representation capability of the brain graph.
(3) Intuitively and easily understood, namely through the brain graph representation of hierarchical expansion, a user can intuitively see the relationship between the hierarchical structure and the dimension of data analysis, and is convenient for the user to understand and analyze the data.
(4) The manual operation is reduced, the automatic recursion analysis and dimension iteration reduce the workload of manually creating and updating brain map representations by a user, and the working efficiency is improved.
(5) The method can support data analysis dimension sequences with various data types and formats due to the universality of the recursion analysis tree, and has wide applicability.
The following is a simplified exemplary code for illustrating the basic implementation logic of the above scheme:
optionally, generating a target data analysis table according to the hierarchical unfolded brain graph, wherein the target data analysis table comprises capturing node and link relations of the hierarchical unfolded brain graph;
Backtracking the captured node and the link relation to the data set to match metadata; and filling the matched metadata into the initialized data analysis table to generate a target data analysis table.
For this purpose, the method for generating the target data analysis table according to the hierarchical unfolded brain graph has the following technical advantages:
(1) Intuitiveness and operability-through a hierarchical expanded brain graph, a user can intuitively understand the structure and relationship of data. The node and link relation in the brain graph are converted into the data analysis table, so that the operability and the analyticity of the data are further enhanced, and a user can perform operations such as data query, screening and statistics more conveniently.
(2) And maintaining the data relevance, namely maintaining the data relevance in the process of backtracking the node and the link relation in the brain graph to the data set to perform metadata matching. This means that the generated target data analysis table can accurately reflect the relationship and hierarchical structure in the original data, and provides powerful support for subsequent data analysis.
(3) Automation and high efficiency, the whole process is realized by an automation script or program, and the possibility of manual intervention and errors is reduced. Meanwhile, because manual operation is reduced, the data processing efficiency is greatly improved, and a user can acquire a required data analysis result more quickly.
(4) The flexibility and expandability of the method are suitable for specific data sets and brain graph structures, and can be flexibly adjusted and expanded according to actual requirements. For example, matching rules of nodes and links, adjusting formats and styles of data analysis tables, etc. can be customized to meet the needs of different users and analysis scenes.
The following is a simplified exemplary code for illustrating the basic implementation logic for generating a target data analysis table from a hierarchically expanded brain map:
The above description is only illustrative of the preferred embodiments of the present application and of the principles of the technology employed. It will be appreciated by persons skilled in the art that the scope of the application referred to in the present application is not limited to the specific combinations of the technical features described above, but also covers other technical features formed by any combination of the technical features described above or their equivalents without departing from the inventive concept described above. Such as the above-mentioned features and the technical features disclosed in the present application (but not limited to) having similar functions are replaced with each other.

Claims (8)

1. A method of generating a data table based on a brain map, comprising:
Acquiring a data set to be analyzed;
converting the data set to be analyzed into a brain map representation;
acquiring a data analysis dimension sequence to perform hierarchical expansion on the brain graph representation;
Generating a target data analysis table according to the hierarchical unfolded brain chart representation;
Wherein the acquiring the data set to be analyzed includes:
constructing a data access request based on the database query statement;
constructing a database connector based on the data access request to access a target data source through the database connector and acquire target data from the target data source, wherein the database query statement comprises at least one of a SELECT statement, a JOIN operation and a WHERE clause;
Based on the data access object mode, according to the object relation mapping frame, packaging the obtained target data to be temporarily stored in a preset container so as to form a data set to be analyzed through object mapping;
the constructing a data access request based on the database query statement includes:
based on a database query statement, carrying out parameterization compiling on the database query statement to construct a data access request;
wherein said converting said data set to be analyzed into a brain map representation comprises:
Preprocessing the data set to be analyzed to generate brain map input data;
encoding the brain map input data to generate brain map node data and brain map link structure data;
generating a brain graph representation according to the brain graph node data and the brain graph link structure data;
wherein the encoding the brain map input data to generate brain map node data and brain map link structure data includes:
And performing feature cross coding on the brain graph input data based on the trained feature cross matrix to generate brain graph node data and brain graph link structure data, wherein the feature cross coding comprises at least one of numerical feature cross, classification feature cross, date and time feature cross and text feature cross.
2. The method of generating a data table based on brain map of claim 1, wherein constructing a database connector based on the data access request to access a target data source and obtain target data therefrom via the database connector comprises:
based on the data access request, instantiating an API of the database interface to create a database session;
Based on the database session, analyzing the connection character string format of the target database, and constructing a connection character string containing a host, a port and a database name;
constructing a database connector according to the constructed connection character string;
creating a cursor object based on the database connector;
instantiate the cursor object to access the target data source and obtain target data therefrom.
3. The method for generating a data table based on brain map according to claim 2, wherein the encapsulating the acquired target data according to the object relation mapping frame based on the data access object mode to temporarily store the target data in a preset container to form a data set to be analyzed mapped by the object comprises:
Creating data access logic based on the data access object schema;
encapsulating the data access logic according to an object relation mapping frame to establish a data encapsulation engine;
and starting a data packaging task based on the data packaging engine to package the acquired target data so as to be temporarily stored in a preset list and form a data set to be analyzed through object mapping.
4. A method of generating a data table based on brain map according to claim 1, wherein said preprocessing the data set to be analyzed to generate brain map input data comprises:
Performing data cleaning on the data set to be analyzed to remove invalid or erroneous data records therein;
Based on a pre-constructed special engineering, converting the data set to be analyzed after data cleaning to obtain brain graph input data, wherein date is converted into a time stamp, and non-date data is converted into a label.
5. A method of generating a data table based on a brain map according to claim 1, wherein said generating a brain map representation from said brain map node data and brain map link structure data comprises:
Instantiating a brain map object to generate a brain map representation according to the brain map node data and brain map link structure data, and adding an interactive function component in the brain map representation;
The instantiating a brain graph object to generate a brain graph representation according to the brain graph node data and brain graph link structure data, and adding an interactive function component in the brain graph representation, which comprises the following steps:
instantiating a brain map object to create a class of cached brain map node data, and a structure of cached brain map link structure data;
And obtaining a matched brain graph representation layout, mapping the class and the structure body to the brain graph representation layout to generate the brain graph representation, and adding an interactive function component in the brain graph representation.
6. The method of generating a data table based on a brain map of claim 5, wherein said adding interactive function components to said brain map representation comprises:
And acquiring defined interaction events, compiling a callback function based on the interaction events, and registering the callback function as an event commission represented by the brain graph so as to represent an added interaction function component in the brain graph.
7. The method of generating a data table based on a brain map of claim 1, wherein the acquiring data analyzes a sequence of dimensions to hierarchically expand the brain map representation, comprising:
acquiring a data analysis dimension sequence, and carrying out recursion analysis on the data analysis dimension sequence to obtain a recursion analysis tree;
performing dimension iteration on the brain graph representation based on the recursion analysis tree to add real-time links in the brain graph;
and carrying out hierarchical expansion on the brain graph representation according to the added real-time links.
8. The method of generating a data table based on brain map according to claim 1, wherein generating a target data analysis table based on the hierarchically expanded brain map comprises:
Capturing node and link relation of the brain graph expanded by the hierarchy;
Backtracking the captured node and the link relation to the data set to match metadata;
And filling the matched metadata into the initialized data analysis table to generate a target data analysis table.
CN202410756104.9A 2024-06-13 2024-06-13 Method for generating data table based on brain graph Active CN118656370B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202410756104.9A CN118656370B (en) 2024-06-13 2024-06-13 Method for generating data table based on brain graph

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202410756104.9A CN118656370B (en) 2024-06-13 2024-06-13 Method for generating data table based on brain graph

Publications (2)

Publication Number Publication Date
CN118656370A CN118656370A (en) 2024-09-17
CN118656370B true CN118656370B (en) 2024-12-06

Family

ID=92704944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202410756104.9A Active CN118656370B (en) 2024-06-13 2024-06-13 Method for generating data table based on brain graph

Country Status (1)

Country Link
CN (1) CN118656370B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111078217A (en) * 2019-11-18 2020-04-28 浙江大搜车软件技术有限公司 Brain graph generation method, apparatus and computer-readable storage medium
CN117271699A (en) * 2023-09-26 2023-12-22 中国银行股份有限公司 Unstructured data management method, device, equipment and storage medium

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9038001B2 (en) * 2004-07-01 2015-05-19 Mindjet Llc System and method for graphically illustrating external data source information in the form of a visual hierarchy in an electronic workspace
CN111338936A (en) * 2020-02-17 2020-06-26 贵阳货车帮科技有限公司 Brain graph data processing method and device, electronic equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111078217A (en) * 2019-11-18 2020-04-28 浙江大搜车软件技术有限公司 Brain graph generation method, apparatus and computer-readable storage medium
CN117271699A (en) * 2023-09-26 2023-12-22 中国银行股份有限公司 Unstructured data management method, device, equipment and storage medium

Also Published As

Publication number Publication date
CN118656370A (en) 2024-09-17

Similar Documents

Publication Publication Date Title
US10025565B2 (en) Integrated software development environments, systems, methods, and memory models
US11526656B2 (en) Logical, recursive definition of data transformations
US5970490A (en) Integration platform for heterogeneous databases
US8060391B2 (en) Analogy based workflow identification
US20040031015A1 (en) System and method for manipulation of software
Kienle et al. Rigi—An environment for software reverse engineering, exploration, visualization, and redocumentation
US8701087B2 (en) System and method of annotating class models
KR20040004619A (en) Method and system for transforming legacy software applications into modern object-oriented systems
US7792851B2 (en) Mechanism for defining queries in terms of data objects
CN109710220B (en) Relational database query method, relational database query device, relational database query equipment and storage medium
Silva et al. Dfanalyzer: runtime dataflow analysis tool for computational science and engineering applications
de Boer et al. Enterprise architecture analysis with xml
CN117908876A (en) Method, device and equipment for generating system page under complex authority scene in government or enterprise informatization field based on model driving
US12038940B2 (en) Architecture for data map converters
CN119130369A (en) Web-based MBSE collaborative R&D management system
CN118656370B (en) Method for generating data table based on brain graph
Indamutsa et al. Advanced discovery mechanisms in model repositories
CN117873443A (en) Code generation method and system based on sql query statement
Abdelhedi et al. Conceptual modeling of a document-oriented NoSQL database
Burd et al. A method for the identification of reusable units through the reengineering of legacy code
Fakhre Alam et al. A comparative study of RDF and topic maps development tools and APIs
Odegua et al. Building Data-Driven Applications with Danfo. js
Thiran et al. Generation of conceptual wrappers for legacy databases
Fernández et al. A generic programming toolkit for PADS/ML: First-class upgrades for third-party developers
Shekar et al. Knowledge extraction in the seek project part ii: Extracting meaning from legacy application code through pattern matching

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant