Data analysis method and system, and related device
By introducing multi-layer mapping relationships of metadata layer, semantic layer and model layer in the data analysis system, the problems of poor flexibility in analytical models and high learning costs in query users in the prior art are solved, and data analysis solutions with high flexibility and low learning costs are realized.
Patent Information
- Application Number
- PCT/CN2024/129210
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-03
- Filing Date
- 2024-11-01
- Publication Date
- 2025-05-08
AI Technical Summary
When establishing an analysis model, existing data analysis tools need to establish a mapping relationship between table data and the analysis model, resulting in poor flexibility and adaptability of the analysis model. In addition, query users need to understand database query statements, which is very cost-effective.
Provide a data analysis system, including a metadata layer, a semantic layer and a model layer, through the metadata layer, establish a physical mapping relationship between metadata and table data, the semantic layer establishes a knowledge graph and semantic mapping relationship, and the model layer establishes a model mapping relationship between the analysis model and nodes, realizing the decoupling of the analysis model and the underlying table data.
It improves the flexibility and adaptability of the analytical model, reduces maintenance costs, and query users can complete data queries through natural language, reducing learning costs and query complexity.
Smart Images

Figure CN2024129210_08052025_PF_FP_ABST
Abstract
Description
Data analysis method, system and related equipment
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on November 3, 2023, with application number 202311473247.0 and application name “A data analysis method, system and related equipment”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of computers, and in particular to a data analysis method, system, and related equipment. Background Art
[0003] With the advent of the information age, data in various fields has exploded. This explosive growth has provided enormous opportunities for data analysis, and data analysis has become a key technology in various industries. For example, in the healthcare field, data analysis of large-scale clinical data and bioinformatics data can be used to assist in patient treatment, epidemiological research, and drug development. In the financial field, data analysis of transaction data, customer behavior, and macroeconomic indicators can help financial institutions or corporate finance departments conduct risk assessments, market forecasts, and investment planning. In the social media field, data analysis of user data can help social media platforms make personalized recommendations, ad targeting, and sentiment analysis, thereby improving user experience. Data analysis has a wide range of applications in various fields.
[0004] When current data analysis tools establish an analysis model, if the analysis model needs to use certain table data for data analysis, it is usually necessary to establish a mapping relationship between the table data and the analysis model, so that the analysis model can automatically obtain the table data based on the mapping relationship to complete the data analysis. However, if the table data changes, the analysis model must also be adjusted accordingly, resulting in poor flexibility and adaptability of the analysis model.
[0005] Summary of the Invention
[0006] The present application provides a data analysis method, system and related equipment for solving the problems of poor flexibility and poor adaptability of analysis models.
[0007] In a first aspect, a data analysis system is provided, which includes a metadata layer, a semantic layer, and a model layer, wherein the metadata layer is used to store a physical mapping relationship between first metadata and first table data, wherein the first metadata is used to describe the first table data, the semantic layer is used to store a knowledge graph and a semantic mapping relationship between a first node in the knowledge graph and the first metadata, the semantic mapping relationship is used to indicate that the semantics of the first label is related to the first metadata, the model layer is used to store an analysis model and a model mapping relationship between the analysis model and the first node, the analysis model is used to obtain the first table data through the model mapping relationship, the semantic mapping relationship, and the physical mapping relationship, and complete data analysis based on the first table data to generate second table data.
[0008] Implement the system described in the first aspect, establish a physical mapping relationship between metadata and table data of the underlying physical table through metadata, establish a knowledge graph through the semantic layer, and a semantic mapping relationship between nodes in the knowledge graph and metadata, and establish a model mapping relationship between the analysis model and the node through the model layer. By notifying such a multi-layer mapping relationship, the analysis model can be decoupled from the underlying table data, and changes in the underlying data will not affect the analysis model. The analysis model has strong flexibility and adaptability.
[0009] In one possible implementation, the system includes an extraction unit, the semantic layer includes a graph query unit, and the metadata layer includes a table query unit, wherein the extraction unit is used to obtain a query text sent by a first user, wherein the query text is a natural language text; the graph query unit is used to obtain keywords in the query text, determine the first node corresponding to the keyword based on matching the keywords with labels of multiple nodes in the knowledge graph, determine the first metadata mapped to the first node based on the semantic mapping relationship, and the table query unit is used to determine the first table data corresponding to the first metadata based on the physical mapping relationship, and send the first table data to the first user.
[0010] The above implementation method establishes a knowledge graph containing semantic tags and completes the semantic mapping relationship between nodes and metadata, so that the first user can complete the query through natural language query text when querying data. The data analysis system can match the keywords in the query text entered by the first user with the semantic tags of the nodes, determine the first node corresponding to the keywords, and change the data query process from retrieval to matching. Not only is the query efficiency higher, but the first user does not need to learn relevant knowledge of database queries, and can enter natural language to query data, thereby improving the first user's user experience.
[0011] In a possible implementation, the metadata layer includes a mapping unit configured to generate the second metadata according to the storage address and table structure information of the second table data, and establish a physical mapping relationship between the second metadata and the second table data.
[0012] Optionally, the metadata layer may also include a metadata configuration unit for receiving a metadata configuration request sent by a second user, and updating the physical mapping relationship between the metadata and the table data according to the metadata configuration request. The metadata configuration request may include the target metadata requested by the second user, and the target physical mapping relationship between the target metadata and the target table data. The metadata configuration unit may establish the target metadata and the target physical mapping relationship based on the metadata configuration request. In simple terms, the analysis user can customize metadata for some physical tables according to his or her own needs, customize the physical mapping relationship between metadata and physical tables, or the data analysis system can automatically establish the physical mapping relationship based on the mapping unit. This application does not make specific limitations.
[0013] It should be noted that the first user can be understood as a query user who queries data, and the second user can be understood as an analysis user who builds an analysis model to complete data analysis. In this application, the first user is the query user, and the second user is the analysis user.
[0014] In a specific implementation, the metadata may include the table structure information of the table data and the address information of the table data, wherein the table structure information may include one or more of the database name, table name, and field name. A table data may include multiple fields, so a table data may correspond to multiple metadata. Metadata may also include more information, such as field data type, field length, primary key, foreign key, index, table type, table version information, etc. The content of the metadata can be flexibly set according to actual business needs, and this application does not make specific restrictions.
[0015] The above implementation method establishes a physical mapping relationship between table data and metadata through the metadata layer, so that the analysis model can be established based on metadata instead of table data, thereby decoupling the physical table and the analysis model. If the table data changes, the analysis model can adapt to the new data structure, field changes or other types of changes by adjusting the metadata without redesigning or modifying the analysis model. The existence of the metadata layer can improve the flexibility and adaptability of the analysis model and reduce maintenance costs.
[0016] In one possible implementation, the semantic layer includes a node configuration unit, which is used to obtain a node configuration request sent by a second user, create a second node based on the node configuration request, and establish a semantic mapping relationship between the second node and the second metadata, wherein the node configuration request includes a label of the second node and a semantic mapping relationship between the second node and the second metadata.
[0017] In the above implementation, the second user can configure the label of the second node according to his or her needs, and determine the second metadata that establishes a semantic mapping relationship with the second node. The system can complete the physical mapping relationship between the second metadata and the second table data through the above mapping unit. In this way, when the first user requests to query the second table data, he or she can enter the query text, and the data analysis system can match the keywords in the query text with the labels of the nodes in the knowledge graph, determine the second node that matches the keywords, and then determine the second metadata mapped to the second node according to the semantic mapping relationship, and then obtain the second table data corresponding to the second metadata. The above implementation allows the second user to simply configure the semantic mapping relationship to implement the natural language query of the first user, and the system does not need to understand the semantics of the query text entered by the first user during the query process. It can obtain the second table data by simply matching it with the knowledge graph, and the query efficiency is higher.
[0018] In one possible implementation, the semantic layer includes a generation unit, which is used to establish a second node in the knowledge graph, determine the semantic information of the second metadata based on a semantic recognition model, generate a label for the second node based on the semantic information, and establish a semantic mapping relationship between the second node and the second metadata.
[0019] Optionally, the generation unit can determine edges between nodes in the knowledge graph based on edge design rules. Specifically, edges can be used to connect nodes corresponding to metadata with associated relationships, allowing the relationships between table data to be displayed in the knowledge graph, thereby improving the efficiency and accuracy of association analysis.
[0020] In a specific implementation, edge design rules may include intra-table relationship rules. Edges generated by such rules indicate that there are intra-table relationships between metadata corresponding to nodes. Intra-table relationships include, but are not limited to, primary key dependencies, common dependencies, and field value-attribution relationships. A primary key dependency relationship refers to a primary key in one table corresponding to a foreign key in another table; a common dependency relationship refers to a field in one table being dependent on a field in another table; and a field value-attribution relationship refers to a field in one table being attributed to a field in another table. It should be understood that the aforementioned physical intra-table relationships are for illustrative purposes only and are not specifically limited in this application.
[0021] Optionally, the edge design rules may also include inter-table relationship rules. The edges generated by such rules indicate that there is an inter-table relationship between the metadata corresponding to the nodes. The inter-table relationship includes but is not limited to the relationship between tables, foreign key correspondence, and equivalence relationship between fields. Among them, the relationship between tables refers to the existence of a one-to-one, one-to-many, or many-to-many relationship between two tables, the foreign key correspondence refers to the existence of a correspondence between foreign keys between cross-table fields, and the equivalence relationship between fields refers to the existence of fields with the same meaning in different data tables, for example, the total sales field and the sales amount field have the same meaning but have different names. It should be understood that the above examples are for illustration only and are not specifically limited in this application.
[0022] Optionally, edge design rules may include relationship rules between indicator dimensions and tables. Edges generated by such rules indicate that there exists a relationship between indicator dimensions and tables between metadata corresponding to nodes. The relationship between indicator dimensions and tables may include relationships between indicators and physical fields, relationships between dimensions and physical fields, relationships between dimension values and dimensions, relationships between dimension values and field values, relationships between metrics and field values, relationships between field values and indicators, relationships between indicators and dimensions, and relationships between indicators and dimensions. It should be understood that the above examples are for illustrative purposes only and are not specifically limited in this application.
[0023] With the above implementation, the data analysis system can automatically generate node labels based on metadata and establish semantic mapping relationships. At the same time, the data analysis system can determine the edges between nodes in the knowledge graph based on the association relationships between table data, so that the association relationships between table data can also be displayed in the knowledge graph, which can improve the efficiency and accuracy of association analysis.
[0024] In one possible implementation, the model layer includes a model configuration unit, which is used to obtain a model configuration request sent by a second user. The model configuration request includes model data of the analysis model requested to be set by the second user, and a model mapping relationship between the analysis model and the first node. The model configuration request is generated by the second user based on the label of the node in the knowledge graph. The model configuration unit is used to create an analysis model and establish a model mapping relationship between the analysis model and the first node.
[0025] In a specific implementation, the model configuration unit can add an analysis model and the aforementioned model mapping relationship to the model database based on the model configuration request. Simply put, the second user can create an analysis model based on their needs and define the model mapping relationship between the analysis model and the nodes. Specifically, the second user can determine the nodes associated with the analysis model based on the indicators, dimensions, table structure information, and entities required by the analysis model, and establish the model mapping relationship between the nodes and the analysis model.
[0026] Furthermore, after the analysis model is configured, the second user can initiate a data analysis request to the data analysis system. The model configuration unit can call the analysis model, obtain the node in the knowledge graph according to the model mapping relationship, and then obtain the metadata corresponding to the node according to the semantic mapping relationship, obtain the table data corresponding to the metadata according to the physical mapping relationship, and then complete the data analysis based on the table data to obtain the data analysis results and generate the table data corresponding to the data analysis results. The mapping unit in the metadata layer can generate the metadata corresponding to the table data and obtain the physical mapping relationship between the metadata and the table data. The generation unit in the semantic layer can generate the label of the node corresponding to the metadata and obtain the semantic mapping relationship between the node and the metadata. After the knowledge graph has the node corresponding to the analysis result, when the first user queries the analysis result, he can enter natural language to query the analysis result, thereby improving the query experience.
[0027] With the above implementation method, the second user can create an analysis model according to his or her own data analysis needs, and establish a model mapping relationship between the nodes and the analysis model based on the semantic nodes in the knowledge graph. When creating the analysis model, the second user does not need to understand the details of the underlying database, table, and field. Based on the semantic knowledge graph, the second user can obtain the various characteristics of the underlying physical table, thereby simplifying the second user's use of table data and improving the second user's usage experience.
[0028] In one possible implementation, optionally, the label of each node may include one or more attributes, and each attribute may describe the semantic representation of the node from different dimensions. For example, the label of the node may include the following attributes: field name, data type, whether it is a measurement field, etc. For example, the label of node A includes label 1: basketball player, and label 2: programmer, where label 1 includes the following attributes: team, position, average points per game, etc., and label 2 includes the following attributes: company, job level, length of service, etc. The above examples are for illustrative purposes only and are not specifically limited in this application.
[0029] The above implementation method can make the semantic representation of metadata richer and more accurate through multi-attribute node labels. First, when users query data on the knowledge graph, they can use different attributes to filter, sort and search nodes, making data query and retrieval more flexible and accurate.
[0030] In one possible implementation, the semantics of the first tag is related to the first metadata, including: the semantics of the tag of the first node is the same as the table structure information in the first metadata, and the table structure information includes one or more of a field, a table name, and a database name.
[0031] Optionally, the semantics of the first label is related to the first metadata, including: the semantics of the label of the first node is the name of an indicator or dimension, and the first table data corresponding to the first metadata participates in the calculation of the indicator or dimension.
[0032] Optionally, the semantics of the first label is related to the first metadata, including: the semantics of the label of the first node is the name of the entity, the entity is an object existing in the physical world, and the first metadata has an entity association relationship with the entity, and the association relationship includes one or more of a dependency relationship, a cooperative relationship, a subordinate relationship, a purchasing relationship, a location relationship, and an upstream and downstream relationship.
[0033] In the above implementation, the nodes in the knowledge graph are designed according to three levels: the physical table information layer, the semantic indicator dimension layer, and the public information layer. The nodes designed in the physical table information layer are labels generated based on the metadata of the physical table, that is, the semantics of the label of the first node are the same as the table structure information in the first metadata; the nodes designed in the semantic indicator dimension layer are labels generated according to the semantics of the indicator / dimension, and the metadata that establishes a semantic mapping relationship with this type of node will participate in the calculation of the indicator, that is, the semantics of the label of the first node is the name of the indicator or dimension; the nodes designed in the public information layer are labels generated according to the entity data, that is, the semantics of the label of the first node is the name of the entity. Designing the semantic labels of the nodes in the knowledge graph at multiple levels in this way allows the knowledge graph to better represent the characteristics of the table data, which not only facilitates the flexible establishment of analysis models by the second user, but also facilitates the flexible semantic query of the first user.
[0034] In a second aspect, a data analysis method is provided, which is applied to a data analysis system. The data analysis system includes a metadata layer and a semantic layer. The metadata layer is used to store a physical mapping relationship between first metadata and first table data, wherein the first metadata is used to describe the first table data; the semantic layer is used to store a knowledge graph and a semantic mapping relationship between a first node in the knowledge graph and the first metadata, and the semantic mapping relationship is used to indicate that the semantics of the first label are related to the first metadata. The method includes the following steps: obtaining a query text sent by a first user, determining keywords in the query text, wherein the query text is a natural language text, matching keywords with labels of multiple nodes in the knowledge graph based on the knowledge graph in the semantic layer, determining the first node corresponding to the keyword, determining the first metadata mapped by the first node according to the semantic mapping relationship, determining the first table data mapped by the first metadata based on the physical mapping relationship in the metadata layer, and sending the first table data to the first user.
[0035] Implementing the method described in the second aspect, by establishing a knowledge graph containing semantic tags and completing the semantic mapping relationship between nodes and metadata, the first user can complete the query through natural language query text when querying data. The data analysis system can match the keywords in the query text entered by the first user with the semantic tags of the nodes, determine the first node corresponding to the keywords, and change the data query process from retrieval to matching. Not only is the query efficiency higher, but the first user does not need to learn relevant knowledge of database queries, and can enter natural language to query data, thereby improving the first user's user experience.
[0036] In one possible implementation, the data analysis system also includes a model layer, which is used to store the analysis model and the model mapping relationship between the analysis model and the first node. The analysis model is used to obtain the first table data through the model mapping relationship, the semantic mapping relationship and the physical mapping relationship, and complete the data analysis based on the first table data. The method also includes the following steps: receiving a data analysis request sent by a second user, the data analysis request includes information about the analysis model, obtaining the analysis model, determining the first node mapped by the analysis model based on the model mapping relationship in the model layer, determining the first metadata mapped by the first node based on the semantic mapping relationship in the semantic layer, determining the first table data mapped by the first metadata based on the physical mapping relationship in the metadata layer, inputting the first table data into the analysis model to obtain the second table data, and storing the second table data.
[0037] In one possible implementation, after storing the second table data, the method further includes the following steps: generating second metadata based on the storage address and table structure information of the second table data, and establishing a physical mapping relationship between the second metadata and the second table data at the metadata layer.
[0038] In one possible implementation, the method further includes the following steps: creating a second node in the knowledge graph of the semantic layer, determining the semantic information of the second metadata based on the semantic recognition model, generating a label for the second node based on the semantic information, and establishing a semantic mapping relationship between the second node and the second metadata in the semantic layer.
[0039] In one possible implementation, the method further includes the following steps: obtaining a node configuration request sent by a second user, creating a second node in the knowledge graph of the semantic layer based on the node configuration request, and establishing a semantic mapping relationship between the second node and the second metadata in the semantic layer, wherein the node configuration request includes a label of the second node and a semantic mapping relationship between the second node and the second metadata.
[0040] In one possible implementation, before receiving the data analysis request sent by the second user, the method also includes the following steps: obtaining a model configuration request sent by the second user, the model configuration request including the model data of the analysis model requested to be set by the second user, and the model mapping relationship between the analysis model and the first node, the model configuration request is generated by the second user based on the label of the node in the knowledge graph, creating an analysis model, and establishing a model mapping relationship between the analysis model and the first node.
[0041] In a possible implementation, the semantics of the label of the first node is the same as the table structure information in the first metadata, and the table structure information includes one or more of a field, a table name, and a database name.
[0042] In a possible implementation, the semantics of the label of the first node is the name of an indicator or dimension, and the first table data corresponding to the first metadata participates in the calculation of the indicator or dimension.
[0043] In one possible implementation, the semantics of the label of the first node is the name of the entity, the entity is an object existing in the physical world, and the first metadata has an entity association relationship with the entity, and the association relationship includes one or more of a dependency relationship, a cooperative relationship, a subordinate relationship, a purchasing relationship, a location relationship, and an upstream and downstream relationship.
[0044] In a third aspect, a computing device is provided, which includes a processor and a memory, wherein the memory is used to store instructions and the processor is used to execute instructions, so that the computing device implements the method described in the first aspect.
[0045] In a fourth aspect, a computer-readable storage medium is provided, in which instructions are stored. When the instructions are executed by a computing device or a computing device cluster, the method described in the first aspect is implemented.
[0046] In a fifth aspect, a computing device cluster is provided, which includes at least one computing device, each of the at least one computing device includes a processor and a memory, and the processor of the at least one computing device is used to execute instructions stored in the memory of the at least one computing device, so that the computing device cluster implements the method described in the first aspect.
[0047] In a sixth aspect, a computer program product comprising instructions is provided, wherein the computer program product includes instructions that can be run on a computing device or stored in software or program products in any available medium, and when the computer program product is run on a computing device or a computing device cluster, the computing device or computing device cluster executes the method described in the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] FIG1 is an architecture diagram of a data analysis system provided by the present application;
[0049] FIG2 is a schematic flow chart of the steps of a configuration method in a data analysis method provided by the present application;
[0050] FIG3 is a flow chart of configuration steps in an application scenario;
[0051] FIG4 is an exemplary interface of a data analysis method provided by the present application;
[0052] FIG5 is another exemplary interface of a data analysis method provided by the present application;
[0053] FIG6 is an example diagram of another configuration node interface provided by the present application;
[0054] FIG7 is a schematic flow chart of the steps of a configuration method in a data analysis method provided by the present application;
[0055] FIG8 is an exemplary interface for data query provided by the present application;
[0056] FIG9 is a structural diagram of a computing device provided by the present application. DETAILED DESCRIPTION
[0057] With the advent of the information age, data in various fields has exploded. This explosive growth has provided enormous opportunities for data analysis, and data analysis has become a key technology in various industries. For example, in the healthcare field, data analysis of large-scale clinical data and bioinformatics data can be used to assist in patient treatment, epidemiological research, and drug development. In the financial field, data analysis of transaction data, customer behavior, and macroeconomic indicators can help financial institutions or corporate finance departments conduct risk assessments, market forecasts, and investment planning. In the social media field, data analysis of user data can help social media platforms make personalized recommendations, ad targeting, and sentiment analysis, thereby improving user experience. Data analysis has a wide range of applications in various fields.
[0058] Typically, data analysis tools are used by two types of users: analysts and query users. Analysts use data analysis tools to build analytical models and obtain analysis results, while query users query the analysis results. Although data analysis has been widely used in various fields, current data analysis tools still have many shortcomings.
[0059] For analysis users, when using data analysis tools to establish an analysis model, if the analysis model needs to use certain table data for data analysis, it is usually necessary to establish a mapping relationship between the table data and the analysis model, so that the analysis model can automatically obtain the table data based on the mapping relationship to complete the data analysis. However, if the table data changes, the analysis model must also be adjusted accordingly, resulting in poor flexibility and adaptability of the analysis model.
[0060] For query users, when querying analysis results or other table data, they need to have a certain understanding of the database, such as knowing how to use query statements and memorizing various table names and field names. However, most query users are non-technical personnel. For example, financial personnel may not understand the basic knowledge of the database, which makes the learning cost of query users high.
[0061] In summary, current data analysis tools not only have a certain learning cost and poor user experience, but also have poor flexibility and adaptability, making it difficult to meet users' business needs.
[0062] In order to solve the problems of poor flexibility, poor adaptability, and high learning cost of data analysis tools, the present application provides a data analysis solution, in which the data analysis system includes a metadata layer, a semantic layer, and a model layer. The metadata layer is used to manage metadata and establish a physical mapping relationship between metadata and table data of the underlying physical table. The semantic layer is used to manage the knowledge graph. The knowledge graph includes multiple nodes and multiple edges, and establishes a semantic mapping relationship between the node and the metadata. The semantic mapping relationship is used to indicate that the semantics of the node's label is related to the metadata. The model layer is used to manage the analysis model and establish a model mapping relationship between the analysis model and the node. Through multi-layer mapping relationships, the data analysis system decouples the analysis model from the underlying table data. Changes in the underlying data will not affect the analysis model. The analysis model has strong flexibility and adaptability, and the analysis user does not need to adjust the analysis model, thereby improving the user experience of the analysis user. At the same time, since the nodes in the knowledge graph contain semantic labels, the query user can complete the data query through natural language. The data analysis system can match the keywords in the query text entered by the query user with the semantic label of the node, and determine the first node corresponding to the keyword, so that the data query process changes from retrieval to matching. Not only is the query efficiency higher, but the query user does not need to learn relevant knowledge of database query. They can enter natural language to query data, thereby improving the user experience of the query user.
[0063] The technical solution provided in this application is explained below with reference to the accompanying drawings.
[0064] Figure 1 is an architectural diagram of a data analysis system provided by the present application. As shown in Figure 1, the structure may include a client 100, a data analysis system 200, and a storage system 300, wherein there is a communication connection between the client 100, the data analysis system 200, and the storage system 300, which may be a wired connection or a wireless connection, which is not specifically limited in this application. The number of clients 100 that establish a communication connection with the data analysis system 200 may be one or more, and the number of storage systems 300 that establish a communication connection with the data analysis system 200 may be one or more. Figure 1 uses one client 100 and one storage system 300 as an example for illustration, which is not specifically limited in this application.
[0065] The client 100 is used to implement human-computer interaction and can be deployed on terminal devices, including personal computers, smart phones, wearable devices, handheld processing devices, tablet computers, mobile notebooks, augmented reality (AR) devices, virtual reality (VR) devices, integrated handheld devices, wearable devices, vehicle-mounted devices, smart conferencing devices, smart advertising devices, smart home appliances, etc. Smart home appliances can be sweeping robots, mopping robots, etc., which are not specifically limited here.
[0066] In a specific implementation, the client 100 can be software or an application running on a terminal device or computing device controlled by a user, such as a personal computer (PC) client, a browser-based World Wide Web (web) client, an application (APP) client running on a mobile terminal, or a console of a cloud platform, and this application does not make any specific limitations.
[0067] In specific implementations, the client 100 is applied to data analysis, data mining, data exploration, data query and other fields with data analysis and query needs, including but not limited to the biomedicine field (such as epidemiological research, drug development, etc.), finance field (risk assessment, market forecasting, etc.), social media field (personalized recommendation, advertising positioning, sentiment analysis, etc.), sales field (pricing strategy, inventory management, customer relationship management, etc.), etc., and can also be applied to more fields with data analysis needs, which are not illustrated here one by one.
[0068] Alternatively, the client 100 may be a client for implementing data analysis functions. In different data analysis fields, the type of client 100 and the type of user may vary. For example, in the biomedical field, the client 100 may be a bioinformatics tool, statistical analysis software, etc., which are tools for processing and analyzing biological data such as genomes, proteomes, and gene expression; in the social media field, the client 100 may be a data mining tool, a social media analysis platform, etc., which are tools for discovering public opinion trends, user interactions, and sentiment analysis from social media data; in the financial field, the client 100 may be a financial modeling tool, a risk analysis tool, etc., which are tools for market analysis, portfolio optimization, and risk management; in the sales field, the client 100 may be an inventory management tool, a pricing analysis tool, etc., which are tools for optimizing inventory, supply chain analysis, and formulating product pricing strategies. It should be understood that the above examples are for illustration only and are not specifically limited in this application.
[0069] Optionally, the client 100 can be a separate client specifically used to implement data analysis functions, or it can be a data analysis function module or plug-in within comprehensive software, such as data analysis and query modules within data mining software, financial analysis assistants and data query assistants in commonly used (office automation, OA) clients in enterprises, etc. This application does not make specific limitations.
[0070] Optionally, client 100 may also be a client of a cloud platform, such as a console of a cloud platform, specifically a web-based console or an application programming interface (API)-based console, which is not specifically limited in this application. The console can provide data analysis cloud services to management users, and users can obtain access to the data analysis system 200 provided in this application by purchasing cloud services.
[0071] The data analysis system 200 and storage system 300 can be deployed on a computing device or computing device cluster, including bare metal servers (BMSs), virtual machines (VMs), containers, or edge computing devices. A BMS refers to a general-purpose physical server, such as an ARM server or an X86 server. A VM is a complete computer system with complete hardware system functionality, running in a completely isolated environment, simulated by software. Any work that can be performed on a physical computer can also be performed on a VM. When creating a VM on a computing device, a portion of the physical machine's hard disk and memory capacity is used as the VM's hard disk and memory capacity. Each VM has its own independent basic input / output system (BIOS), hard disk, and operating system, allowing it to be operated just like a physical machine. A container is a portable software unit that combines an application and all its dependencies into a single software package. This package is not limited by the underlying host operating system, eliminating the need to build a complex environment and simplifying the application development and deployment process. Edge computing devices are devices that are closer to data sources and end users, featuring low latency and high bandwidth, such as smart routers and edge servers. The computing device cluster may include multiple computing devices as described above, such as a data center, which is not specifically limited in this application. The storage system 300 may also be deployed in a storage array, such as a redundant array of independent disks (RAID), network-attached storage (NAS), or a storage area network (SAN), which is not specifically limited in this application.
[0072] Optionally, the data analysis system 200 and the storage system 300 can be deployed in the same computing device, or in different computing devices in the same computing device cluster, or in computing devices and storage arrays in the same computing device cluster, or in different computing device clusters. This application does not make specific limitations.
[0073] Optionally, the data analysis system 200 and the client 100 can be deployed in the same or different computing device clusters, for example, the client 100 is deployed on a terminal device in a first computing device cluster, and the data analysis system 200 is deployed on a computing device in a second computing device cluster; or, the client 100 and the data analysis system 200 are deployed in the same computing device cluster. It should be understood that the above examples are for illustration only and are not specifically limited in this application.
[0074] Furthermore, the data analysis system 200 in Figure 1 can be further divided into one or more unit modules. For example, as shown in Figure 1, the data analysis system 200 includes a metadata layer 210, a semantic layer 220 and a model layer 230, wherein the metadata layer 210 may include a metadata configuration unit 211, a mapping unit 212, a metadata database 213 and a table query unit 214, the semantic layer 220 may include a node configuration unit 221, a generation unit 222, a graph database 223 and a graph query unit 224, and the model layer 230 may include a model configuration unit 231, an analysis model database 232 and an extraction unit 233. It should be understood that Figure 1 is an exemplary division method, and the client 100, the data analysis system 200 and the storage system 300 may also include more or fewer units, which is not specifically limited in this application.
[0075] It should be noted that the structure shown in FIG1 can be an implementation method in which the data analysis system 200 is deployed on a single computing device. When the data analysis system 200 is deployed on a computing device cluster consisting of multiple computing devices, different computing devices in the computing device cluster can respectively store instructions for implementing the metadata layer 210, the semantic layer 220, and the model layer 230. For example, computing device A in the computing device cluster stores instructions for implementing the model layer 230, and computing device B stores instructions for implementing the semantic layer 220 and the metadata layer 210. The above examples are for illustration only and are not specifically limited in this application. Of course, different computing devices can also store the same instructions, for example, computing device B and computing device C both store a combination of instructions for the semantic layer 220 and the metadata layer 210 to implement their functions, and this application does not specifically limit this.
[0076] The functions of each layer in the data analysis system 200 are described below.
[0077] First, the functions of the metadata layer 210 , the semantic layer 220 , and the model layer 230 will be described.
[0078] Metadata layer 210 manages metadata and records the physical mapping relationship between metadata and table data. Metadata is data that describes table data, and table data is data in storage system 300. Storage system 300 includes table database 310, and table data is stored in table database 310. Metadata and physical mapping relationships can be stored in metadata database 213.
[0079] Optionally, the metadata may include table structure information and address information of the table data, wherein the table structure information may include one or more of a database name, a table name, and a field name. A table data may include multiple fields, and thus a table data may correspond to multiple metadata.
[0080] For example, the storage address of table X is Y, and table X includes multiple fields such as time, region, sales revenue, etc., then metadata A may include the field "time" and storage address Y, metadata B may include the field "region" and storage address Y, and metadata C may include the field "sales revenue" and storage address Y. It should be understood that the above examples are for illustration only and this application does not make specific limitations.
[0081] It should be noted that if the data of the entire table is stored in the same physical location, then the storage address in the metadata is the table-level storage address. If different fields in the table data are stored in different physical locations, then the storage address in the metadata can be a field-level storage address. Usually, in the case of a distributed storage system or sharded storage, different fields in the table data may be stored in different physical locations. Therefore, the specific form of the storage address in the metadata can be flexibly configured according to the actual business scenario, and this application does not make any specific limitations.
[0082] Optionally, the metadata may also include more information, such as field data type, field length, primary key, foreign key, index, table type, table version information, etc. The content of the metadata can be flexibly set according to actual business needs, and this application does not make specific limitations.
[0083] Optionally, the metadata layer 210 can store metadata in the form of a metadata graph, which includes multiple nodes and edges, wherein a node represents a piece of metadata, and an edge between nodes indicates that there is an association relationship between the metadata, which includes an attribution relationship. For example, if table A belongs to database B, then there is an edge between node A and node B. For example, if field C belongs to table D, then there is an edge between node C and node D. For example, if value E belongs to field F, then there is an edge between node E and node F. The above examples are for illustration only and are not specifically limited in this application.
[0084] It should be understood that by establishing a physical mapping relationship between table data and metadata through the metadata layer 210, the analysis model can be established based on metadata rather than table data, thereby realizing the decoupling of the physical table and the analysis model. If the table data changes, the analysis model can adapt to the new data structure, field changes or other types of changes by adjusting the metadata without redesigning or modifying the analysis model. The existence of the metadata layer 210 can improve the flexibility and adaptability of the analysis model and reduce maintenance costs.
[0085] The semantic layer 220 is used to manage the knowledge graph and record the semantic mapping relationship between each node in the knowledge graph and metadata. The knowledge graph and the semantic mapping relationship can be stored in the graph database 223.
[0086] Optionally, the knowledge graph may include physical nodes and conceptual nodes, where physical nodes refer to nodes corresponding to real entities or objects in the physical world, such as companies, customers, partners, subsidiaries, contracts, logistics information, etc., and conceptual nodes refer to nodes corresponding to some conceptual entities in the actual business field. Conceptual entities are nodes in the knowledge graph that represent abstract concepts or categories. They usually do not correspond to specific entities in the real world, but are used to represent general concepts, categories, or themes. In an embodiment of the present application, conceptual nodes may include nodes corresponding to indicators and nodes corresponding to dimensions. The node corresponding to the indicator may be the "net sales revenue of the same period last year" node, and the node corresponding to the dimension may be the "time" node. It should be understood that the above examples are for illustration and this application does not make specific limitations.
[0087] Optionally, the label of a node can be a semantic representation of metadata that establishes a semantic mapping relationship with the node. The semantic representation can be a semantic representation of a field in the metadata, or a semantic representation of a table name in the metadata, or a semantic representation of a database name in the metadata. This application does not make specific limitations. A node can establish a semantic mapping relationship with one or more metadata. In other words, metadata with the same semantics can establish a semantic mapping relationship with the same node. The above-mentioned semantic representation can specifically be a natural language, such as a word, or a vector or a string. This application does not make specific limitations.
[0088] For example, metadata A may include a field "time" whose semantics represent time. In this case, metadata A can establish a second mapping relationship with node A1, with node A1's label being "time." Metadata B may include a field "trail" whose semantics represent path. Metadata C also includes a field "trail," but metadata B and metadata C correspond to different table data. In this case, metadata B can establish a second mapping relationship with node A2, and metadata C can also establish a second mapping relationship with node A2, with node A2's label being "path." It should be understood that the above examples are for illustrative purposes only and are not intended to be limiting in this application.
[0089] Optionally, the node label can also be the name of an indicator or dimension. This indicator or dimension requires table data from multiple fields to participate in the calculation. The table data corresponding to the metadata associated with the node is the table data involved in the calculation. For example, the metadata associated with the node labeled "Net sales revenue of the same period last year" may include "Total sales revenue", "Sales cost", "Sales expenses", etc. These metadata participate in the calculation of net sales revenue of the same period. It should be understood that placing some commonly calculated indicators in the knowledge graph can directly return the commonly used indicators when the query user queries them, reducing the computational cost of data query and improving query performance.
[0090] Optionally, the label of the node in the knowledge graph can also be the name of the entity, such as subsidiary A, subsidiary B, supplier C, etc. The metadata associated with the node has an entity association relationship with the entity. The entity association relationship may include ownership relationship, dependency relationship, parent-child relationship, cooperation relationship, subordination relationship, purchasing relationship, upstream and downstream relationship, location relationship, etc. This application does not limit the entity association relationship. For example, if area A includes subsidiary A and subsidiary B, then the label "area A" can establish a semantic mapping relationship with the metadata "subsidiary A" and the metadata "subsidiary B". It should be understood that splitting the entity into independent nodes enables the knowledge graph to better reflect the complex relationships between entities in the real world and facilitates the establishment of analysis models.
[0091] It should be understood that the above examples provide possible labels for nodes in the knowledge graph. In specific implementations, the nodes in the knowledge graph can be flexibly set with labels and semantic mapping relationships according to business needs, and this application does not limit this.
[0092] Optionally, the knowledge graph can be stored based on the attribute graph, that is, the label of each node in the knowledge graph may include one or more attributes, and each attribute may describe the semantic representation of the node from different dimensions. For example, the label of the node may include the following attributes: field name, data type, whether it is a measurement field, etc. For example, the label of node A includes label 1: basketball player, and label 2: programmer, where label 1 includes the following attributes: team, position, average points per game, etc., and label 2 includes the following attributes: company, job level, length of service, etc. The above examples are for illustration only and are not specifically limited in this application.
[0093] It should be understood that multi-attribute node labels can make the semantic representation of metadata richer and more accurate. When query users perform data queries on knowledge graphs, they can use different attributes to filter, sort, and search nodes, making data queries and retrieval more flexible and accurate.
[0094] Optionally, nodes with data association relationships are connected by edges. Each edge includes an edge type, and different data association relationships correspond to different edge types. For example, the primary key dependency edge type uses this variable type to connect two nodes, and the primary key in one table corresponds to the foreign key in the other table; for example, the normal dependency edge type indicates that the field in one table depends on the field in another table; for example, the foreign key correspondence edge type indicates that the foreign key in one table corresponds to the primary key in another table. Edge types are used for illustration purposes only. Edges in the knowledge graph can also include more types of edge types, which are not given examples here.
[0095] Furthermore, edges can also include more content, such as the direction, attributes, and explanatory information of the edge. The direction of the edge can include the starting node and the ending node, the attributes can be the strength of the relationship, and the explanatory information can be some notes describing the edge. The above examples are for illustration only and are not specifically limited in this application. It can be understood that by expressing the relationship between different nodes through different types of edges, the data association relationship between table data can also be displayed in the knowledge graph through the edges between nodes. This not only facilitates data association analysis, but also facilitates path query and improves query efficiency.
[0096] It should be noted that the semantic layer 220 may include a large knowledge graph, which includes multiple slices or subgraphs, and different slices or subgraphs may correspond to different business scenarios or dimensions; or, the semantic layer 220 may include multiple small knowledge graphs, and different small knowledge graphs correspond to different business scenarios or dimensions. This application does not make specific limitations.
[0097] It should be understood that by generating semantic representations of metadata through the semantic layer 220 and using them as labels for nodes in the knowledge graph, edges between nodes are then determined based on the data associations between the metadata. This allows the knowledge graph to flexibly and intuitively express the semantics of metadata and the data associations between metadata. Building analysis models based on such knowledge graphs provides better data analysis results, improving the efficiency and accuracy of data analysis. Furthermore, the semantic layer 220 can hide the underlying original physical tables, allowing analysts to create analysis models without having to understand the details of the underlying database, tables, and fields. Based on the semantic knowledge graph, the various characteristics of the underlying physical tables can be understood, thereby simplifying the analysis user's use of table data and improving the analysis user experience. Finally, the aforementioned knowledge graph allows query users to access data in a more semantic manner. Query users can use terms and concepts that are more consistent with business logic to query and operate on data. For example, by simply typing, "I want to see the 2012 financial report," query users no longer need to learn basic database knowledge or how to use various query statements. Data queries can be completed through natural language, reducing the learning cost for query users and improving the query user experience.
[0098] The model layer 230 is used to manage analysis models and record the model mapping relationship between each analysis model and the nodes in the knowledge graph.
[0099] In a specific implementation, the analysis model is used to obtain a table of data through model mapping relationships, semantic mapping relationships in the semantic layer 220, and physical mapping relationships in the metadata layer 210. Data analysis is performed based on the table data to make inferences or decisions. The analysis model and model mapping relationships can be stored in the analysis model database 232.
[0100] In a specific implementation, an analysis model can establish a model mapping relationship with one or more nodes. Analysis users can establish analysis models based on each node in the knowledge graph according to business needs. For example, if the analysis model needs to know the year-on-year net sales revenue indicator and threshold indicator, the model mapping relationship between the node and the model can be established based on the label of each node in the semantic layer 220. Exemplarily, the analysis model established in combination with the knowledge graph may include: an association impact analysis model, a path query model, a subgraph query model, a node query model based on attribute query, a rule loop conflict verification model, a data and rule correlation verification model, a node importance analysis model, etc., which are not specifically limited in this application.
[0101] It should be understood that by establishing a model mapping relationship between the analysis model and the node through the model layer 230, the analysis user can create an analysis model based on the semantically described node. Compared with directly establishing the analysis model through table data, it can not only improve the model creation efficiency of the analysis user, but also because the knowledge graph can flexibly and intuitively express the semantics of the table data and the association relationship between the table data, the analysis model created in this way can have better accuracy.
[0102] In summary, the data analysis system 200 provided by the present application establishes a physical mapping relationship between physical tables and metadata through the metadata layer 210, the semantic layer 220 establishes a semantic mapping relationship between metadata and semantic representation (label) through the knowledge graph, and the model layer 230 establishes a model mapping relationship between the model and the semantic representation. The established analysis model can automatically connect the physical table through the semantic knowledge graph to realize data analysis and calculation. In this way, through multi-layer mapping relationships, the analysis model can be decoupled from the underlying table data, and the underlying data changes will not affect the analysis model, making the analysis model highly flexible and adaptable; at the same time, the knowledge graph in the semantic layer 220 can flexibly and intuitively express the semantics and association relationships of the metadata, so that when the analysis user creates the analysis model, he can complete the creation of the model through semantic labels without having to understand the details of the underlying database, table and field, which simplifies the analysis user's use of table data and improves the analysis user's experience. In addition, the query user can also use a more semantic way to access the data, such as entering natural language to complete the data query, thereby improving the query user's experience.
[0103] The unit modules within each level of the metadata layer 210 , the semantic layer 220 , and the model layer 230 are described below.
[0104] The metadata configuration unit 211 in the metadata layer 210 is used to receive a metadata configuration request sent by the client 100 and update the metadata database 213 according to the metadata configuration request. The metadata database 213 may include metadata and a physical mapping relationship between metadata and table data.
[0105] In a specific implementation, the metadata configuration request may include analyzing the target metadata requested by the user and the target physical mapping relationship between the target metadata and the target table data. The metadata configuration unit 211 may then add the target metadata and the target physical mapping relationship to the metadata repository 213 based on the metadata configuration request. In short, the analysis allows users to customize metadata for some physical tables based on their needs, as well as the physical mapping relationship between the customized metadata and the physical tables.
[0106] Mapping unit 212 in metadata layer 210 is used to update metadata repository 213 based on table data. It should be understood that metadata configuration unit 211 updates metadata and physical mappings in metadata repository 213 through manual configuration, while mapping unit 212 automatically generates metadata and physical mappings for table data based on the table data. Simply put, the metadata and physical mappings in metadata repository 213 can be automatically generated by mapping unit 212 based on the underlying physical tables, or manually generated by a user through metadata configuration unit 211. Different information within the same metadata can also be generated partially manually and partially automatically by the system.
[0107] Referring to the above content, it can be seen that metadata includes at least the table structure information of the table data and the storage address of the table data. For example, metadata includes fields and storage addresses, or metadata includes table names and storage addresses, or metadata includes database names and storage addresses. Therefore, the system can automatically obtain the metadata of the table data by looking up the table, and then map the metadata with the original physical table.
[0108] Furthermore, if the metadata also includes more content, other information related to the table data structure, such as tables, columns, data types, indexes, primary keys, foreign keys, etc., can be automatically generated by table lookup; for other information outside the table data structure, such as business meaning, purpose, description, data dictionary, etc., this type of information can be manually set and generated.
[0109] The node configuration unit 221 in the semantic layer 220 is used to receive and analyze node configuration requests sent by users, and update the graph database 223 according to the node configuration requests.
[0110] In a specific implementation, the node configuration request may include analyzing the label of the target node set by the user request, as well as the target semantic mapping relationship between the target node and the target metadata. Based on the node configuration request, the node configuration unit 221 can add a new target node to the graph database 223, configure a label for it, and then associate the target node with the target metadata. In simple terms, the analysis user can add nodes to the knowledge graph according to business needs, add semantic labels, and establish a semantic mapping relationship between the metadata that conforms to the semantics of the label and the node.
[0111] Optionally, if the label of the manually configured node is the name of an indicator or dimension, then the node configuration request received by the node configuration unit 221 also includes the indicator name, dimension name and indicator formula. The node configuration unit 221 can create a node based on the node configuration request, establish the node label as the indicator name or dimension name, and then establish a semantic mapping relationship between the metadata and the node according to the calculation logic of the indicator formula.
[0112] The generation unit 222 in the semantic layer 220 is used to update the graph database 223 based on metadata. It should be understood that while the node configuration unit 221 updates nodes and semantic mappings in the knowledge graph through manual configuration, the generation unit 222 automatically generates nodes and labels in the knowledge graph based on metadata, automatically completing the semantic mapping between nodes and metadata. Simply put, nodes in the knowledge graph can be generated by analyzing user configuration or automatically generated by the system based on metadata.
[0113] Optionally, if the label of the node is a semantic representation of the metadata, the generation unit 222 can identify the semantic information of the field contained in the metadata through the semantic recognition model, generate the label of the node based on the semantic information, and establish a semantic mapping relationship between the metadata and the node. For example, the field in the metadata M1 is "time", and the semantic recognition model can identify its semantic information as "time". At this time, a node N1 with a label of "time" can be generated, and a semantic mapping relationship between the node N1 and the metadata M1 can be established. For example, the field in the metadata M2 is "trail", and the semantic recognition model can identify its semantic information as "path". At this time, a node N2 with a label of "path" can be generated, and a semantic mapping relationship between the node N2 and the metadata M2 can be established.
[0114] In a specific implementation, the above-mentioned semantic recognition model can be a machine learning model, including but not limited to a word embedding model, a recurrent neural network (RNN), a long short-term memory network (LSTM), a convolutional neural network (CNN), a pre-trained language model, etc., wherein the word embedding model can be Word2Vec (word to vector), GloVe (global vectors for word representation), etc., and the pre-trained language model can be BERT (bidirectional encoder representations from transformers), GPT (generative pre-trained transformer), etc. The above examples are for illustration only and this application does not limit them.
[0115] Optionally, if the node label is the name of an indicator or dimension, and the metadata associated with the node participates in the calculation of the indicator or dimension, then the generation unit 222 can also obtain indicator dimension data, which includes the indicator name, dimension name, and indicator formula. The semantic information of the indicator name and dimension name is identified through the semantic recognition model, and the node label is generated based on the semantic information. The metadata of multiple table data participating in the calculation is obtained based on the indicator formula, and a semantic mapping relationship between the metadata and the node is established. In a specific implementation, for some commonly used indicators, multiple indicator dimension data can be obtained by connecting to the indicator platform, connecting to the dimension platform, importing white papers, etc.
[0116] Alternatively, if the node label is an entity name, generation unit 222 may also obtain entity data, identify the semantic information of the entity name using a semantic recognition model, generate a node label based on the semantic information, determine metadata associated with the entity based on the entity data, and establish a semantic mapping relationship between the metadata and the node. In a specific implementation, multiple entity data may be obtained by connecting to an enterprise's management platform, importing management data, or other methods.
[0117] In simple terms, for conceptual nodes, when the semantics of the node's label are identical to the associated metadata, generation unit 222 can obtain the node's label by identifying the semantic information of the fields in the metadata. When the semantics of the node's label are related to the associated metadata, generation unit 222 can obtain indicator dimension data, obtain the label based on the indicator name in the indicator dimension data, and determine the semantic mapping relationship based on the indicator formula in the indicator dimension data. For physical nodes, if the node's label is an entity name, entity data can be obtained, the label can be obtained based on the entity name in the entity data, and then the metadata associated with the node can be determined based on the entity association relationships between the various entities recorded in the entity data.
[0118] It should be noted that the label of a node may include one or more attributes. These attributes may be based on the analysis user settings, or may be obtained by the generation unit 222 based on the original table data, entity data or indicator dimension data. For example, the label of a node may include attributes such as field name, data type, whether it is a measurement field, etc. These attributes are all table structure information and can be obtained by querying the original table data. For another example, the label of a node may include attributes such as atomic indicators, scenarios, scenario values, time periods, etc. Atomic indicators refer to measurements of a certain business event behavior, named with actions and measurement methods, such as payment amount, number of registered analysis users, etc. These attributes can be obtained based on indicator dimension data. It should be understood that the above examples are for illustration purposes only and are not specifically limited in this application.
[0119] It should be understood that placing some already calculated common indicators as nodes in the knowledge graph can directly return common indicators when the analysis user queries them, reducing the computational cost of data query and improving query performance. Placing the semantic representation of entities as nodes in the knowledge graph can better reflect the complex relationships between entities in the real world and facilitate the establishment of analysis models. Placing the semantic representation of metadata as nodes in the knowledge graph not only makes it easier for analysis users to build analysis models, but also makes it easier for analysis users to query data through natural language, improving the user experience of analysis users.
[0120] Optionally, generation unit 222 can determine edges between nodes in the knowledge graph based on edge design rules. In a specific implementation, nodes corresponding to metadata with associated relationships can be connected using edges, allowing the associations between table data to be displayed in the knowledge graph, thereby improving the efficiency and accuracy of association analysis.
[0121] Optionally, edge design rules may include intra-table relationship rules. Edges generated by such rules indicate that there are intra-table relationships between metadata corresponding to nodes. Intra-table relationships include, but are not limited to, primary key dependencies, common dependencies, and field value-attribution relationships. A primary key dependency relationship refers to a primary key in one table corresponding to a foreign key in another table; a common dependency relationship refers to a field in one table being dependent on a field in another table; and a field value-attribution relationship refers to a field in one table being attributed to a field in another table. It should be understood that the aforementioned physical intra-table relationships are for illustrative purposes only and are not specifically limited in this application.
[0122] Optionally, the edge design rules may include inter-table relationship rules, where the edges generated by such rules indicate that there is an inter-table relationship between the metadata corresponding to the nodes, and the inter-table relationship includes but is not limited to the relationship between tables, foreign key correspondence, and equivalence relationship between fields. The relationship between tables refers to the existence of a one-to-one, one-to-many, or many-to-many relationship between two tables, the foreign key correspondence refers to the existence of a correspondence between foreign keys between cross-table fields, and the equivalence relationship between fields refers to the existence of fields with the same meaning in different data tables, for example, the total sales field and the sales amount field have the same meaning but have different names. It should be understood that the above examples are for illustration purposes only and are not specifically limited in this application.
[0123] Optionally, edge design rules may include relationship rules between indicator dimensions and tables. The edge indication generated by such rules indicates that there is a relationship between indicator dimensions and tables between the metadata corresponding to the nodes. The relationship between indicator dimensions and tables may include the relationship between indicators and physical fields, the relationship between dimensions and physical fields, the relationship between dimension values and dimensions, the relationship between dimension values and field values, the relationship between metrics and field values, the relationship between field values and indicators, the relationship between indicators and dimensions, and the like. It should be understood that the above examples are for illustration only and are not specifically limited in this application. For example, the indicator is total sales, and the physical fields include sales quantity and sales unit price. The total sales is the product of sales quantity and sales unit price. There is a relationship between the indicator and the physical field between the total sales and sales quantity. The nodes corresponding to the total sales can be connected to the nodes corresponding to the sales quantity through edges. It should be understood that the above examples are for illustration only and are not specifically limited in this application.
[0124] The model configuration unit 231 in the model layer 230 is used to receive a model configuration request sent by an analysis user and update the analysis model database 232 according to the model configuration request. The analysis model database 232 may include analysis models and model mapping relationships between analysis models and nodes.
[0125] In a specific implementation, the model configuration request may include the model data of the target analysis model requested by the analysis user, as well as the target model mapping relationship between the target analysis model and the target node. The model configuration unit 231 may add the target analysis model and the target model mapping relationship to the analysis model database 232 based on the model configuration request. In short, the analysis user can create an analysis model according to their needs and define the model mapping relationship between the analysis model and the node. Specifically, the analysis user can determine the nodes associated with the analysis model based on the indicators, dimensions, table structure information, and entities required by the analysis model, and establish a model mapping relationship between the node and the analysis model.
[0126] For example, if an analysis user needs to create an analysis model for changes in sales performance, assuming that the analysis model needs to be determined by comparing the net sales revenue year-on-year with the target threshold, the net sales revenue year-on-year is the ratio between the net sales revenue of the current period and the net sales revenue of the previous period, which is usually used to evaluate changes in sales performance. The indicators that need to be used by the analysis model include at least the following three indicators: the net sales revenue of the current period, the net sales revenue of the previous period, and the target threshold, so the analysis model can establish a model mapping relationship with the nodes corresponding to the above three indicators. In this way, when the analysis model performs data analysis, it can automatically obtain the nodes in the knowledge graph according to the model mapping relationship, and then obtain the metadata corresponding to the nodes according to the semantic mapping relationship, obtain the table data corresponding to the metadata according to the physical mapping relationship, and then complete the data analysis based on the table data. It should be understood that the above examples are for illustration only and this application does not make specific limitations.
[0127] It can be understood that the configuration of the model mapping relationship between the analysis model and the node is completed through the above-mentioned model configuration unit 231, the configuration of the semantic mapping relationship between the node and metadata in the knowledge graph is completed through the above-mentioned node configuration unit 221 and the generation unit 222, and the configuration of the physical mapping relationship between the metadata and the table data is completed through the metadata configuration unit 211 and the mapping unit 212, so that the analysis model is associated with the nodes in the knowledge graph, the nodes are associated with the metadata, and the metadata is associated with the original table data. Through multi-layer mapping relationships, the analysis model can be decoupled from the underlying table data, and changes in the underlying table data will not affect the analysis model, so that the analysis model has strong flexibility and adaptability.
[0128] Furthermore, after the analysis model is configured, the analysis user can initiate a data analysis request to the data analysis system 200. The model configuration unit 231 can call the analysis model, obtain the node in the knowledge graph according to the model mapping relationship, and then obtain the metadata corresponding to the node according to the semantic mapping relationship, obtain the table data corresponding to the metadata according to the physical mapping relationship, and then complete the data analysis based on the table data to obtain the data analysis results. The results are then saved in the storage system 300 to generate table data corresponding to the data analysis results. The mapping unit 212 in the metadata layer can generate metadata corresponding to the table data and obtain the physical mapping relationship between the metadata and the table data. The generation unit 222 in the semantic layer can generate a label for the node corresponding to the metadata and obtain the semantic mapping relationship between the node and the metadata. After the knowledge graph has a node corresponding to the analysis result, when the query user queries the analysis result, the analysis result can be queried through natural language to improve the query experience.
[0129] The extraction unit 233 in the model layer 230 is used to receive the data query request sent by the client 100 and extract keywords from the data query request.
[0130] In a specific implementation, a data query request includes a query text composed of natural language. For example, the query text composed of natural language can be: "I want this year's sales report", "Please give me the sales data of all products in the fourth quarter of last year", "How many interns are there in the S department", etc. It should be understood that traditional query statements are usually programming query statements, such as structured query language (SQL). Natural language query text is closer to human daily language than SQL. Non-technical query users can easily implement data queries, reducing the learning cost of query users. Traditional query statements not only require learning the structure of the query language, but also remembering the names of various tables. For example, the table name of the balance sheet may be a string. The query user needs to enter this string when using SQL query. Using the method of the present application, it is sufficient to directly enter: "I need a balance sheet". The query user can obtain the corresponding query results by directly entering the term, which is more efficient.
[0131] It should be noted that the query text in the data query request can be text directly entered by the query user, or the query text can be text generated by voice recognition technology after the query user enters voice, and this application does not make specific limitations.
[0132] Optionally, the extraction unit 233 can perform word segmentation on the query text in the data query request, obtain multiple word segments corresponding to the query text, and then filter out keywords from the multiple word segments, wherein the keywords are word segments related to the data query. In a specific implementation, word segmentation methods may include statistical word segmentation, dictionary-based word segmentation, machine learning word segmentation, etc. The statistical word segmentation method uses a statistical model to determine which parts of the query statement need to be divided into word segments, and the statistical model may be a Markov model (Markov model), a hidden Markov model (HMM), etc. The word segmentation method based on the dictionary uses a known dictionary to match the word segments in the text, and the dictionary may include common vocabulary and terms. The machine learning word segmentation method uses a machine learning algorithm to train the model, and specifically, a sample set can be used to train the machine learning model so that the machine learning model has the ability to generate word segments based on the input query text. It should be understood that the above word segmentation examples are for illustration, and word segmentation can also be implemented in other ways, such as using natural language processing tools such as Jieba to implement word segmentation. Different languages and business scenarios may require different word segmentation methods, which are not specifically limited in this application.
[0133] In a specific implementation, after obtaining multiple segmented words, keywords can be filtered out from the multiple segmented words through various screening methods. The screening methods may include screening based on stop words, screening based on part of speech, screening based on word frequency, and screening based on term frequency-inverse document frequency (TF-IDF). Screening based on stop words refers to filtering out keywords from multiple segmented words by filtering stop words. Stop words are words with low actual meaning, such as interjections, "ah", "ah", "oh", etc., such as function words, "de", "is", "and", etc., such as pronouns, "you", "I", "she", etc., such as prepositions, "in", "yu", "yi", etc. Screening based on part of speech refers to determining the part of speech of each segmented word, such as noun, verb, adjective, etc., and then determining keywords based on the part of speech. In the query field, nouns usually have higher importance. Screening based on word frequency refers to analyzing the frequency of each word in the query statement. High-frequency words are usually important keywords. Word frequency statistics are used to determine which words appear repeatedly in the query user's historical queries. These words can be determined as keywords. TD-IDF is a weighted technique used to identify keywords in a text. By determining the TD-IDF score for each segmented word, the words with the highest scores are identified as keywords. It should be understood that the above method is for illustrative purposes only. Keywords can be identified by using more methods, or by combining multiple methods, and this application does not impose any specific limitations on this.
[0134] The graph query unit 224 of the semantic layer 220 is used to receive the keywords sent by the extraction unit 233, determine the target node matched by the keyword based on the label of the node in the knowledge graph, and determine the target metadata corresponding to the target node based on the semantic mapping relationship.
[0135] In a specific implementation, the target node that matches the keyword can be determined based on each attribute in the keyword matching tag. If the matching result is multiple nodes, the data analysis system 200 can return a prompt message to the client 100, which prompts the query user to enter a more detailed query text. Based on the more detailed query text entered by the query user, the target node is further confirmed, and the target metadata is then determined. The following is an example of user A using natural language to query a table:
[0136] User A: "I want to see the company's financial statements";
[0137] System: "Do you need an income statement or a balance sheet?"
[0138] User A: "Profit Statement";
[0139] System: "Do you want to see the quarterly report or the annual report?"
[0140] User A: “Last quarter”;
[0141] System: “Okay, here’s a link to last quarter’s balance sheet: [link]”.
[0142] The above examples are for illustrative purposes only and are not intended to be limiting in this application. In a specific implementation, the system can pre-set various speech templates, determine the next speech to be sent to the querying user based on the multiple nodes matched by the keywords corresponding to the query text entered by the querying user last time, and then determine new keywords based on the query text returned by the querying user next time. This process continues, and through continuous communication with the querying user, the system ultimately determines the target node corresponding to the target data requested by the querying user and obtains the metadata for the target node.
[0143] It should be understood that traditional data queries can only obtain the actual semantics of the query text of the query user through natural language processing first, and then search the database based on the semantics, and feedback prompt messages based on the search results. In this way, natural language processing is performed first and then searched, and the system response will be very slow, especially for large and complex databases. The system response will be even slower. This application obtains nodes that match keywords through knowledge graph matching, and sends prompt messages to the query user based on multiple metadata corresponding to the nodes. Due to the existence of the knowledge graph, the system response will be very fast, improving the user experience of the query user.
[0144] Optionally, a node may correspond to multiple metadata. After determining the target node, the system may send a prompt message to the querying user based on the multiple metadata associated with the target node and the speech template, asking the querying user which metadata corresponds to the data they need, and determine the target metadata based on the feedback from the querying user.
[0145] Optionally, the number of target nodes can also be one or more, and the target metadata can be one or more. This is because the nodes in the knowledge graph include indicator nodes, dimension nodes, and entity nodes. The target data queried by the query user may correspond to multiple target metadata. For example, the query user requests to query the balance sheet of subsidiary A in the last four quarters. At this time, the matching nodes include the entity node "Subsidiary A", the dimension node "Time", and the indicator node "Assets and Liabilities". The above examples are for illustration only and are not specifically limited in this application.
[0146] It should be noted that if the label of the node is a natural language label, then the keyword can be directly matched with the label. If the label of the node is a string or vector, and the string or vector is obtained by encoding the natural language, then the keyword can be converted into a string or vector in the same encoding method, and then the string or vector is matched with the label. It should be understood that even if it is matching vectors or strings, it is actually matching semantics. This application uses semantic matching to avoid natural language processing of the query text entered by the query user. The system does not need to deeply understand the meaning of the query user's text. It can directly implement data query through label matching, which is more efficient.
[0147] The table query unit 214 of the metadata layer 210 is configured to receive the target metadata sent by the graph query unit 224, determine the target data corresponding to the target metadata based on the physical mapping relationship, and return the target data to the querying user. It should be understood that the metadata includes the storage address of the table data, and the target data can be retrieved based on this storage address and returned to the querying user.
[0148] Optionally, when there are multiple target metadata, the table data corresponding to each target metadata can be obtained separately, and then the final target data can be determined based on the fields, tables, and databases corresponding to each target metadata. Specifically, the metadata corresponding to the entity nodes and dimension nodes can be used as filter fields to filter the table data corresponding to the indicator nodes to obtain the target data required by the query user. Of course, the table data corresponding to multiple target source data can also be determined by combining the edge connections between nodes in the knowledge graph, the attribute labels of the nodes, and other information. Specifically, the rules for generating target data based on multiple target metadata can be flexibly configured according to the actual application scenario.
[0149] Using the above example, a user requests the balance sheet of Subsidiary A for the four quarters of last year. The matching nodes include the entity node "Subsidiary A," the dimension node "Time," and the indicator node "Assets and Liabilities." Using "Subsidiary A" and "Quarter" as filter fields, the company's entire balance sheet for the entire year is filtered to obtain the balance sheet for Subsidiary A for the four quarters of last year. It should be understood that the above example is for illustrative purposes only and is not intended to be limiting in this application.
[0150] Simply put, a table may include multiple fields, and the querying user may only want to see 2-3 of them, or want to see field 1 in table A and field 2 in table B. After the metadata of each field establishes a semantic mapping relationship with the semantic node, when the querying user performs data query, he only needs to enter the fields contained in the table he wants to see. The system can automatically generate the table required by the querying user through semantic node matching, making the query method more flexible.
[0151] It should be noted that Figure 1 is an exemplary division method. The extraction unit 233 can also be deployed on the client 100, that is, the client 100 implements keyword extraction locally. The extraction unit 233 can also be deployed on the semantic layer 220. This application does not limit this.
[0152] It should be understood that the data analysis system 200 can be combined with the knowledge graph to flexibly configure the analysis model to achieve correlation impact analysis, node importance analysis, etc. It can also be combined with the knowledge graph to achieve flexible data query, such as query based on storage path, query based on knowledge graph slice or subgraph, query based on node attribute, etc., which brings great convenience to the data analysis work of the analysis user. In addition, the scalability of the system architecture is very strong, and the analysis user can flexibly set the analysis model according to business needs. The data analysis system 200 can also recommend the query user to create a certain type of analysis model based on the query request entered by the query user to complete the data exploration. The analysis user can use the data analysis system 200 to complete data exploration, data mining, data analysis and other applications.
[0153] It should be understood that this application uses analysis users to refer to users who create models and configure more than 200 mapping relationships in the data analysis system, and uses query users to refer to users who query data. In the specific implementation process, analysis users and query users can be different users or the same user, and this application does not make specific limitations.
[0154] In summary, the data analysis system provided by this application includes a metadata layer, a semantic layer and a model layer. The metadata layer is used to manage metadata and establish a physical mapping relationship between metadata and the table data of the underlying physical table. The semantic layer is used to manage the knowledge graph. The knowledge graph includes multiple nodes and multiple edges, and establishes a semantic mapping relationship between the node and the metadata. The semantics of the node label is related to the metadata. The model layer is used to manage the analysis model and establish a model mapping relationship between the analysis model and the node. The data analysis system uses a multi-layer mapping relationship to decouple the analysis model from the underlying table data. The underlying data changes will not affect the analysis model. The analysis model has strong flexibility and adaptability. At the same time, since the nodes in the knowledge graph contain semantic labels, users can complete data queries through natural language. The data analysis system can match the keywords in the query text entered by the user with the semantic labels of the nodes, determine the first node corresponding to the keywords, and change the data query process from retrieval to matching. Not only is the query efficiency higher, but the user does not need to learn the relevant instructions for database query. The data query can be completed by entering natural language, reducing the user's learning cost and improving the user experience.
[0155] The data analysis system provided by the present application is described in detail above in conjunction with FIG1 . The data analysis method provided by the present application will be described below in conjunction with FIG2 to FIG6 .
[0156] FIG2 is a flowchart of steps of a configuration method in a data analysis method provided by the present application. The method can be applied to the data analysis system 200 shown in FIG1 . As shown in FIG2 , the method may include the following steps:
[0157] S210: The client 100 sends a configuration request to the data analysis system 200. This step can be implemented by the model configuration unit 231, the node configuration unit 221, and the metadata configuration unit 211 in the embodiment of FIG1.
[0158] Optionally, the configuration request may include one or more of a model configuration request, a node configuration request, and a metadata configuration request. The metadata configuration request may include analyzing the metadata set by the user request, as well as the physical mapping relationship between the metadata and the table data; the node configuration request may include analyzing the labels of the nodes set by the user request, as well as the semantic mapping relationship between the nodes and the metadata; the model configuration request includes model data, and analyzing the model mapping relationship between the model and the node. It should be noted that the specific description of the model configuration request, the node configuration request, and the metadata configuration request can be referred to the relevant content of the embodiment of FIG1 , and will not be repeated here.
[0159] S220: The data analysis system 200 configures the model mapping relationship, the semantic mapping relationship, and the physical mapping relationship according to the configuration request. This step can be implemented by the model configuration unit 231, the node configuration unit 221, and the metadata configuration unit 211 in the embodiment of FIG1 .
[0160] Optionally, the data analysis system 200 can update the physical mapping relationship between metadata and table data based on the metadata configuration request. The metadata includes at least the table structure information of the table data and the storage address of the table data. The table structure information may include fields, table names and database names, and may also include data types, indexes, primary keys, foreign keys and other information. The metadata may also include business meaning, purpose, description, data dictionary, etc., which is not specifically limited in this application.
[0161] Optionally, the data analysis system 200 can update the semantic mapping relationship between the node and the metadata based on the node configuration request, and the semantics of the node label is related to the metadata. Among them, the node label can be a semantic representation of the metadata that establishes a semantic mapping relationship with the node, such as the semantic representation of a field in the metadata, or the semantic representation of the table name, or the semantic representation of the database name, which is not specifically limited in this application. The node label can also be the name of an indicator or dimension, which requires table data of multiple fields to participate in the calculation, and the table data corresponding to the metadata associated with the node is the table data involved in the calculation. The node label can also be the name of an entity, such as subsidiary A, subsidiary B, supplier C, etc. The metadata associated with the node has an entity association relationship with the entity, and the entity association relationship may include ownership relationship, dependency relationship, parent-child relationship, cooperative relationship, subordinate relationship, purchasing relationship, upstream and downstream relationship, position relationship, etc. This application does not limit the entity association relationship.
[0162] Optionally, the label of each node may include one or more attributes, and each attribute may describe the semantic representation of the node from different dimensions. For example, the label of the node may include the following attributes: field name, data type, whether it is a metric field, etc. For example, the label of node A includes label 1: basketball player, and label 2: programmer, wherein label 1 includes the following attributes: team, position, average points per game, etc., and label 2 includes the following attributes: company, rank, length of service, etc. The above examples are for illustration only and are not specifically limited in this application. The above examples are for illustration only and are not specifically limited in this application. It should be understood that multi-attribute node labels can make the semantic representation of metadata richer and more accurate. When querying users perform data queries on the knowledge graph, different attributes can be used to filter, sort and search nodes, and data queries and retrieval can be more flexible and accurate.
[0163] In order to make this application better understood, the label design rules of this application are explained in conjunction with Table 1 below. Table 1 is an example table of design rules for nodes in a knowledge graph provided by this application. According to the design rules, the analysis user can flexibly configure the nodes in the knowledge graph, and the system can also automatically generate nodes in the knowledge graph according to the design rules. Among them, the label of the node is an attribute group, so the following table gives examples according to the attributes.
[0164] Table 1 Example of design rules for nodes in a knowledge graph
[0165] As shown in Table 1 above, the nodes in the knowledge graph can be designed according to three levels: physical table information layer, semantic indicator dimension layer, and public information layer. The nodes designed in the physical table information layer are labels generated based on the metadata of the physical table, that is, the semantics of the labels of the nodes described above are the same as the metadata. For example, the physical table node is a node label designed according to the semantics of the table name, and the physical field node is a node label designed according to the field name; the nodes designed in the semantic indicator dimension layer are labels generated according to the semantics of the indicator / dimension, and the metadata that establishes a semantic mapping relationship with this type of node will participate in the calculation of the indicator; the nodes designed in the public information layer are labels generated according to the entity data, that is, the entity nodes described above. It should be understood that Table 1 is an example of label design and this application does not make specific limitations.
[0166] Furthermore, after updating the nodes in the knowledge graph according to the node configuration request, edges between the nodes in the knowledge graph can be generated according to the edge design rules. Optionally, the edge design rules may include intra-table relationship rules, inter-table relationship rules, and relationship rules between indicator dimensions and tables. Among them, the edge generated by the intra-table relationship rule indicates that there is an intra-table relationship between the metadata corresponding to the node, the edge generated by the inter-table relationship rule indicates that there is an inter-table relationship between the metadata corresponding to the node, and the edge generated by the relationship rule between the indicator dimension and the table indicates that there is a relationship between the indicator dimension and the table between the metadata corresponding to the node. For the specific description of the edge rules, please refer to the relevant content in the embodiment of Figure 1, which will not be repeated here.
[0167] To better understand this application, the edge design rules of this application are explained below in conjunction with Table 2. Table 2 is an example table of edge design rules in a knowledge graph provided by this application. According to this design rule, the system can connect nodes with relationships in the knowledge graph through edges. It should be understood that Table 2 is an exemplary edge design rule and is not specifically limited in this application.
[0168] Table 2 An example of edge design rules in a knowledge graph
[0169] As shown in Table 2 above, the data analysis system 200 can generate edges in nodes according to the intra-table relationships, inter-label relationships, and the relationships between indicator dimensions and tables. The nodes corresponding to metadata with associated relationships are connected by edges, so that the associated relationships between table data can also be displayed in the knowledge graph, which can improve the efficiency and accuracy of association analysis.
[0170] Optionally, the data analysis system 200 can update the model mapping relationship between the analysis model and the node based on the model configuration request, and then add the analysis model configured by the analysis user request to the analysis model database 232. Specifically, based on the model data in the model configuration request, it can determine the indicators, dimensions, table structure information and entities required for the analysis model, and then determine the nodes associated with the analysis model, and establish a model mapping relationship between the node and the analysis model.
[0171] It can be understood that after completing the configuration of the model mapping relationship between the analysis model and the nodes, the configuration of the semantic mapping relationship between the nodes and metadata in the knowledge graph, and the configuration of the physical mapping relationship between the metadata and the table data, the analysis model is associated with the nodes in the knowledge graph, the nodes are associated with the metadata, and the metadata is associated with the original table data. In this way, through multi-layer mapping relationships, the analysis model can be decoupled from the underlying table data, and changes in the underlying table data will not affect the analysis model, making the analysis model highly flexible and adaptable.
[0172] S230: The data analysis system 200 calls the analysis model and generates analysis results based on the model mapping relationship, the semantic mapping relationship, and the physical mapping relationship. This step can be implemented by the model configuration unit of the embodiment of FIG2 .
[0173] In a specific implementation, after configuring the analysis model, the analysis user can initiate a data analysis request to the data analysis system 200. The data analysis system 200 can call the analysis model, obtain the nodes in the knowledge graph based on the model mapping relationship, then obtain the metadata corresponding to the node based on the semantic mapping relationship, obtain the table data corresponding to the metadata based on the physical mapping relationship, and then input the table data into the analysis model for data analysis to obtain the data analysis results. The data analysis system 200 can also automatically call the analysis model and analyze the data based on the model mapping relationship, semantic mapping relationship, and physical mapping relationship. In this way, when the data is continuously updated, the analysis model will also continuously and automatically analyze and explore the data.
[0174] S240: The data analysis system 200 sends a storage request for the analysis result to the storage system 300. This step can be implemented by the model configuration unit in the embodiment of FIG2.
[0175] In a specific implementation, the storage system 300 may store the analysis results in a table of a database, and generate table data corresponding to the analysis results.
[0176] S250: The data analysis system 200 generates metadata corresponding to the analysis results and updates the semantic mapping relationship and the physical mapping relationship. This step can be implemented by the generation unit 222 and the mapping unit 212 in the embodiment of FIG1 .
[0177] Optionally, the data analysis system 200 can generate metadata corresponding to the analysis result based on the table structure information and storage address of the table data corresponding to the analysis result, and obtain the physical mapping relationship between the metadata and the table data of the analysis result. Furthermore, the data analysis system can identify the information of the fields contained in the metadata through the recognition model, generate node labels based on the semantic information, establish a semantic mapping relationship between the metadata and the nodes, and finally update the edges between the nodes in the knowledge graph according to the edge design rules. In this way, after the knowledge graph has a node corresponding to the analysis result, when the query user queries the mapping result, the analysis result can be queried through natural language, thereby improving the query experience.
[0178] It should be noted that when the data analysis system 200 generates node labels, it can generate node labels according to the content described in S220, the node design rules described in Table 1, and generate edges between nodes according to the edge design rules described in Table 2. This is not repeated here. It should be understood that the design rules described in Tables 1 and 2 can be used by the system to automatically generate nodes, labels, and edges, or by the analysis user to configure nodes, labels, and edges according to the rules. This application is not limited to this.
[0179] It should be understood that the step flow shown in Figure 2 is a step flow in an application scenario. In this application scenario, the analysis model and various mapping relationships are first generated according to the configuration of the analysis user, and then the various mapping relationships of the analysis results are automatically updated by the system. In other application scenarios, the physical mapping relationships and semantic mapping relationships of the analysis results can also be manually configured. The step flow of manual configuration can refer to the above S210~S220, which will not be repeated here.
[0180] To better understand this application, the configuration method in the data analysis method provided by this application is further explained below in conjunction with Figures 3 to 6. Figure 3 uses a specific application scenario as an example to further explain the configuration method shown in Figure 2, and Figures 4 to 6 use a specific application interface as an example to further explain the configuration method shown in Figure 2.
[0181] FIG3 is a flowchart of configuration steps in an application scenario. In the application scenario shown in FIG3, the analysis model configured by the analysis user needs to implement data analysis based on two parameters: "Net Sales Revenue Year-on-Year" and "Target Threshold." Specifically, "Net Sales Revenue Year-on-Year" needs to implement data analysis based on two parameters: "This Year's Net Sales Revenue" and "Last Year's Net Sales Revenue." Therefore, the analysis model requires parameters including "This Year's Net Sales Revenue," "Last Year's Net Sales Revenue," and "Target Threshold." Therefore, S210 to S220 can be executed to establish model mapping relationships between these three parameters and nodes of the knowledge graph in the semantic layer 220. As shown in FIG3, the "This Year's Net Sales Revenue" parameter establishes a model mapping relationship with the "This Year's Net Sales Revenue" node, the "Last Year's Net Sales Revenue" parameter establishes a model mapping relationship with the "Last Year's Net Sales Revenue" node, and the "Target Threshold" parameter establishes a model mapping relationship with the "Target Threshold" node.
[0182] Furthermore, a semantic mapping relationship is established between the "net sales revenue this year" node and the metadata "ydt", a semantic mapping relationship is established between the "net sales revenue last year" node and the metadata "hst", and a semantic mapping relationship is established between the "target threshold" node and the metadata "target", in the example shown in Figure 3.
[0183] Furthermore, a physical mapping relationship is established between the metadata "ydt" and the field "ydt" in the table "XXX1", a physical mapping relationship is established between the metadata "hst" and the field "hst" in the table "XXX2", and a physical mapping relationship is established between the metadata "target" and the field "target" in the table "XXX3".
[0184] Furthermore, the data analysis system 200 can generate edges between nodes in the knowledge graph. For example, in the figure shown in FIG3 , an edge relationship is established between the “net sales revenue this year” node and the “time” node, and an edge relationship is established between the “net sales revenue this year” node and the “subsidiary A” node, wherein the “subsidiary A” node can be a physical node and the “time” node can be a dimensional node. FIG3 uses bold straight lines to represent the edge relationships between nodes, and uses thin curves to represent various mapping relationships. It should be understood that the “subsidiary A” node and the “time” node can also establish semantic mapping relationships with metadata. For example, the “time node” shown in FIG3 establishes semantic mapping relationships with multiple metadata “time”, and different metadata “time” can establish physical mapping relationships with the field “time” in different tables. Examples are not given one by one here.
[0185] It can be understood that after establishing the analysis model shown in Figure 3 and configuring the model mapping relationship, semantic mapping relationship and physical mapping relationship, the data analysis system 200 can execute S230 to start data analysis. First, the parameters to be obtained are determined according to the logical rules of the analysis model, that is, "net sales revenue this year", "net sales revenue last year" and "target threshold", and then the three nodes corresponding to these three parameters are determined through the model mapping relationship. Then, the metadata corresponding to these three nodes are determined according to the semantic mapping relationship, and then the table data of "net sales revenue this year", "net sales revenue last year" and "target threshold" are obtained according to the physical mapping relationship. The data analysis is completed based on the table data to obtain the analysis results.
[0186] Furthermore, the data analysis system 200 executes S240 to store the analysis results in the storage system 300, that is, the various table data shown at the bottom of Figure 3, and then executes S250 to generate metadata based on the table data, establish a physical mapping relationship, create a new node in the knowledge graph, generate node labels based on the semantics of the metadata, and update the edge relationships between nodes in the knowledge graph.
[0187] It can be understood that the objects actually associated with the analysis model in Figure 3 are the nodes in the knowledge graph, rather than the underlying table data. Through multi-layer mapping relationships, the analysis model can be decoupled from the underlying table data. Changes in the underlying table data will not affect the configuration of the analysis model, making the establishment of the analysis model more flexible. The system architecture is highly scalable, and analysis users can flexibly set up analysis models according to business needs. The system can even recommend to analysis users to create some analysis models that can further process the analysis results based on the analysis results, guide analysis users to further mine and explore the data, and improve the user experience of analysis users.
[0188] It should be noted that in the example shown in Figure 3, it is assumed that the label of the "net sales revenue of this year" node has the same semantics as the metadata "ydt" connected to it, so a semantic mapping relationship is established between the two. In some other embodiments, the semantics of the node may be the name of an indicator, and the metadata involved in the calculation of the indicator establishes a connection relationship with the node. For example, if in the scenario shown in Figure 3, if the storage system 300 does not have a table that directly counts the net sales revenue of this year, then based on the net sales revenue of this year = total sales revenue of this year - total sales cost of this year, the metadata with the semantics of "total sales revenue of this year" and the metadata with the semantics of "total sales cost of this year" can be established with the "net sales revenue of this year" node. The explanation will not be elaborated here.
[0189] It should be noted that in the example shown in Figure 3, the metadata in the metadata layer is illustrated by fields. Referring to the above content, it can be seen that metadata can also be database names, table names, values under fields, etc., and there is also an ownership relationship between metadata. A metadata graph can be created based on the ownership relationship. Each node in the graph represents a metadata, and the edges between the nodes represent the ownership relationship between the metadata. Figure 3 is an example and this application does not limit this.
[0190] In order to make the present application better understand the configuration method described in the above S210~S250, further explanation will be given below in conjunction with Figures 4-6. Among them, Figures 4-6 are some exemplary interfaces provided by the present application, wherein the interface shown in Figure 4 is used for the analysis user to configure the label of the indicator node, and the analysis user can configure the name of the indicator, indicator formula and other information through the interface. Figure 5 is another exemplary interface in the data analysis method provided by the present application, which is used for the analysis user to configure the semantic mapping relationship. Figure 6 is another exemplary interface in the data analysis method provided by the present application, which is used for the analysis user to configure the model mapping relationship. Figures 4-6 are explained below.
[0191] FIG4 is an exemplary interface of a data analysis method provided in this application. This interface is primarily used to configure labels for nodes with indicator / dimension names, that is, nodes at the semantic indicator / dimensional layer shown in Table 1, such as indicator nodes and dimension nodes. Specifically, the interface shown in FIG4 is illustrated using the configuration of the "Net Sales Revenue This Year" node shown in FIG3 as an example.
[0192] 4 , the interface may include an indicator name input area 410, an indicator formula input area 420, an expression input area 430, a statistical period selection area 440, an associated indicator selection area 450, and a save control 460. Each area and control in the interface is described below.
[0193] The indicator name input area 410 is used to input the indicator name, which can be used as a label for the node, and specifically can be one of the attributes contained in the label, for example, the indicator set in FIG4 is “net sales revenue”.
[0194] The indicator formula input area 420 is used to input a calculation formula of the indicator formula, which is a natural language expression of the indicator formula.
[0195] The expression input area 430 is used to input the expression of the indicator formula, which is an expression of the processing logic of the indicator formula. The analysis user can choose the function to call and the input field to complete the expression of the indicator formula. It should be understood that the calculation formula in the indicator formula input area 420 and the expression entered in the expression input area 430 are both used to describe the indicator formula, so that the system can establish a semantic mapping relationship between metadata and nodes based on the indicator formula.
[0196] The statistical period selection area 440 is used to input the time dimension of the indicator, and to count the annual net sales revenue and monthly net sales revenue. The indicators generated in this way may include the net sales revenue of this year and last year, the net sales revenue of this month and last month, etc. This application does not make specific limitations.
[0197] The associated indicator selection area 450 is used to input the associated indicator type of the indicator, which can be used as some attributes of the label, such as derived indicators. For details, please refer to the description of the indicator node in Table 1. The attributes of the indicator node may include atomic indicators, derived indicators, scenarios, scenario values, time periods and other attributes.
[0198] Save control 460 is used to save or cancel the configuration entered by the analysis user. It should be understood that after the analysis user clicks Save, the system can create a node in the knowledge graph, with the node label being the indicator name entered in indicator name input area 410, such as "Net Sales Revenue". Then, based on the indicator formula described in indicator formula input area 420 and expression input area 430, the system determines the metadata involved in the indicator calculation and establishes a semantic mapping relationship between the metadata and the node.
[0199] It should be noted that the interface shown in FIG4 is a scenario when manually configuring the labels of indicator nodes. Analysis users can also import indicator data, such as configuring the indicator management platform interface, and obtain the indicator names, indicator formulas, and other information of multiple indicators by connecting to the indicator management platform. The data analysis system 200 can generate node labels based on the indicator names and establish a semantic mapping relationship between metadata and nodes based on the indicator formula. After configuring the indicator names through FIG4, the semantic mapping relationship between metadata and nodes can be completed through the interface shown in FIG5.
[0200] FIG5 is another exemplary interface of a data analysis method provided by the present application. This interface is used for analyzing the mapping relationship between user-configured metadata and semantics. The semantics can be used to generate node labels and establish a semantic mapping relationship between nodes and metadata. The metadata is generated based on table data. It should be understood that FIG5 is an example of configuring a physical field node. Other types of nodes shown in Table 1 can be configured according to a similar interface shown in FIG5, and will not be repeated here.
[0201] As shown in FIG. 5 , the interface may include a metadata selection area 510 , a semantic configuration area 520 , a table display area 530 , and a table selection control 540 .
[0202] The metadata selection area 510 is used to display the metadata that needs to be configured. Each metadata corresponds to a connection control (there is a circular control to the right of each metadata in Figure 5). By connecting the metadata connection control with the semantic connection control displayed in the semantic configuration area 520 on the right, a semantic mapping relationship between metadata and nodes is established. It should be noted that Figure 5 uses metadata as field names as an example for illustration, so the metadata displayed in the metadata selection area 510 in Figure 5 are all field names. Referring to the above content, it can be seen that metadata can also be table names, database names, indicator names, etc. Other types of metadata can be configured through the interface shown in Figure 5, and examples are not given here one by one.
[0203] The semantic configuration area 520 is used to display the node label, or the semantics of the metadata. Each semantic corresponds to a connection control (there is a circular control on the left side of each semantic in Figure 5). By connecting the connection control of the metadata with the connection control of the semantic displayed in the semantic configuration area 520 on the right, a semantic mapping relationship between the metadata and the node is established.
[0204] The table display area 530 is used to display a table with configured semantics. The table header includes original fields and user-configured semantics.
[0205] The table selection control 540 is used for the user to select a table for configuration. After the user selects the table to be configured, the fields in the table may be displayed in the metadata selection area 510 .
[0206] It should be noted that the analysis user created new indicators "Net sales revenue this year" and "Net sales revenue last year" through the interface shown in Figure 4. After creation, the semantic configuration area 520 shown in Figure 5 can display the created indicator "Net sales revenue". The user can establish a semantic mapping relationship between the two by connecting the metadata "dt" on the left with "Net sales revenue".
[0207] For example, Figure 5 takes the application scenario shown in Figure 3 as an example. The field target in table XXX3 in Figure 3 establishes a semantic mapping relationship with the target threshold node, and the field trail establishes a semantic mapping relationship with the subsidiary A node. Similarly, other nodes in the knowledge graph shown in Figure 3 can also be configured according to the interface shown in Figure 5. Examples are not given here one by one.
[0208] It should be noted that the metadata selection area 510 and semantic configuration area 520 can also display metadata and semantics for which semantic mappings have already been established. The user can modify the mapping between metadata and semantics using the link control. For example, if the system automatically establishes a semantic mapping based on metadata semantic recognition, but the user finds the semantic mapping inaccurate, they can use the semantic insertion control to add a custom semantic and then link the custom semantic to the metadata.
[0209] It should be understood that for some metadata whose field semantics can be determined through semantic recognition models, the semantic mapping relationship between metadata and nodes can be automatically established directly through semantic recognition. However, some fields are just strings and have no actual semantic meaning. In this case, the user-entered custom semantics can be analyzed through the interface shown in Figure 5, and then the metadata can be connected with the custom semantics.
[0210] Figure 6 is an example diagram of another node configuration interface provided by this application. This interface allows analysis users to configure analysis models and configure the model mapping relationship between analysis models and nodes. Specifically, the interface shown in Figure 6 is illustrated using the configuration of the analysis model shown in Figure 3 as an example.
[0211] As shown in FIG. 6 , the interface may include a data model selection area 610 , a model arrangement area 620 , a modeling standard selection area 630 , and a toolbar 640 .
[0212] The data model selection area 610 allows the analysis user to select nodes in the knowledge graph for arrangement. The nodes involved in the arrangement can establish a model mapping relationship with the analysis model. The analysis user can drag and drop nodes in the knowledge graph to the model arrangement area 620 to create an analysis model.
[0213] The model arrangement area 620 allows analysts to arrange their analysis models. They can drag nodes from the data model selection area 610 and select connection tools or parameter setting tools from the toolbar 640 to configure the analysis model's analysis logic. For example, the establishment of the analysis model in Figure 3 can be implemented in the interface shown in Figure 6 using the above method.
[0214] The modeling standard selection area 630 is used to provide the analysis user with modeling standards for different businesses. The analysis user can select a modeling standard according to his or her business needs to create an analysis model. It should be understood that the modeling standard can reduce model errors and improve modeling efficiency.
[0215] The toolbar 640 is used to provide various modeling tools to the analysis user, such as a connection tool for connecting various parameters, a save tool for saving the analysis model, etc. This application does not limit the tools in the toolbar.
[0216] It should be understood that through the interface shown in Figure 6, the analysis user can flexibly configure the analysis model through the visual interface and by dragging, dropping, and dropping, and flexibly establish the model mapping relationship between the analysis model and the node. The configured analysis model can automatically obtain the data required by the analysis model through the model mapping relationship, semantic mapping relationship, and physical mapping relationship, and then analyze the data according to the analysis logic of the analysis model configured by the analysis user to obtain the analysis results. The analysis results can be stored in the storage system 300. The data analysis system 200 can generate metadata based on the table data of the analysis results, establish a physical mapping relationship, and then create nodes in the knowledge graph based on the metadata to establish a semantic mapping relationship. If the query user needs to query the analysis result, due to the existence of the knowledge graph, the query user can directly enter natural language to query.
[0217] The above describes in detail the steps of the configuration method in the data analysis method provided by the present application through Figures 2 to 6. The following explains the steps of the query method provided by the present application with reference to Figures 7 and 8.
[0218] FIG7 is a flowchart of a configuration method in a data analysis method provided by the present application. As shown in FIG7 , the method includes the following steps:
[0219] S710: The client 100 sends a data query request to the data analysis system 200. This step can be implemented by the extraction unit 233 in the embodiment of FIG1 .
[0220] In a specific implementation, the data query request includes a query text, which is a natural language text. For example, the query text composed of natural language can be: "I want this year's sales report", "Please give me the sales data of all products in the fourth quarter of last year", "How many interns are there in the S department", etc. It should be understood that traditional query statements are usually programming query statements, such as SQL. Natural language query text is closer to human daily language than SQL. Non-technical query users can easily implement data queries, reducing the learning cost of query users. Traditional query statements not only require learning the structure of the query language, but also remembering the names of various tables. For example, the table name of the balance sheet may be a string. The query user needs to enter this string when using SQL query. Using the method of this application, you can directly enter: "I need a balance sheet". The query user can directly enter the term to obtain the corresponding query result, which is more efficient.
[0221] It should be noted that the query text in the data query request can be text directly entered by the query user, or the query text can be text generated by voice recognition technology after the query user enters voice, and this application does not make specific limitations.
[0222] S720: The data analysis system 200 determines the keywords corresponding to the query text. This step can be implemented by the extraction unit 233 in the embodiment of FIG1 .
[0223] Optionally, the extraction unit 233 can perform word segmentation on the query text in the data query request to obtain multiple word segments corresponding to the query text, and then filter out keywords from the multiple word segments, wherein the keywords are word segments related to the data query. In a specific implementation, word segmentation methods may include statistical word segmentation, dictionary-based word segmentation, machine learning word segmentation, etc. After obtaining multiple word segments, keywords can be filtered out from the multiple word segments through multiple screening methods such as stop word-based screening, part of speech-based screening, word frequency-based screening, TF-IDF screening, etc. The description of the above-mentioned multiple word segmentation methods and multiple screening methods can refer to the relevant description in the embodiment of Figure 1, and will not be repeated here.
[0224] S730: The data analysis system 200 matches the keyword with the graph to determine the target node and the target metadata corresponding to the target node. This step can be implemented by the graph query unit 224 in the embodiment of FIG1 .
[0225] Optionally, the data analysis system 200 can determine one or more nodes that match the keyword based on each attribute in the keyword matching tag. The data analysis system 200 can return prompt information to the client 100 based on the matching result. The prompt information is used to prompt the query user to enter a more detailed query text, further confirm the target node based on the more detailed query text entered by the query user, and then determine the target metadata. In a specific implementation, the data analysis system 200 can set up various speech templates in advance, determine the speech to be sent to the query user next time based on the multiple nodes matched by the keyword corresponding to the query text entered by the query user last time, and then determine new keywords based on the query text returned by the query user next time, and so on. By continuously communicating with the query user, the target node corresponding to the target data requested by the query user is finally determined, and the metadata of the target node is obtained.
[0226] Optionally, the number of target nodes can be one or more, and the target metadata can be one or more. This is because the nodes in the knowledge graph include indicator nodes, dimension nodes, and entity nodes. The target data queried by the query user may correspond to multiple target metadata. For example, the query user requests to query the balance sheet of subsidiary A in the last four quarters. At this time, the matching nodes include the entity node "Subsidiary A", the dimension node "Time", and the indicator node "Assets and Liabilities". The above examples are for illustration only and are not specifically limited in this application.
[0227] It should be understood that traditional data queries can only obtain the actual semantics of the query text of the query user through natural language processing first, and then search the database based on the semantics, and feedback prompt messages based on the search results. In this way, natural language processing is performed first and then searched, and the system response will be very slow, especially for large and complex databases. The system response will be even slower. This application obtains nodes that match keywords through knowledge graph matching, and sends prompt messages to the query user based on multiple metadata corresponding to the nodes. Due to the existence of the knowledge graph, the system response will be very fast, improving the user experience of the query user.
[0228] S740: The data analysis system 200 obtains target data according to the target metadata. This step can be implemented by the table query unit 214 in the embodiment of FIG1 .
[0229] In a specific implementation, the data analysis system 200 can read the target data from the storage address according to the storage address of the table data recorded in the metadata and return it to the querying user. It should be understood that a table may include multiple fields, and the querying user may only want to see 2-3 of them, or want to see field 1 in table A and field 2 in table B. After the metadata of each field establishes a semantic mapping relationship with the semantic node, when the querying user performs a data query, he only needs to enter the fields contained in the table he wants to see. The system can automatically generate the table required by the querying user through semantic node matching, making the query method more flexible.
[0230] S750: The data analysis system 200 sends the target data to the client 100. This step can be implemented by the table query unit 214 in the embodiment of FIG1 .
[0231] It should be understood that the field of data analysis has the characteristics of large data scale, fast data change speed, and wide data range. If data query is performed through traditional retrieval methods, the query efficiency is limited by the data scale. This application implements data query based on knowledge graph. The nodes in the knowledge graph are configured with semantic labels, and each node also establishes a mapping relationship with metadata, so that data query can be transformed into a simple node matching, which not only can realize natural language query, but also makes the query efficiency faster, improving the user experience of the query user.
[0232] In order to better understand the present application, the above-mentioned S710 to S750 are explained below with reference to FIG. 8 .
[0233] FIG8 is an exemplary interface of a data query provided by the present application, which may include a question input area 810 , a system response area 820 , and a historical question display area 830 .
[0234] The question input area 810 is used for the query user to input a query text, which is a natural language text.
[0235] The system reply area 820 is used to display the query results of the query text to the query user.
[0236] The historical question display area 830 is used to display historical questions to the querying user.
[0237] In the example shown in Figure 8, the query text entered by the query user for the first time is: "I want to see the analysis results of the analysis model". Combined with the examples shown in Figures 3-6, it can be seen that after the analysis model is configured, the generated analysis results are stored in the storage system 300 as new table data. The data analysis system 200 can generate metadata for the analysis results, establish a physical mapping relationship between the physical metadata and the analysis results, and then create a node corresponding to the metadata in the knowledge graph, and establish a semantic mapping relationship between the node and the metadata. The label of the node can be "analysis results". In this way, after the query user enters the query text shown in Figure 8, the data analysis system 200 can execute the above S710~S750, first extract the keyword "analysis results" in the query text, and then match the keyword with the label of the node in the knowledge graph to determine the target node corresponding to the keyword "analysis results" according to the analysis result, and then read the target data according to the metadata of the target node. The data analysis system 200 can combine the speech template to generate the return speech shown in Figure 8: "Okay, this is the link to the analysis result."
[0238] Furthermore, the query text entered by the query user for the second time is: "Give me a table of net sales revenue". Combined with the knowledge graph shown in Figure 3, it can be seen that the knowledge graph has last year's net sales revenue node and this year's net sales revenue node, so after receiving the query text, the data analysis system 200 can execute S710 to S730 to determine that there are 2 nodes matching the query text, namely the above-mentioned last year's net sales revenue node and this year's net sales revenue node. At this time, the data analysis system can combine the speech template to generate the prompt speech as shown in Figure 8: "Okay, which year's net sales revenue do you need to see?" The query user can enter supplementary text: "Last year's". The data analysis system combines the supplementary text entered by the analysis user to determine the target node "Last year's net sales revenue" node that matches the query text entered by the query user for the second time, obtains the target data based on the metadata corresponding to the target node, and returns the speech as shown in Figure 8 in combination with the speech target: "Okay, this is a link to last year's net sales revenue table."
[0239] It can be understood that this application implements data query through the interface shown in Figure 8. The query user can enter natural language to obtain the query results. The query user does not need to learn database knowledge and the names of various tables, which reduces the learning cost of the query user, improves query efficiency, and improves the user experience of the query user.
[0240] In summary, the data analysis method provided by the present application establishes a physical mapping relationship between metadata and table data of the underlying physical table, establishes a semantic mapping relationship between nodes and metadata, the semantics of the node label is related to the metadata, and establishes a model mapping relationship between the analysis model and the node. In this way, a multi-layer mapping relationship is established, so that the analysis model can be decoupled from the underlying table data, and the underlying data changes will not affect the analysis model. The analysis model has strong flexibility and adaptability, and the analysis user does not need to adjust the analysis model, thereby improving the user experience of the analysis user; at the same time, since the nodes in the knowledge graph contain semantic labels, the query user can complete the data query through natural language, and the data analysis system can match the keywords in the query text entered by the query user with the semantic labels of the node, and determine the first node corresponding to the keyword, so that the data query process changes from retrieval to matching. Not only is the query efficiency higher, but the query user does not need to learn the relevant instructions of the database query, and can input natural language to realize data query, reducing the learning cost of the query user and improving the user experience of the query user.
[0241] The data analysis system and data analysis method provided by the present application are described in detail above. The computing device provided by the present application is explained below in conjunction with FIG9 .
[0242] Figure 9 is a schematic diagram of the structure of a computing device provided by this application. The computing device 900 may be the data analysis system described above. Furthermore, the computing device 900 includes a processor 901, a storage unit 902, a storage medium 903, and a communication interface 904. The processor 901, storage unit 902, storage medium 903, and communication interface 904 communicate via a bus 905, and may also communicate via other means such as wireless transmission.
[0243] The processor 901 is composed of multiple general-purpose processors, such as CPUs. The hardware chip is an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD is a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), a data processing unit (DPU), a system on chip (SoC), or any combination thereof. The processor 901 executes various types of digital storage instructions, such as software or firmware programs stored in the storage unit 902, which enables the computing device 900 to provide a wide variety of services.
[0244] In a specific implementation, as an embodiment, the processor 901 includes one or more CPUs, such as CPU0 and CPU1 shown in FIG9 .
[0245] In a specific implementation, as an embodiment, computing device 900 also includes multiple processors, such as processor 901 and processor 906 shown in FIG9 . Each of these processors can be a single-core processor (single-CPU) or a multi-core processor (multi-CPU). A processor here refers to one or more devices, circuits, and / or processing cores for processing data (e.g., computer program instructions).
[0246] The storage unit 902 is used to store program code, and is controlled by the processor 901 to execute the processing steps of data analysis in any of the embodiments of Figures 1 to 8 above. The program code includes one or more software units. The one or more software units mentioned above are the metadata configuration unit, node configuration unit, model configuration unit, generation unit, mapping unit, extraction unit, graph query unit and table query unit in the embodiment of Figure 1, wherein the metadata configuration unit is used to create metadata according to the user's metadata configuration request, and establish a physical mapping relationship between metadata and table data, which can be specifically used to implement S210, S220 and its optional steps in the embodiment of Figure 2; the mapping unit is used to generate metadata according to the table structure information of the table data, and establish a semantic mapping relationship between metadata and table data, which can be specifically used to implement S250 and its optional steps in the embodiment of Figure 2; the node configuration unit is used to create nodes according to the user's node configuration request, configure node labels, and establish a semantic mapping relationship between nodes and metadata, which can be specifically used to implement S210, S230 machine optional steps in the embodiment of Figure 2; the generation unit is used to generate metadata according to the semantics of metadata, indicator data and entity The data generates labels for nodes and establishes a semantic mapping relationship between nodes and metadata, which can be specifically used to implement S250 and its optional steps in the embodiment of Figure 2; the model configuration unit is used to create an analysis model according to the user's model configuration request, establish a model mapping relationship between the analysis model and the node, which can be specifically used to implement S210~S220 and its optional steps in the embodiment of Figure 2; the extraction unit is used to receive a query request input by the user, extract keywords in the query text in the query request, and is specifically used to implement S710, S720 and its optional steps in the embodiment of Figure 7; the graph query unit is used to match keywords with the knowledge graph, determine the target node and the target metadata corresponding to the target node, and is specifically used to implement S730 and its optional steps in the embodiment of Figure 7; the table query unit is used to obtain target data according to the target metadata and return the target data to the user, which is specifically used to implement S740, S750 and its optional steps in the embodiment of Figure 7.
[0247] The storage unit 902 includes a read-only memory and a random access memory, and provides instructions and data to the processor 901. The storage unit 902 also includes a non-volatile random access memory. The storage unit 902 is a volatile memory or a non-volatile memory, or includes both volatile and non-volatile memories. Among them, the non-volatile memory is a read-only memory (ROM), a programmable ROM (PROM), an erasable programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. The volatile memory is a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are used, such as static RAM (SRAM), dynamic random access memory (DRAM), synchronous DRAM (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronized dynamic random access memory (SLDRAM), and direct RAM bus RAM (DR RAM). A hard disk, a universal serial bus (USB), a flash memory, a secure digital memory card (SD card), a memory stick, etc., and a hard disk can be a hard disk drive (HDD), a solid state drive (SSD), a mechanical hard disk (HDD), etc., which is not specifically limited in this application.
[0248] The storage medium 903 is a carrier for storing data, such as a hard disk, a universal serial bus (USB), a flash memory, a secure digital memory card (SD card), a memory stick, etc. The hard disk can be a hard disk drive (HDD), a solid state disk (SSD), a mechanical hard disk (HDD), etc., and this application does not make specific limitations.
[0249] The communication interface 904 is a wired interface (such as an Ethernet interface), an internal interface (such as a high-speed serial computer expansion bus (Peripheral Component Interconnect express, PCIe) bus interface), a wired interface (such as an Ethernet interface) or a wireless interface (such as a cellular network interface or a wireless local area network interface) for communicating with other servers or units.
[0250] Bus 905 is a Peripheral Component Interconnect Express (PCIe) bus, an Extended Industry Standard Architecture (EISA) bus, a unified bus (Ubus or UB), a Compute Express Link (CXL), or a Cache Coherent Interconnect for Accelerators (CCIX). Bus 905 is divided into an address bus, a data bus, and a control bus.
[0251] In addition to the data bus, the bus 905 also includes a power bus, a control bus, a status signal bus, etc. However, for the sake of clarity, various buses are labeled as the bus 905 in the figure.
[0252] It should be noted that FIG9 is only one possible implementation of the embodiment of the present application. In actual applications, the computing device 900 may also include more or fewer components, which is not limited here. For matters not shown or described in the embodiment of the present application, please refer to the relevant description in the embodiments of FIG1-FIG6 above, and will not be repeated here.
[0253] The present application also provides a computing device cluster, which may be the data analysis system described above, and includes at least one computing device 900. The storage unit 902 in one or more computing devices 900 in the computing device cluster may store the same or different instructions for executing the data analysis method.
[0254] Embodiments of the present application also provide a computer program product including instructions. The computer program product may be software or a program product including instructions that can be run on a computing device or stored on any available medium. When the computer program product is run on at least one computing device, the at least one computing device executes the data analysis method.
[0255] The embodiment of the present application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that can be stored by a computing device or a data storage device such as a data center that contains one or more available media. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a magnetic tape), an optical medium (e.g., a high-density digital video disc (DVD)), or a semiconductor medium (e.g., a solid-state drive). The computer-readable storage medium includes instructions that instruct the computing device to execute the data analysis method.
[0256] The above embodiments can be implemented in whole or in part through software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented in whole or in part in the form of a computer program product. A computer program product includes multiple computer instructions. When the computer program instructions are loaded or executed on a computer, the processes or functions according to the embodiments of the present invention are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transferred from one computer-readable storage medium to another.
[0257] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent repairs or replacements within the technical scope disclosed in the present invention, and such repairs or replacements should be included in the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. A data analysis system, characterized in that: The system includes a metadata layer, a semantic layer and a model layer. The metadata layer is used to store a physical mapping relationship between first metadata and first table data, wherein the first metadata is used to describe the first table data; The semantic layer is used to store a knowledge graph and a semantic mapping relationship between a first node in the knowledge graph and the first metadata, wherein the semantic mapping relationship is used to indicate that the semantics of the first tag is related to the first metadata; The model layer is used to store the analysis model and the model mapping relationship between the analysis model and the first node. The analysis model is used to obtain the first table data through the model mapping relationship, the semantic mapping relationship and the physical mapping relationship, and complete data analysis based on the first table data to generate the second table data.
2. The system according to claim 1, characterized in that The system includes an extraction unit, the semantic layer includes a graph query unit, and the metadata layer includes a table query unit, wherein: The extraction unit is used to obtain a query text sent by the first user, wherein the query text is a natural language text; The graph query unit is used to obtain keywords in the query text, match the keywords with labels of multiple nodes in the knowledge graph, determine the first node corresponding to the keyword, and determine the first metadata mapped to the first node based on the semantic mapping relationship; The table query unit is used to determine the first table data corresponding to the first metadata according to the physical mapping relationship, and send the first table data to the first user.
3. The system according to claim 2, characterized in that The metadata layer includes a mapping unit, and the mapping unit is used to generate second metadata according to the storage address and table structure information of the second table data, and establish a physical mapping relationship between the second metadata and the second table data.
4. The system according to claim 3, characterized in that The semantic layer includes a node configuration unit, which is used to obtain a node configuration request sent by a second user, create a second node based on the node configuration request, and establish a semantic mapping relationship between the second node and the second metadata, wherein the node configuration request includes a label of the second node and a semantic mapping relationship between the second node and the second metadata.
5. The system according to claim 3, characterized in that The semantic layer includes a generation unit, which is used to establish a second node in the knowledge graph, determine the semantic information of the second metadata based on a semantic recognition model, generate a label of the second node according to the semantic information, and establish a semantic mapping relationship between the second node and the second metadata.
6. The system according to any one of claims 1 to 5, characterized in that: The model layer includes a model configuration unit, The model configuration unit is used to obtain a model configuration request sent by the second user, the model configuration request including model data of the analysis model requested to be set by the second user, and a model mapping relationship between the analysis model and the first node, and the model configuration request is generated by the second user according to the label of the node in the knowledge graph; The model configuration unit is used to create the analysis model and establish a model mapping relationship between the analysis model and the first node.
7. The system according to any one of claims 1 to 6, characterized in that: The semantics of the first tag related to the first metadata include: The semantics of the label of the first node is the same as the table structure information in the first metadata, and the table structure information includes one or more of a field, a table name, and a database name.
8. The system according to any one of claims 1 to 7, characterized in that: The semantics of the first tag related to the first metadata include: The semantics of the label of the first node is the name of an indicator or dimension, and the first table data corresponding to the first metadata participates in the indicator. Calculation of scale or dimension.
9. The system according to any one of claims 1 to 8, characterized in that: The semantics of the first tag related to the first metadata include: The semantics of the label of the first node is the name of an entity, and the entity is an object existing in the physical world. The first metadata has an entity association relationship with the entity, and the association relationship includes one or more of a dependency relationship, a cooperative relationship, a subordinate relationship, a purchasing relationship, a location relationship, and an upstream and downstream relationship.
10. A data analysis method, characterized in that: The method is applied to a data analysis system, which includes a metadata layer and a semantic layer, wherein the metadata layer is used to store a physical mapping relationship between first metadata and first table data, wherein the first metadata is used to describe the first table data; the semantic layer is used to store a knowledge graph and a semantic mapping relationship between a first node in the knowledge graph and the first metadata, wherein the semantic mapping relationship is used to indicate that the semantics of the first tag is related to the first metadata; The method comprises: Acquire a query text sent by a first user, and determine keywords in the query text, wherein the query text is a natural language text; Based on the knowledge graph in the semantic layer, the keyword is matched with labels of multiple nodes in the knowledge graph to determine the first node corresponding to the keyword, and the first metadata mapped by the first node is determined according to the semantic mapping relationship; Based on the physical mapping relationship in the metadata layer, first table data of the first metadata mapping is determined, and the first table data is sent to the first user.
11. The method according to claim 1, characterized in that: The data analysis system further includes a model layer, the model layer being used to store an analysis model and a model mapping relationship between the analysis model and the first node, the analysis model being used to obtain the first table data through the model mapping relationship, the semantic mapping relationship and the physical mapping relationship, and complete data analysis according to the first table data; The method further comprises: receiving a data analysis request sent by a second user, wherein the data analysis request includes information of the analysis model; acquiring the analysis model; Determining a first node of the analysis model mapping based on a model mapping relationship in the model layer; Determining first metadata mapped by the first node based on the semantic mapping relationship in the semantic layer; Determine first table data of the first metadata mapping based on the physical mapping relationship in the metadata layer; The first table data is input into the analysis model to obtain the second table data, and the second table data is stored.
12. The method according to claim 11, characterized in that After storing the second table data, the method further includes: Second metadata is generated based on the storage address and table structure information of the second table data, and a physical mapping relationship between the second metadata and the second table data is established at the metadata layer.
13. The method according to claim 12, characterized in that The method further comprises: A second node is created in the knowledge graph of the semantic layer, semantic information of the second metadata is determined based on a semantic recognition model, a label of the second node is generated according to the semantic information, and a semantic mapping relationship between the second node and the second metadata is established in the semantic layer.
14. The method according to claim 12, characterized in that The method further comprises: Obtain a node configuration request sent by a second user, create a second node in the knowledge graph of the semantic layer based on the node configuration request, and establish a semantic mapping relationship between the second node and the second metadata in the semantic layer, wherein the node configuration request includes a label of the second node and a semantic mapping relationship between the second node and the second metadata.
15. The method according to any one of claims 11 to 14, characterized in that: Before receiving the data analysis request sent by the second user, the method further includes: Obtaining a model configuration request sent by the second user, the model configuration request including model data of the analysis model requested to be set by the second user and a model mapping relationship between the analysis model and the first node, the model configuration request being generated by the second user according to labels of nodes in the knowledge graph; The analysis model is created, and a model mapping relationship between the analysis model and the first node is established.
16. The method according to any one of claims 10 to 15, characterized in that: The semantics of the label of the first node related to the first metadata include: The semantics of the label of the first node is the same as the table structure information in the first metadata, and the table structure information includes one or more of a field, a table name, and a database name.
17. The method according to any one of claims 10 to 16, characterized in that: The semantics of the label of the first node related to the first metadata include: The semantics of the label of the first node is the name of an indicator or a dimension, and the first table data corresponding to the first metadata participates in the calculation of the indicator or the dimension.
18. The method according to any one of claims 10 to 17, characterized in that: The semantics of the label of the first node related to the first metadata include: The semantics of the label of the first node is the name of an entity, and the entity is an object existing in the physical world. The first metadata has an entity association relationship with the entity, and the association relationship includes one or more of a dependency relationship, a cooperative relationship, a subordinate relationship, a purchasing relationship, a location relationship, and an upstream and downstream relationship.
19. A computing device, characterized in that The computing device comprises a processor and a memory, wherein the memory is used to store instructions, and the processor is used to execute the instructions, so that the computing device implements the method according to any one of claims 1 to 9.
20. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores instructions, and the instructions are executed by a computing device or a computing device cluster to implement the method according to any one of claims 1 to 9.
Citation Information
Patent Citations
Data analysis method and system and related equipment
CN117668242A
Well logging interpretation method, knowledge graph construction method and related device
CN111472751A
Data knitting processing method and device, electronic equipment and readable storage medium
CN115221337A
Rapid query method and platform for complex large-scale SDN network entity
CN115878713A
Knowledge base with type discovery
US20230076773A1
Cited By
Game strategy retrieval method and device based on knowledge graph structured management
CN120104815A
Intelligent consultation service system based on knowledge graph
CN120671842A
Artificial intelligence-based index layer model construction analysis method and system
CN120763257A
Metadata tag generation method and device, equipment, medium and program product
CN120929448A
Knowledge graph updating method and device based on trigger and adapter and medium
CN121210471A