A data analysis method, system and related devices
By introducing multi-layered mapping relationships between the metadata layer, semantic layer, and model layer into the data analysis system, and combining semantic tags from the knowledge graph, the flexibility and adaptability issues of data analysis tools are solved, natural language queries are enabled, and user experience and query efficiency are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HUAWEI TECH CO LTD
- Filing Date
- 2023-11-03
- Publication Date
- 2026-06-02
Smart Images

Figure CN122132572A_ABST
Abstract
Description
[0001] This application is a divisional application. The original application has the application number 202311473247.0 and the original application date is November 3, 2023. The entire contents of the original application are incorporated herein by reference. Technical Field
[0002] This application relates to the field of computers, and more particularly to a data analysis method, system, and related equipment. Background Technology
[0003] With the advent of the information age, data across various fields has experienced explosive growth. This explosive growth has provided tremendous opportunities for data analysis, which has become a key technology in all industries. For example, in healthcare, data analysis of large-scale clinical and bioinformatics data can assist in patient treatment, epidemiological research, and drug development. In finance, 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 social media, data analysis of user data can help social media platforms improve user experience through personalized recommendations, ad targeting, and sentiment analysis. Data analysis has wide applications in various fields.
[0004] Current data analysis tools, when building analytical models, typically require establishing a mapping relationship between the table data and the analytical model if the analytical model needs to use data from a certain table for data analysis. This allows the analytical model to automatically obtain the table data and complete the data analysis based on the mapping relationship. However, if the table data changes, the analytical model must also be adjusted accordingly, resulting in poor flexibility and adaptability of the analytical model. Summary of the Invention
[0005] This application provides a data analysis method, system, and related equipment to address the problems of poor flexibility and adaptability in analysis models.
[0006] Firstly, a data analysis system is provided, comprising a metadata layer, a semantic layer, and a model layer. The metadata layer stores the physical mapping relationship between first metadata and first table data, wherein the first metadata describes the first table data. The semantic layer stores a knowledge graph and the semantic mapping relationship between the first node in the knowledge graph and the first metadata, wherein the semantic mapping relationship indicates that the semantics of the first tag is related to the first metadata. The model layer stores an analysis model and the model mapping relationship between the analysis model and the first node. The analysis model obtains the first table data through the model mapping relationship, the semantic mapping relationship, and the physical mapping relationship, and performs data analysis based on the first table data to generate second table data.
[0007] The system described in the first aspect establishes a physical mapping relationship between metadata and table data in the underlying physical tables through metadata, establishes a knowledge graph through the semantic layer, and establishes a semantic mapping relationship between nodes in the knowledge graph and metadata through the model layer, and establishes a model mapping relationship between the analysis model and nodes through the model layer. By notifying the analysis model of such multi-layer mapping relationships, 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.
[0008] In one possible implementation, the system includes an extraction unit, a semantic layer including a graph query unit, and a metadata layer including a table query unit. The extraction unit is used to obtain the query text sent by the first user, wherein the query text is natural language text. The graph query unit is used to obtain keywords in the query text, match the keywords with the labels of multiple nodes in the knowledge graph, determine the first node corresponding to the keywords, 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.
[0009] The above implementation establishes a knowledge graph containing semantic tags and completes the semantic mapping relationship between nodes and metadata. This allows the first user to complete the query through natural language query text. The data analysis system can match the keywords in the query text entered by the first user with the semantic tags of the nodes to determine the first node corresponding to the keywords. This transforms the data query process from retrieval to matching, which not only improves query efficiency but also eliminates the need for the first user to learn about database queries. They can query data simply by entering natural language, thus enhancing the user experience.
[0010] In one possible implementation, the metadata layer includes a mapping unit, which generates second metadata based on the storage address of the second table data and the table structure information, and establishes a physical mapping relationship between the second metadata and the second table data.
[0011] Optionally, the metadata layer may also include a metadata configuration unit for receiving metadata configuration requests sent by a second user and updating the physical mapping relationship between metadata and 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 can establish the target metadata and the target physical mapping relationship based on this metadata configuration request. In short, users can customize metadata for some physical tables according to their needs, and customize the physical mapping relationship between metadata and physical tables. Alternatively, the data analysis system can automatically establish the physical mapping relationship based on the mapping unit; this application does not impose specific limitations.
[0012] It should be noted that the first user mentioned above can be understood as the user who queries the data, and the second user can be understood as the user who builds the analytical model to complete the data analysis. In this application, the first user is the query user, and the second user is the analytical user.
[0013] In practice, the metadata may include table structure information and address information of the table data. The table structure information may include one or more of the following: database name, table name, and field names. A table may include multiple fields, therefore, one table can correspond to multiple metadata entries. The metadata may also include more information, such as field data types, field lengths, primary keys, foreign keys, indexes, table type, and table version information. The specific content of the metadata can be flexibly set according to actual business needs; this application does not impose specific limitations.
[0014] The above implementation establishes a physical mapping relationship between table data and metadata through a metadata layer, enabling the analysis model to be built based on metadata rather than table data. This decouples the physical table from the analysis model. If the table data changes, the analysis model can adapt to new data structures, field changes, or other types of changes by adjusting the metadata, without needing to redesign or modify the analysis model. The existence of the metadata layer can improve the flexibility and adaptability of the analysis model and reduce maintenance costs.
[0015] In one possible implementation, the semantic layer includes a node configuration unit for obtaining a node configuration request sent by a second user, creating a second node based on the node configuration request, and establishing a semantic mapping relationship between the second node and the second metadata. The node configuration request includes the label of the second node and the semantic mapping relationship between the second node and the second metadata.
[0016] In the above implementation, the second user can configure the tags of the second node according to their 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. Thus, when the first user requests to query the second table data, they can input query text. The data analysis system can match the keywords in the query text with the tags of nodes in the knowledge graph to determine the second node that matches the keywords. Then, based on the semantic mapping relationship, it determines the second metadata mapped to the second node, and thus obtains the second table data corresponding to that second metadata. This implementation allows the second user to perform natural language queries for the first user with only simple configuration of the semantic mapping relationship. Moreover, during the query process, the system does not need to understand the semantics of the query text input by the first user; it can obtain the second table data simply by matching it with the knowledge graph, resulting in higher query efficiency.
[0017] 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.
[0018] Optionally, the generation unit can determine the edges between nodes in the knowledge graph based on edge design rules. In specific implementation, nodes corresponding to metadata with relationships can be connected by edges, so that the relationships between table data can also be displayed in the knowledge graph, which can improve the efficiency and accuracy of association analysis.
[0019] In specific implementations, edge design rules may include intra-table relationship rules. Edges generated by these rules indicate that there are intra-table relationships between the metadata corresponding to the nodes. Intra-table relationships include, but are not limited to, primary key dependency relationships, ordinary dependency relationships, and field value attribution relationships. Specifically, a primary key dependency relationship means that a primary key in one table corresponds to a foreign key in another table; an ordinary dependency relationship means that a field in one table depends on a field in another table; and a field value attribution relationship means that a field in one table belongs to a field in another table. It should be understood that the above physical intra-table relationships are for illustrative purposes only and are not intended to impose specific limitations in this application.
[0020] Optional edge design rules may also include inter-table relationship rules. Edges generated by these rules indicate that there are inter-table relationships between the metadata corresponding to the nodes. Inter-table relationships include, but are not limited to, relationships between tables, foreign key correspondences, and equivalence relationships between fields. Specifically, relationships between tables refer to one-to-one, one-to-many, or many-to-many relationships between two tables; foreign key correspondences refer to the existence of corresponding foreign keys between fields across tables; and equivalence relationships between fields refer 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 different names. It should be understood that the above examples are for illustrative purposes only and are not intended to impose specific limitations.
[0021] Optionally, the edge design rules may include rules governing the relationships between metric dimensions and tables. These rules generate edge indicators indicating relationships between the metadata corresponding to the nodes and between metric dimensions and tables. These relationships may include those between metrics and physical fields, dimensions and physical fields, dimension values and dimensions, dimension values and field values, measures and field values, field values and metrics, and metrics and dimensions. It should be understood that the above examples are for illustrative purposes only and are not intended to impose specific limitations.
[0022] 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 relationships between table data, so that the relationships between table data can also be displayed in the knowledge graph, which can improve the efficiency and accuracy of association analysis.
[0023] 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 by the second user, as well as 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 tags of the nodes in the knowledge graph. The model configuration unit is used to create the analysis model and establish the model mapping relationship between the analysis model and the first node.
[0024] In practice, the model configuration unit can add analytical models and the aforementioned model mapping relationships to the model database based on the model configuration request. Simply put, a second user can create analytical models according to their needs and define the model mapping relationships between analytical models and nodes. Specifically, the second user can determine the nodes associated with the analytical model and establish the model mapping relationships between nodes and the analytical model based on the metrics, dimensions, table structure information, and entities required by the analytical model.
[0025] Furthermore, after configuring the analysis model, the second user can initiate a data analysis request to the data analysis system. The model configuration unit can call the analysis model, obtain nodes in the knowledge graph according to the model mapping relationship, 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 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 tags of the nodes corresponding to the metadata and obtain the semantic mapping relationship between the nodes and the metadata. After the knowledge graph has the nodes corresponding to the analysis results, when the first user queries the analysis results, they can enter natural language to query the analysis results, improving the query experience.
[0026] The above implementation allows the second user to create an analysis model based on their data analysis needs and establish a model mapping relationship between nodes and analysis models based on semantic nodes in the knowledge graph. This allows the second user to understand the characteristics of the underlying physical table without needing to know the details of the underlying database, tables, and fields when creating the analysis model. This simplifies the second user's use of table data and improves the user experience.
[0027] In one possible implementation, each node's label may optionally include one or more attributes, each of which can describe the semantic representation of the node from different dimensions. For example, a node's label may include the following attributes: field name, data type, whether it is a metric field, etc. For example, the labels of node A include label 1: basketball player and label 2: programmer. Label 1 includes the following attributes: team, position, average points per game, etc., and label 2 includes the following attributes: company, job level, years of service, etc. The above examples are for illustration only and are not specifically limited in this application.
[0028] The above implementation method, through multi-attribute node tags, can make the semantic representation of metadata richer and more accurate. First, when users query data in the knowledge graph, they can use different attributes to filter, sort, and search nodes, making data query and retrieval more flexible and accurate.
[0029] In one possible implementation, the semantics of the first tag related to the first metadata include: the semantics of the tag of the first node are the same as the table structure information in the first metadata, and the table structure information includes one or more of the following: fields, table name, and database name.
[0030] Optionally, the semantics of the first tag related to the first metadata include: the semantics of the tag of the first node is the name of the indicator or dimension, and the first table data corresponding to the first metadata participates in the calculation of the indicator or dimension.
[0031] Optionally, the semantics of the first tag related to the first metadata include: the semantics of the tag of the first node is the name of the entity, the entity is an object that exists in the physical world, and the first metadata has an entity association relationship with the entity, which includes one or more of the following: dependency relationship, cooperation relationship, subordinate relationship, purchase relationship, location relationship, and upstream and downstream relationship.
[0032] In the above implementation, the nodes in the knowledge graph are designed according to three layers: the physical table information layer, the semantic indicator dimension layer, and the public information layer. The physical table information layer designs nodes with tags generated based on the metadata of the physical table; that is, the semantics of the first node's tag are the same as the table structure information in the first metadata. The semantic indicator dimension layer designs nodes with tags generated according to the semantics of the indicator / dimension. The metadata that establishes a semantic mapping relationship with this type of node participates in the indicator calculation; that is, the semantics of the first node's tag is the name of the indicator or dimension. The public information layer designs nodes with tags generated according to entity data; that is, the semantics of the first node's tag is the name of the entity. This multi-layered design of the semantic tags for nodes in the knowledge graph allows the knowledge graph to better represent the characteristics of the table data, which not only benefits second users in flexibly building analysis models but also benefits first users in flexibly performing semantic queries.
[0033] Secondly, 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 the 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 the semantic mapping relationship between the first node in the knowledge graph and the first metadata. The semantic mapping relationship is used to indicate that the semantics of the first tag is related to the first metadata. The method includes the following steps: obtaining the query text sent by the first user, determining the keywords in the query text, wherein the query text is natural language text, matching the keywords with the tags of multiple nodes in the knowledge graph based on the knowledge graph in the semantic layer, determining the first node corresponding to the keywords, determining the first metadata mapped to the first node according to the semantic mapping relationship, determining the first table data mapped to the first metadata based on the physical mapping relationship in the metadata layer, and sending the first table data to the first user.
[0034] The method described in the second aspect involves establishing a knowledge graph containing semantic tags and completing the semantic mapping relationship between nodes and metadata. This allows the first user to complete the query through natural language query text. The data analysis system can match the keywords in the query text entered by the first user with the semantic tags of the nodes to determine the first node corresponding to the keywords. This transforms the data query process from retrieval to matching, resulting in higher query efficiency. Furthermore, the first user does not need to learn about database querying; they can query data simply by inputting natural language, thus improving the user experience.
[0035] In one possible implementation, the data analysis system further includes a model layer. The model layer stores 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, semantic mapping relationship, and physical mapping relationship, and to complete the data analysis based on the first table data. The method further includes the following steps: receiving a data analysis request sent by a second user, the data analysis request including 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.
[0036] 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 of the second table data and the table structure information, and establishing a physical mapping relationship between the second metadata and the second table data at the metadata layer.
[0037] 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.
[0038] 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 the label of the second node and the semantic mapping relationship between the second node and the second metadata.
[0039] In one possible implementation, before receiving the data analysis request sent by the second user, the method further includes the following steps: obtaining the 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 being generated by the second user based on the labels of the nodes in the knowledge graph, creating the analysis model, and establishing the model mapping relationship between the analysis model and the first node.
[0040] In one possible implementation, the semantics of the tag of the first node are the same as the table structure information in the first metadata, which includes one or more of the following: fields, table name, and database name.
[0041] In one possible implementation, the semantics of the label of the first node is the name of the metric or dimension, and the data in the first table corresponding to the first metadata participates in the calculation of the metric or dimension.
[0042] In one possible implementation, the semantics of the label of the first node is the name of the entity. The entity is an object that exists in the physical world. The first metadata has an entity association relationship with the entity. The association relationship includes one or more of the following: dependency relationship, cooperation relationship, subordinate relationship, purchase relationship, location relationship, and upstream and downstream relationship.
[0043] Thirdly, a computing device is provided, the computing device including a processor and a memory, the memory for storing instructions and the processor for executing the instructions, such that the computing device implements the method described in the first aspect.
[0044] Fourthly, a computer-readable storage medium is provided, wherein instructions are stored in the computer-readable storage medium, and the instructions are executed by a computing device or a cluster of computing devices to implement the method described in the first aspect.
[0045] Fifthly, a computing device cluster is provided, the computing device cluster including at least one computing device, each computing device including a processor and a memory, the processor of the at least one computing device being configured to execute instructions stored in the memory of the at least one computing device, such that the computing device cluster implements the method described in the first aspect.
[0046] In a sixth aspect, a computer program product comprising instructions is provided, the computer program product including instructions capable of running on a computing device or stored in any available medium, and when the computer program product is run on a computing device or a cluster of computing devices, causing the computing device or cluster of computing devices to perform the method described in the first aspect. Attached Figure Description
[0047] Figure 1This is an architecture diagram of a data analysis system provided in this application; Figure 2 This is a flowchart illustrating the configuration method in a data analysis method provided in this application; Figure 3 It is a flowchart of configuration steps in an application scenario; Figure 4 This is an exemplary interface of a data analysis method provided in this application; Figure 5 This is another exemplary interface in a data analysis method provided in this application; Figure 6 This is an example diagram of another configuration node provided in this application; Figure 7 This is a flowchart illustrating the configuration method in a data analysis method provided in this application; Figure 8 This is an exemplary interface for data querying provided in this application; Figure 9 This is a structural diagram of a computing device provided in this application. Detailed Implementation
[0048] With the advent of the information age, data across various fields has experienced explosive growth. This explosive growth has provided tremendous opportunities for data analysis, which has become a key technology in all industries. For example, in healthcare, data analysis of large-scale clinical and bioinformatics data can assist in patient treatment, epidemiological research, and drug development. In finance, 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 social media, data analysis of user data can help social media platforms improve user experience through personalized recommendations, ad targeting, and sentiment analysis. Data analysis has wide applications in various fields.
[0049] Typically, users of data analysis tools include analytical users and query users. Analytical users use data analysis tools to build analytical models and obtain analytical results, while query users use them to query those results. Although data analysis has wide applications in various fields, current data analysis tools still have many shortcomings.
[0050] For analytics users, when building an analytical model using data analysis tools, if the analytical model needs to use data from a certain table for data analysis, it is usually necessary to establish a mapping relationship between the table data and the analytical model. This allows the analytical model to automatically obtain the table data based on the mapping relationship and complete the data analysis. However, if the table data changes, the analytical model must also be adjusted accordingly, resulting in poor flexibility and adaptability of the analytical model.
[0051] 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, such as financial personnel, who may not understand the basic knowledge of databases, making the learning cost high for query users. In summary, current data analysis tools not only have a certain learning curve and poor user experience, but also lack flexibility and adaptability, making it difficult to meet users' business needs.
[0052] To address the issues of poor flexibility, poor adaptability, and high learning costs in data analysis tools, this application provides a data analysis solution. This solution comprises a metadata layer, a semantic layer, and a model layer. The metadata layer manages metadata and establishes a physical mapping relationship between metadata and table data in the underlying physical tables. The semantic layer manages a knowledge graph, which includes multiple nodes and edges, and establishes a semantic mapping relationship between nodes and metadata. This semantic mapping relationship indicates the semantic relevance of node labels to the metadata. The model layer manages the analysis model and establishes a model mapping relationship between the analysis model and nodes. The data analysis system, through multi-layered mapping relationships, decouples the analysis model from the underlying table data. Changes in the underlying data do not affect the analysis model, giving it high flexibility and adaptability. Users do not need to adjust the analysis model, improving the user experience. Simultaneously, because nodes in the knowledge graph contain semantic tags, users can query data using natural language. The data analysis system can match keywords in the user's query text with the semantic tags of the nodes to determine the first node corresponding to the keywords. This transforms the data query process from retrieval to matching, resulting in higher query efficiency. Furthermore, users do not need to learn database querying knowledge; they can query data simply by inputting natural language, further enhancing the user experience.
[0053] The technical solution provided in this application will be explained below with reference to the accompanying drawings.
[0054] Figure 1 This is an architecture diagram of a data analysis system provided in this application. For example... Figure 1As shown, the structure may include a client 100, a data analysis system 200, and a storage system 300. The client 100, data analysis system 200, and storage system 300 are connected by a communication link, which can be wired or wireless; this application does not specify a particular link. The number of clients 100 and storage systems 300 that establish communication connections with the data analysis system 200 can be one or more. Figure 1 The example provided is a client 100 and a storage system 300; however, this application does not impose any specific limitations.
[0055] Client 100 is used to realize human-computer interaction and can be deployed on terminal devices, including personal computers, smartphones, wearable devices, handheld processing devices, tablets, mobile laptops, augmented reality (AR) devices, virtual reality (VR) devices, all-in-one handheld consoles, wearable devices, in-vehicle devices, smart conferencing devices, smart advertising devices, smart home appliances, etc. Smart home appliances can be robot vacuum cleaners, robot mops, etc., without specific limitations here.
[0056] In specific implementation, the client 100 can be software or application running on a terminal device or computing device controlled by the user, such as a personal computer (PC) client, a World Wide Web (web) client accessed through a browser, an application (APP) client running on a mobile terminal, or a console of a cloud platform. This application does not make any specific limitations.
[0057] In practice, Client 100 is applied to fields with data analysis and query needs, such as data analysis, data mining, data exploration, and data querying. These include, but are not limited to, the biomedical field (e.g., epidemiological research, drug development), the financial field (risk assessment, market forecasting), the social media field (personalized recommendation, advertising targeting, sentiment analysis), and the sales field (pricing strategy, inventory management, customer relationship management). It can also be applied to many other fields with data analysis needs, which will not be listed here.
[0058] Optionally, client 100 can be a client for implementing data analysis functions. The type of client 100 and the type of user vary across different data analysis fields. For example, in the biomedical field, client 100 can be bioinformatics tools, statistical analysis software, etc., used to process and analyze biological data such as genomes, proteomes, and gene expression. In the social media field, client 100 can be data mining tools, social media analysis platforms, etc., used to discover public opinion trends, user interactions, and sentiment analysis from social media data. In the financial field, client 100 can be financial modeling tools, risk analysis tools, etc., used for market analysis, portfolio optimization, and risk management. In the sales field, client 100 can be inventory management tools, pricing analysis tools, etc., used for optimizing inventory, supply chain analysis, and formulating product pricing strategies. It should be understood that the above examples are for illustrative purposes only and this application does not impose specific limitations.
[0059] Optionally, the client 100 can be a standalone client specifically designed for data analysis functions, or it can be a data analysis function module or plugin within comprehensive software, such as the data analysis and query modules within data mining software, or the financial analysis assistant and data query assistant in commonly used enterprise (office automation, OA) clients. This application does not impose any specific limitations.
[0060] Optionally, client 100 can also be a cloud platform client, such as a cloud platform console. Specifically, it can be a web-based console or an application programming interface (API) based console; this application does not impose any specific limitations. This console can provide data analysis cloud services to management users, who can obtain access to the data analysis system 200 provided in this application by purchasing cloud services.
[0061] The data analysis system 200 and storage system 300 can be deployed on computing devices or clusters of computing devices. Computing devices include bare metal servers (BMS), virtual machines, containers, or edge computing devices. A BMS refers to a general-purpose physical server, such as an ARM server or an x86 server. A virtual machine refers to a complete computer system simulated by software, possessing full hardware system functionality and running in a completely isolated environment. Any task that can be performed on a physical computer can also be performed in a virtual machine. When creating a virtual machine on a computing device, a portion of the physical machine's hard drive and memory capacity is used as the virtual machine's hard drive and memory capacity. Each virtual machine has an independent basic input / output system (BIOS), hard drive, and operating system, and can be operated 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 complex environments and simplifying the application development and deployment process. Edge computing devices are devices that are closer to the data source and end user, featuring low latency and high bandwidth, such as intelligent routers and edge servers. The computing device cluster may include multiple of the aforementioned computing devices, such as a data center, and this application does not specifically limit it. 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), storage area network (SAN), etc., and this application does not specifically limit it.
[0062] Optionally, the data analysis system 200 and the storage system 300 may 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 any specific limitations.
[0063] Optionally, the data analysis system 200 and the client 100 may be deployed in the same or different computing device clusters. For example, the client 100 may be deployed on a terminal device in a first computing device cluster, and the data analysis system 200 may be deployed on a computing device in a second computing device cluster. Alternatively, the client 100 and the data analysis system 200 may be deployed in the same computing device cluster. It should be understood that the above examples are for illustration and are not specifically limited in this application.
[0064] Furthermore, Figure 1The data analysis system 200 can be further divided into one or more unit modules, for example, such as Figure 1 As shown, the data analysis system 200 includes a metadata layer 210, a semantic layer 220, and a model layer 230. 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. 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 This is an exemplary division method. The client 100, data analysis system 200, and storage system 300 may also include more or fewer units, and this application does not make any specific limitations.
[0065] It needs to be explained that, Figure 1 The structure shown can be an implementation of the data analysis system 200 deployed on a single computing device. When the data analysis system 200 is deployed in a computing device cluster composed of multiple computing devices, different computing devices in the cluster can store instructions for implementing the metadata layer 210, semantic layer 220, and model layer 230, respectively. For example, computing device A in the cluster stores instructions for implementing the model layer 230, and computing device B stores instructions for implementing the semantic layer 220 and metadata layer 210. The above example is for illustration and is not specifically limited in this application. Of course, different computing devices can also store the same instructions. For example, computing devices B and C both store a combination of instructions for the semantic layer 220 and metadata layer 210 to implement their functions. This application is not specifically limited in this application.
[0066] The functions of each level in the data analysis system 200 are explained below.
[0067] First, the functions of the metadata layer 210, semantic layer 220, and model layer 230 will be explained.
[0068] Metadata layer 210 is used to manage metadata and record 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.
[0069] Optionally, the metadata may include table structure information and address information of the table data. The table structure information may include one or more of the following: database name, table name, and field names. A table may include multiple fields, therefore a table may correspond to multiple metadata.
[0070] For example, if table X is stored at address Y and table X includes multiple fields such as time, region, and sales revenue, 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 impose any specific limitations.
[0071] It should be noted that if all the data in the 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 the field-level storage address. Typically, in distributed storage systems 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. This application does not impose any specific limitations.
[0072] Optionally, 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 specific content of the metadata can be flexibly set according to actual business needs, and this application does not impose specific limitations.
[0073] Optionally, the metadata layer 210 can store metadata in the form of a metadata graph, which includes multiple nodes and edges. A node represents a piece of metadata, and the edges between nodes indicate that there are associations between the metadata. These associations include attribution relationships. For example, if table A belongs to database B, then there is an edge between node A and node B. If field C belongs to table D, then there is an edge between node C and node D. 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. 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 built based on metadata rather than table data, thereby decoupling the physical table from the analysis model. If the table data changes, the analysis model can adapt to new data structures, field changes, or other types of changes by adjusting the metadata, without having to redesign or modify the analysis model. The existence of the metadata layer 210 can improve the flexibility and adaptability of the analysis model and reduce maintenance costs.
[0074] The semantic layer 220 is used to manage the knowledge graph, recording the semantic mapping relationship between each node in the knowledge graph and its metadata. The knowledge graph and semantic mapping relationship can be stored in the graph database 223.
[0075] Optionally, the knowledge graph may include physical nodes and concept nodes. 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. Concept nodes refer to nodes corresponding to some conceptual entities in the actual business domain. 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 topics. In the embodiments of this application, concept 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 impose specific limitations.
[0076] Optionally, the node's label can be a semantic representation of the metadata with which it establishes a semantic mapping relationship. This semantic representation can be a semantic representation of a field in the metadata, 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 impose any 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 aforementioned semantic representation can specifically be natural language, such as words, or it can be a vector or a string; this application does not impose any specific limitations.
[0077] For example, metadata A may include a field "time," which semantically represents time. Metadata A can then establish a second mapping relationship with node A1, whose label is "time." Metadata B may include a field "trail," which semantically represents a path. Metadata C also includes a field "trail," but metadata B and C correspond to different table data. Therefore, metadata B can establish a second mapping relationship with node A2, and metadata C can also establish a second mapping relationship with node A2, whose label is "path." It should be understood that the above examples are for illustrative purposes only and this application does not impose specific limitations.
[0078] Optionally, a node's label can also be the name of an indicator or dimension. This indicator or dimension requires table data from multiple fields to be calculated. The table data corresponding to the metadata associated with the node is the table data involved in the calculation. For example, a node labeled "Net Sales Revenue for the Same Period Last Year" could have associated metadata such as "Total Sales Revenue," "Sales Cost," and "Sales Expenses," which participate in the calculation of net sales revenue for the same period. It should be understood that placing some pre-calculated commonly used indicators in the knowledge graph allows users to directly return frequently used indicators when querying, reducing computational costs during data queries and improving query performance.
[0079] Optionally, the labels of nodes in the knowledge graph can also be entity names, such as subsidiary A, subsidiary B, supplier C, etc. The metadata associated with the node has an entity relationship with that entity. This entity relationship can include ownership, dependency, parent-child, cooperation, subordination, purchase, upstream-downstream, location, etc. This application does not limit the entity relationship. For example, if region A includes subsidiary A and subsidiary B, then the label "region A" can establish a semantic mapping relationship with the metadata "subsidiary A" and "subsidiary B". It should be understood that splitting entities into independent nodes allows the knowledge graph to better reflect the complex relationships between entities in the real world, facilitating the establishment of analysis models.
[0080] It should be understood that the above example provides the possible labels for nodes in a knowledge graph. In specific implementations, nodes in a knowledge graph can be flexibly labeled and have semantic mapping relationships set according to business needs. This application does not limit this.
[0081] Optionally, the knowledge graph can be stored based on an attribute graph. That is, the label of each node in the knowledge graph can include one or more attributes. Each attribute can describe the semantic representation of the node from different dimensions. For example, the label of a node can include the following attributes: field name, data type, whether it is a metric field, etc. For example, the labels of node A include label 1: basketball player and label 2: programmer. Label 1 includes the following attributes: team, position, average score, etc., and label 2 includes the following attributes: company, job level, years of service, etc. The above examples are for illustration only and are not specifically limited in this application.
[0082] It should be understood that multi-attribute node tags can make the semantic representation of metadata richer and more accurate. When querying data in a knowledge graph, users can use different attributes to filter, sort, and search nodes, making data querying and retrieval more flexible and precise.
[0083] Optionally, nodes with data relationships are connected using edges. Each edge includes an edge type, and different data relationships correspond to different edge types. For example, a primary key dependency edge type connects two nodes where the primary key in one table corresponds to a foreign key in another table; a regular dependency edge type indicates that a field in one table depends on a field in another table; and a foreign key mapping edge type indicates that a foreign key in one table corresponds to a primary key in another table. These edge types are just examples; edges in a knowledge graph can include many more types, which will not be listed here.
[0084] Furthermore, edges can include more information, such as direction, attributes, and descriptive information. The direction can include the starting and ending nodes, the attributes can represent the strength of the relationship, and the descriptive information can be some notes or descriptions of the edge. The examples above are for illustration only, and this application does not impose specific limitations. It is understandable that by expressing the relationships between different nodes through different types of edges, the data associations 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 improves path querying and query efficiency.
[0085] It should be noted that the semantic layer 220 may include a large knowledge graph, which includes multiple slices or subgraphs. Different slices or subgraphs may correspond to different business scenarios or dimensions. Alternatively, the semantic layer 220 may include multiple small knowledge graphs, which correspond to different business scenarios or dimensions. This application does not make any specific limitations.
[0086] 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, and then determining the edges between nodes based on the data relationships between metadata, the knowledge graph can flexibly and intuitively express the semantics of metadata and the data relationships between metadata. Analytical models built upon such a knowledge graph achieve better data analysis results, improving the efficiency and accuracy of data analysis. Simultaneously, the semantic layer 220 can hide the underlying raw physical tables, allowing analytical users to create analytical models without needing to understand the details of the underlying database, tables, and fields. Based on the semantic knowledge graph, they can learn the various characteristics of the underlying physical tables, simplifying the use of table data and improving the user experience. Finally, the aforementioned knowledge graph enables query users to access data in a more semantic way. Query users can use terms and concepts that are more in line with business logic to query and manipulate data, such as directly entering: "I want to see the financial report for 2012." Query users no longer need to learn basic database knowledge or how to use various query statements; they can complete data queries through natural language, reducing the learning cost for query users and improving their user experience.
[0087] Model layer 230 is used to manage analysis models and record the model mapping relationship between each analysis model and nodes in the knowledge graph.
[0088] In its 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. Based on this table data, it performs data analysis to make inferences or decisions. The analysis model and its mapping relationships can be stored in the analysis model database 232.
[0089] In practical implementation, an analytical model can establish a model mapping relationship with one or more nodes. Users can build analytical models based on various nodes in the knowledge graph according to business needs. For example, if the analytical model needs to obtain year-on-year net sales revenue indicators and threshold indicators, a model mapping relationship between nodes and the model can be established based on the labels of various nodes in the semantic layer 220. Exemplary analytical models built using the knowledge graph may include: association impact analysis models, path query models, subgraph query models, attribute-based node query models, rule cycle conflict verification models, data and rule correlation verification models, node importance analysis models, etc., without specific limitations in this application.
[0090] It should be understood that by establishing the model mapping relationship between the analysis model and the nodes through the model layer 230, the analysis user can create an analysis model based on the semantically described nodes. Compared with directly creating an analysis model through table data, this not only improves 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 relationship between the table data, the analysis model created in this way can have better accuracy.
[0091] In summary, the data analysis system 200 provided in this application establishes a physical mapping relationship between physical tables and metadata through a metadata layer 210, a semantic mapping relationship between metadata and semantic representations (tags) through a knowledge graph in a semantic layer 220, and a model mapping relationship between models and semantic representations in a model layer 230. The established analysis model can automatically connect to physical tables through the semantic knowledge graph, enabling data analysis and computation. In this way, through multi-layered mapping relationships, the analysis model can be decoupled from the underlying table data, and changes in the underlying data will not affect the analysis model, giving it strong flexibility and adaptability. Simultaneously, the knowledge graph in the semantic layer 220 can flexibly and intuitively express the semantics and relationships of metadata, allowing analysis users to create models using semantic tags without needing to understand the details of the underlying database, tables, and fields, simplifying the use of table data and improving the user experience. Furthermore, query users can access data in a more semantic way, such as by inputting natural language to complete data queries, further enhancing the user experience.
[0092] The following describes the unit modules within each of the metadata layer 210, semantic layer 220, and model layer 230.
[0093] The metadata configuration unit 211 in the metadata layer 210 is used to receive the 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 the physical mapping relationship between metadata and table data.
[0094] In practice, the metadata configuration request may include the target metadata requested by the analysis user, as well as the target physical mapping relationship between the target metadata and the target table data. Based on this metadata configuration request, the metadata configuration unit 211 can add target metadata and target physical mapping relationships to the metadata database 213. Simply put, the analysis user can customize metadata for some physical tables according to their needs, and customize the physical mapping relationship between the metadata and the physical tables.
[0095] The mapping unit 212 in the metadata layer 210 is used to update the metadata database 213 based on table data. It should be understood that the metadata configuration unit 211 updates the metadata and physical mapping relationships in the metadata database 213 through manual configuration, while the mapping unit 212 automatically generates the metadata and physical mapping relationships based on the table data. In short, the metadata and physical mapping relationships in the metadata database 213 can be automatically generated by the mapping unit 212 based on the underlying physical tables, or they can be generated manually by the analysis user through the metadata configuration unit 211. Different information within the same metadata can also be partially generated manually and partially automatically by the system. As mentioned above, metadata includes at least the table structure information and the storage address of the table data. For example, metadata may include fields and storage address, or the table name and storage address, or the database name and storage address. Therefore, the system can automatically obtain the metadata of the table data by querying the table, and then map the metadata to the original physical table.
[0096] Furthermore, if the metadata includes more content, other information related to the table data structure, such as tables, columns, data types, indexes, primary keys, and foreign keys, can be automatically generated by looking up the table. For other information outside the table data structure, such as business meaning, purpose, description, and data dictionary, this type of information can be manually set and generated.
[0097] The node configuration unit 221 in the semantic layer 220 is used to receive node configuration requests sent by the analysis user and update the graph database 223 according to the node configuration requests.
[0098] In specific implementation, the node configuration request may include the tags of the target node requested by the analysis user, as well as the target semantic mapping relationship between the target node and the target metadata. Based on this node configuration request, the node configuration unit 221 can add a new target node in the knowledge graph database 223, configure tags for it, and then associate the target node with the target metadata. Simply put, the analysis user can add nodes to the knowledge graph according to business needs, add semantic tags, and establish a semantic mapping relationship between the metadata that conforms to the semantics of the tag and the node.
[0099] 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 according to 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.
[0100] The generation unit 222 in the semantic layer 220 is used to update the knowledge graph database 223 based on metadata. It should be understood that the node configuration unit 221 updates the nodes and semantic mapping relationships in the knowledge graph through manual configuration, while the generation unit 222 automatically generates nodes and tags in the knowledge graph based on metadata, automatically completing the semantic mapping relationship between nodes and metadata. Simply put, the nodes in the knowledge graph can be generated by analyzing user configurations or automatically generated by the system based on metadata.
[0101] Optionally, if the node's label is a semantic representation of metadata, the generation unit 222 can use a semantic recognition model to identify the semantic information of the fields contained in the metadata, generate the node's label based on the semantic information, and establish a semantic mapping relationship between the metadata and the node. For example, if the field in metadata M1 is "time", the semantic recognition model can identify its semantic information as "time". In this case, a node N1 labeled "time" can be generated, and a semantic mapping relationship can be established between node N1 and metadata M1. Similarly, if the field in metadata M2 is "trail", the semantic recognition model can identify its semantic information as "path". In this case, a node N2 labeled "path" can be generated, and a semantic mapping relationship can be established between node N2 and metadata M2.
[0102] In specific implementations, the aforementioned semantic recognition model can be a machine learning model, including but not limited to word embedding models, recurrent neural networks (RNNs), long short-term memory networks (LSTMs), convolutional neural networks (CNNs), pre-trained language models, etc. Among them, word embedding models can be Word2Vec (word to vector), GloVe (global vectors for word representation), etc., and pre-trained language models can be BERT (bidirectional encoder representations from transformers), GPT (generative pre-trained transformer), etc. The above examples are for illustration purposes only, and this application does not limit them.
[0103] Optionally, if the node's label is the name of an indicator or dimension, and the metadata associated with that node participates in the calculation of that indicator or dimension, then the generation unit 222 can also obtain indicator dimension data. This indicator dimension data includes the indicator name, dimension name, and indicator formula. The semantic information of the indicator name and dimension name is identified through a semantic recognition model, and the node's label is generated based on this semantic information. Metadata from multiple tables participating in the calculation is obtained based on the indicator formula, establishing a semantic mapping relationship between the metadata and the node. In specific implementations, for some commonly used indicators, multiple indicator dimension data can be obtained by connecting to indicator platforms, dimension platforms, or importing white papers.
[0104] Optionally, if the node's label is an entity name, the generation unit 222 can also acquire entity data, identify the semantic information of the entity name through a semantic recognition model, generate node labels based on the semantic information, determine the metadata associated with the entity based on the entity data, and establish a semantic mapping relationship between the metadata and the node. In specific implementations, multiple entity data can be obtained by connecting to the enterprise's management platform and importing management data.
[0105] In simple terms, for concept nodes, when the semantics of the node's label are the same as the associated metadata, the generation unit 222 can obtain the node's label by recognizing the semantic information of the fields in the metadata; when the semantics of the node's label are related to the associated metadata, the generation unit 222 can 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, the node's label is the entity name. The label can be obtained by acquiring entity data, obtaining the label based on the entity name in the entity data, and then determining the metadata associated with the node based on the entity relationships between various entities recorded in the entity data.
[0106] It should be noted that node labels may include one or more attributes. These attributes can be based on user settings or obtained by the generation unit 222 from the original table data, entity data, or metric dimension data. For example, node labels may include attributes such as field name, data type, and whether it is a metric field. These attributes are all table structure information and can be obtained by querying the original table data. As another example, node labels may include attributes such as atomic metrics, scenarios, scenario values, and time periods. Atomic metrics refer to measurements of a specific business event behavior, named using actions and measurement methods, such as payment amount or number of registered users. These attributes can be obtained from metric dimension data. It should be understood that the above examples are for illustrative purposes only and this application does not impose specific limitations.
[0107] It should be understood that placing pre-calculated, commonly used metrics as nodes in a knowledge graph allows users to directly retrieve these metrics when querying, reducing computational costs and improving query performance. Placing semantic representations of entities as nodes in a knowledge graph enables it to better reflect the complex relationships between entities in the real world, facilitating the creation of analytical models. Furthermore, placing semantic representations of metadata as nodes in a knowledge graph not only makes it easier for users to build analytical models but also allows them to query data using natural language, improving the user experience.
[0108] Optionally, the generation unit 222 can determine the edges between nodes in the knowledge graph according to the edge design rules. In specific implementation, nodes corresponding to metadata with association relationships can be connected by edges, 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.
[0109] Optionally, the edge design rules may include intra-table relationship rules. Edges generated by these rules indicate that there are intra-table relationships between the metadata corresponding to the nodes. Intra-table relationships include, but are not limited to, primary key dependency relationships, ordinary dependency relationships, and field value attribution relationships. Specifically, a primary key dependency relationship means that a primary key in one table corresponds to a foreign key in another table; an ordinary dependency relationship means that a field in one table depends on a field in another table; and a field value attribution relationship means that a field in one table belongs to a field in another table. It should be understood that the above physical intra-table relationships are for illustrative purposes only and are not intended to impose specific limitations.
[0110] Optionally, the edge design rules may include inter-table relationship rules. Edges generated by these rules indicate that there are inter-table relationships between the metadata corresponding to the nodes. These inter-table relationships include, but are not limited to, relationships between tables, foreign key correspondences, and equivalence relationships between fields. Specifically, relationships between tables refer to one-to-one, one-to-many, or many-to-many relationships between two tables; foreign key correspondences refer to the existence of corresponding foreign keys between fields across tables; and equivalence relationships between fields refer 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 different names. It should be understood that the above examples are for illustrative purposes only and are not intended to impose specific limitations.
[0111] Optionally, the edge design rules may include rules governing the relationships between indicator dimensions and tables. Edges generated by these rules indicate relationships between indicator dimensions and tables existing between the metadata corresponding to the nodes. These relationships may include those between indicators and physical fields, dimensions and physical fields, dimension values and dimensions, dimension values and field values, measures and field values, field values and indicators, and indicators and dimensions. It should be understood that the above examples are for illustrative purposes only and are not intended to impose specific limitations. For instance, an indicator might be total sales, and physical fields might include sales quantity and sales price. Total sales are the product of sales quantity and sales price. A relationship exists between total sales and sales quantity, and the nodes corresponding to total sales can be connected to the nodes corresponding to sales quantity via edges. Again, it should be understood that the above examples are for illustrative purposes only and are not intended to impose specific limitations.
[0112] The model configuration unit 231 in the model layer 230 is used to receive the model configuration request sent by the analysis user and update the analysis model database 232 according to the model configuration request. The analysis model database 232 may include the analysis model and the model mapping relationship between the analysis model and the node.
[0113] In 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 nodes. Based on this model configuration request, the model configuration unit 231 can add the target analysis model and the aforementioned target model mapping relationship to the analysis model database 232. In simple terms, the analysis user can create analysis models according to their needs and define the model mapping relationship between the analysis model and nodes. Specifically, the analysis user can determine the nodes associated with the analysis model and establish the model mapping relationship between the nodes and the analysis model based on the indicators, dimensions, table structure information, and entities required by the analysis model.
[0114] For example, if analyzing user needs requires creating an analytical model for changes in sales performance, suppose this model needs to determine the year-on-year net sales revenue by comparing it with a target threshold. The year-on-year net sales revenue is the ratio of current period's net sales revenue to the previous period's net sales revenue, typically used to assess changes in sales performance. This analytical model needs to use at least three indicators: current period's net sales revenue, previous period's net sales revenue, and the target threshold. Therefore, the analytical model can establish a model mapping relationship with the nodes corresponding to these three indicators. When performing data analysis, the analytical model can automatically obtain nodes in the knowledge graph based on the model mapping relationship, then obtain the metadata corresponding to the nodes based on the semantic mapping relationship, and obtain the table data corresponding to the metadata based on the physical mapping relationship. Finally, it can complete the data analysis based on this table data. It should be understood that the above example is for illustrative purposes only and this application does not impose specific limitations.
[0115] Understandably, the model configuration unit 231 configures the model mapping relationship between the analysis model and the nodes, the node configuration unit 221 and the generation unit 222 configure the semantic mapping relationship between the nodes and metadata in the knowledge graph, and the metadata configuration unit 211 and the mapping unit 212 configure the physical mapping relationship between the metadata and the table data. This allows the analysis model to be associated with the nodes in the knowledge graph, the nodes to be associated with the metadata, and the metadata to be associated with the original table data. Through multi-layered 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, giving the analysis model strong flexibility and adaptability.
[0116] Furthermore, after configuring the analysis model, 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 nodes in the knowledge graph according to the model mapping relationship, 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 to obtain the data analysis results. The results are then saved in the storage system 300, generating the table data corresponding to the data analysis results. The mapping unit 212 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 222 in the semantic layer can generate the tags of the nodes corresponding to the metadata and obtain the semantic mapping relationship between the nodes and the metadata. After the knowledge graph has the nodes corresponding to the analysis results, when the query user queries the analysis results, they can query the analysis results through natural language, improving the query experience.
[0117] 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.
[0118] In practice, data query requests include query text composed of natural language. For example, natural language query text could be: "I want this year's sales report," "Please give me the sales data for all products in the fourth quarter of last year," "How many interns are there in Department S," and so on. It should be understood that traditional query statements are usually programming-based, such as Structured Query Language (SQL). Natural language query text is closer to everyday human language than SQL, allowing non-technical users to easily perform data queries and reducing their learning curve. Traditional query statements not only require learning the structure of the query language but also memorizing the names of various tables. For example, the name of the balance sheet might be a string, which users would need to input when using SQL. Using the method in this application, users can simply input: "I need a balance sheet." Users can directly input the terms to obtain the corresponding query results, resulting in higher efficiency.
[0119] It should be noted that the query text in the data query request can be the text directly entered by the querying user, or it can be the text generated by speech recognition technology after the querying user enters voice. This application does not make any specific limitations.
[0120] 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, where the keywords are word segments related to the data query. In specific implementations, word segmentation methods can include statistical word segmentation, dictionary-based word segmentation, machine learning word segmentation, etc. Statistical word segmentation methods use statistical models to determine which parts of the query statement need to be segmented, and this statistical model can be a Markov model, a Hidden Markov model (HMM), etc. Dictionary-based word segmentation methods use a known dictionary to match word segments in the text; the dictionary can include common vocabulary and terms. Machine learning word segmentation methods use machine learning algorithms to train the model; specifically, a sample set can be used to train the machine learning model, enabling the machine learning model to generate word segments based on the input query text. It should be understood that the above examples of word segmentation are for illustrative purposes only, and word segmentation can also be achieved in other ways, such as through natural language processing tools like jieba. Different languages and business scenarios may require different word segmentation methods, and this application does not impose specific limitations.
[0121] In practice, after obtaining multiple word segments, keywords can be selected from them using various filtering methods. These methods include stop word-based filtering, part-of-speech (POS)-based filtering, term frequency-based filtering, and term frequency-inverse document frequency (TF-IDF)-based filtering. Stop word-based filtering involves filtering out keywords from multiple word segments by filtering out stop words, which are words with low actual meaning, such as interjections like "ah," "hey," and "oh," function words like "of," "is," and "and," pronouns like "you," "I," and "she," and prepositions like "at," "in," and "with." Part-of-speech-based filtering involves determining the part of speech of each word, such as noun, verb, or adjective, and then identifying keywords based on that part of speech. In the query domain, nouns usually have higher importance. Term frequency-based filtering involves analyzing the frequency of each word in the query statement. High-frequency words are usually important keywords. Term frequency statistics are used to determine which words repeatedly appear in the query history of users, and these words can be identified as keywords. TD-IDF is a weighted technique used to identify keywords in text. It assigns a TD-IDF score to each word segment, and words with higher scores are considered keywords. It should be understood that the above method is for illustrative purposes only; many other methods can be used to filter keywords from multiple word segments, or a combination of these methods can be used to determine keywords. This application does not impose any specific limitations.
[0122] 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 of the keyword matching based on the tags of the nodes in the knowledge graph, and determine the target metadata corresponding to the target node based on the semantic mapping relationship.
[0123] In practice, the target node matching 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. This prompt message is used to encourage the query user to enter more detailed query text. Based on the more detailed query text entered by the query user, the target node is further confirmed, and thus the target metadata is determined. The following is an example of user A using natural language to look up a table: User A: "I want to see the company's financial statements"; System: "Do you need a profit and loss statement or a balance sheet?" User A: "Profit and Loss Statement"; System: "Would you like to see the quarterly report or the annual report?" User A: "Last quarter"; System: "Okay, here is the link to the balance sheet for last quarter: [link]".
[0124] The examples above are for illustrative purposes only and are not intended to limit the scope of this application. In practice, the system can pre-set various dialogue templates, determine the next dialogue to be sent to the user based on the multiple nodes matched by the keywords corresponding to the query text previously entered by the user, and then determine new keywords based on the next query text returned by the user. By continuously communicating with the user, the system can ultimately determine the target node corresponding to the target data requested by the user and obtain the metadata of that target node.
[0125] It should be understood that traditional data queries can only obtain the actual semantics of the query text from the user through natural language processing, and then retrieve the database based on the semantics, providing feedback messages based on the search results. This process of natural language processing followed by retrieval results in a slow system response, especially for large and complex databases. This application uses knowledge graph matching to obtain nodes that match the keywords, and sends feedback messages to the query user based on the metadata corresponding to the nodes. Due to the existence of the knowledge graph, the system response is much faster, improving the user experience.
[0126] Optionally, a node can correspond to multiple metadata. After determining the target node, the system can send a prompt message to the querying user based on the multiple metadata associated with the target node and the script template, asking the querying user which metadata data they need, and determine the target metadata based on the querying user's feedback.
[0127] 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 user may correspond to multiple target metadata. For example, if the user requests to query 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 "balance sheet". The above example is for illustration and is not specifically limited in this application.
[0128] It should be noted that if the node's label is a natural language label, then keywords can be directly matched against the label. If the node's label is a string or vector, which is obtained by encoding natural language, then keywords can be converted into strings or vectors using the same encoding method before matching those strings or vectors against the label. It should be understood that even when matching vectors or strings, it is actually matching semantics. This application uses semantic matching, eliminating the need for natural language processing of the query text input by the user. The system does not need to deeply understand the meaning of the user's text and can directly achieve data retrieval through label matching, resulting in higher query efficiency.
[0129] The table query unit 214 of the metadata layer 210 is used 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 query user. It should be understood that the metadata includes the storage address of the table data, and the target data can be read according to the storage address and returned to the query user.
[0130] Optionally, when there are multiple target metadata entries, the table data corresponding to each target metadata entry can be obtained separately. Then, based on the fields, tables, and databases corresponding to each target metadata entry, the final target data can be determined. Specifically, the metadata corresponding to entity nodes and dimension nodes can be used as filtering fields to filter the table data corresponding to indicator nodes to obtain the target data required by the query user. Alternatively, information such as edge connections between nodes in the knowledge graph and node attribute labels can be combined to determine the table data corresponding to multiple target source data. The specific rules for generating target data based on multiple target metadata entries can be flexibly configured according to the actual application scenario.
[0131] Using the example above, a user requests to retrieve 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." By using "Subsidiary A" and "Quarter" as filter fields, and filtering through the company's entire annual balance sheet, the balance sheet of subsidiary A for the four quarters of last year is obtained. It should be understood that the above example is for illustrative purposes only and this application does not impose any specific limitations. In simple terms, a table may include multiple fields. A querying user may only want to see 2-3 fields, or they may want to see field 1 in table A and field 2 in table B. After establishing a semantic mapping relationship between the metadata of each field and semantic nodes, when a querying user performs a data query, they only need to enter the fields contained in the table they want to see. The system can automatically generate the table required by the querying user through semantic node matching, making the query method more flexible.
[0132] It needs to be explained that, Figure 1 This is an exemplary division method. The extraction unit 233 can also be deployed on the client 100, that is, the client 100 can implement keyword extraction locally. The extraction unit 233 can also be deployed on the semantic layer 220. This application does not limit this.
[0133] It should be understood that the Data Analysis System 200 can flexibly configure analytical models in conjunction with knowledge graphs to achieve correlation impact analysis, node importance analysis, and more. It can also leverage knowledge graphs to enable flexible data queries, such as queries based on storage paths, knowledge graph slices or subgraphs, and node attributes, greatly facilitating data analysis for users. Furthermore, the system architecture is highly scalable, allowing users to flexibly configure analytical models according to business needs. The Data Analysis System 200 can also recommend specific analytical models based on user queries to facilitate data exploration. Users can utilize the Data Analysis System 200 for various applications including data exploration, data mining, and data analysis.
[0134] It should be understood that in this application, "analysis user" refers to the user who creates the model and configures more than 200 mapping relationships in the data analysis system, and "query user" refers to the user who queries the data. In the specific implementation process, the analysis user and the query user can be different users or the same user. This application does not make any specific restrictions.
[0135] In summary, the data analysis system provided in this application includes a metadata layer, a semantic layer, and a model layer. The metadata layer manages metadata and establishes a physical mapping relationship between metadata and the underlying physical table data. The semantic layer manages the knowledge graph, which includes multiple nodes and edges, and establishes a semantic mapping relationship between nodes and metadata. The semantics of the node labels are related to the metadata. The model layer manages the analysis model and establishes a model mapping relationship between the analysis model and the nodes. Through these multi-layered mapping relationships, the data analysis system decouples the analysis model from the underlying table data. Changes in the underlying data do not affect the analysis model, giving it strong flexibility and adaptability. Furthermore, because the nodes in the knowledge graph contain semantic tags, users can query data using natural language. The data analysis system can match keywords in the user's input query text with the semantic tags of the nodes to determine the first node corresponding to the keywords. This transforms the data query process from retrieval to matching, resulting in higher query efficiency. Moreover, users do not need to learn database query instructions; they can query data simply by inputting natural language, reducing the user's learning cost and improving the user experience.
[0136] The above text combined Figure 1 The data analysis system provided in this application is described in detail below. Figures 2 to 6 This application describes the data analysis methods provided.
[0137] Figure 2 This is a flowchart illustrating the configuration steps of a data analysis method provided in this application. This method can be applied to, for example... Figure 1 In the data analysis system 200 shown, such as Figure 2 As shown, the method may include the following steps: S210: Client 100 sends a configuration request to data analysis system 200. This step can be performed by... Figure 1 The model configuration unit 231, node configuration unit 221, and metadata configuration unit 211 in the embodiment are implemented.
[0138] 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 the metadata set by the user and the physical mapping relationship between the metadata and table data; the node configuration request may include the tags of the nodes set by the user and the semantic mapping relationship between the nodes and metadata; the model configuration request includes model data and the model mapping relationship between the model and nodes. For a detailed description of the model configuration request, node configuration request, and metadata configuration request, please refer to [reference needed]. Figure 1 The relevant details of the embodiments will not be repeated here.
[0139] S220: The data analysis system 200 configures model mapping relationships, semantic mapping relationships, and physical mapping relationships according to the configuration request. This step can be performed by... Figure 1 The model configuration unit 231, node configuration unit 221, and metadata configuration unit 211 in the embodiment are implemented.
[0140] Optionally, the data analysis system 200 can update the physical mapping relationship between metadata and table data based on metadata configuration requests. The metadata includes at least the table structure information and the storage address of the table data. The table structure information may include fields, table name and database name, and may also include data type, index, primary key, foreign key and other information. The metadata may also include business meaning, purpose, description, data dictionary, etc. This application does not make specific limitations.
[0141] Optionally, the data analysis system 200 can update the semantic mapping relationship between nodes and metadata based on node configuration requests, where the semantics of the node's tags are related to the metadata. The node's tags can be semantic representations of the metadata with which the semantic mapping relationship is established, such as semantic representations of fields, table names, or database names in the metadata; this application does not impose specific limitations on these representations. Node tags can also be names of metrics or dimensions that require multiple fields of table data to be calculated; the table data corresponding to the metadata associated with the node is the aforementioned table data used in the calculation. Node tags can also be names of entities, such as subsidiary A, subsidiary B, supplier C, etc. The metadata associated with the node has an entity association relationship with this entity, which can include ownership, dependency, parent-child, cooperation, subordination, purchase, upstream / downstream, location, etc. This application does not limit the entity association relationship.
[0142] Optionally, each node's label may include one or more attributes. Each attribute can describe the semantic representation of the node from different dimensions. For example, a node's label may include the following attributes: field name, data type, whether it is a metric field, etc. For instance, node A's labels include label 1: basketball player, and label 2: programmer. Label 1 includes the following attributes: team, position, average points per game, etc., and label 2 includes the following attributes: company, job level, years of service, etc. The above examples are for illustration only and are not intended to limit the scope of this application. It should be understood that multi-attribute node labels can make the semantic representation of metadata richer and more accurate. When users query data from a knowledge graph, they can use different attributes to filter, sort, and search nodes, making data querying and retrieval more flexible and precise.
[0143] To facilitate better understanding of this application, the label design rules are explained below with reference to Table 1. Table 1 is an example table of node design rules for a knowledge graph provided in this application. According to these design rules, users can flexibly configure nodes in the knowledge graph, and the system can also automatically generate nodes in the knowledge graph based on these rules. The labels of nodes are attribute groups, so the following table provides examples based on attributes.
[0144] Table 1. Example of node design rules in a knowledge graph
[0145] As shown in Table 1 above, nodes in a knowledge graph can be designed according to three layers: the physical table information layer, the semantic indicator dimension layer, and the public information layer. Nodes designed in the physical table information layer are tags generated based on the metadata of the physical table. That is, the semantics of the node tags described above are the same as the metadata. For example, physical table nodes are node tags designed according to the semantics of the table name, and physical field nodes are node tags designed according to the field name. Nodes designed in the semantic indicator dimension layer are tags generated according to the semantics of the indicator / dimension. The metadata that establishes a semantic mapping relationship with this type of node will participate in the calculation of the indicator. Nodes designed in the public information layer are tags generated according to entity data, that is, entity nodes described above. It should be understood that Table 1 is an example of tag design, and this application does not make specific limitations.
[0146] 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 edge design rules. Optionally, edge design rules may include intra-table relationship rules, inter-table relationship rules, and relationship rules between indicator dimensions and tables. Specifically, edges generated by intra-table relationship rules indicate that there are intra-table relationships between the metadata corresponding to the nodes; edges generated by inter-table relationship rules indicate that there are inter-table relationships between the metadata corresponding to the nodes; and edges generated by relationship rules between indicator dimensions and tables indicate that there are relationship rules between the metadata corresponding to the indicator dimensions and tables. For a detailed description of the edge rules, please refer to [reference needed]. Figure 1 The relevant content in the embodiments will not be repeated here.
[0147] To facilitate a better understanding of this application, the edge design rules are explained below with reference to Table 2. Table 2 is an example table of edge design rules in a knowledge graph provided by this application. According to these design rules, 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 this application does not impose any specific limitations.
[0148] Table 2. Example of edge design rules in a knowledge graph
[0149] As shown in Table 2 above, the data analysis system 200 can generate edges in nodes according to the relationships within tables, between tables, and between indicator dimensions and tables. Nodes corresponding to metadata with related relationships are connected by edges, so that the relationships between table data can also be displayed in the knowledge graph, which can improve the efficiency and accuracy of association analysis.
[0150] 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, the system can determine the indicators, dimensions, table structure information and entities that the analysis model needs to use, and then determine the nodes associated with the analysis model and establish the model mapping relationship between the node and the analysis model.
[0151] Understandably, after configuring the model mapping relationship between the analysis model and nodes, the semantic mapping relationship between nodes and metadata in the knowledge graph, and the physical mapping relationship between metadata and table data, the analysis model is associated with nodes in the knowledge graph, nodes are associated with metadata, and metadata is associated with the original table data. In this way, through multi-layered 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.
[0152] S230: The data analysis system 200 calls the analysis model and generates analysis results based on the model mapping relationship, semantic mapping relationship, and physical mapping relationship. This step can be performed by... Figure 2 This is implemented using the model configuration unit in the embodiment.
[0153] In practice, after configuring the analysis model, the user can send a data analysis request to the data analysis system 200. The data analysis system 200 can then invoke the analysis model, retrieve nodes from the knowledge graph based on the model mapping relationship, obtain the corresponding metadata based on the semantic mapping relationship, and retrieve the table data corresponding to the metadata based on the physical mapping relationship. The table data is then input into the analysis model for data analysis to obtain the results. The data analysis system 200 can also automatically invoke the analysis model to analyze the data based on the model mapping relationship, semantic mapping relationship, and physical mapping relationship. Thus, as the data is continuously updated, the analysis model will continuously and automatically analyze and explore the data.
[0154] S240: The data analysis system 200 sends a storage request for the analysis results to the storage system 300. This step can be performed by... Figure 2 This is implemented using the model configuration unit in the embodiment.
[0155] In practice, the storage system 300 can store the analysis results in a table in the database and generate table data corresponding to the analysis results.
[0156] S250: The data analysis system 200 generates metadata corresponding to the analysis results and updates semantic and physical mapping relationships. This step can be performed by... Figure 1 The generation unit 222 and mapping unit 212 in the embodiment are implemented.
[0157] Optionally, the data analysis system 200 can generate metadata corresponding to the analysis results based on the table structure information and storage address of the table data corresponding to the analysis results, thereby obtaining the physical mapping relationship between the metadata and the table data of the analysis results. Further, the data analysis system can identify the information of fields contained in the metadata through a recognition model, generate node labels based on semantic information, establish a semantic mapping relationship between the metadata and the nodes, and finally update the edges between nodes in the knowledge graph according to edge design rules. In this way, once the knowledge graph contains the node corresponding to the analysis result, when a querying user queries the mapping result, they can query the analysis result using natural language, improving the query experience.
[0158] It should be noted that when the data analysis system 200 generates node labels, it can generate node labels according to the node design rules described in Table 1 above, as described in S220, and generate edges between nodes according to the edge design rules described in Table 2. This will not be 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 these rules. This application does not limit this.
[0159] It should be understood that Figure 2 The steps shown are for one application scenario. In this scenario, the analysis model and various mapping relationships are generated first based on the user's configuration. 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 configured manually. The manual configuration steps can be referred to in S210~S220 above, and will not be repeated here.
[0160] To make this application better understood, the following is combined with Figures 3-6 The configuration method in the data analysis method provided in this application will be further explained. Specifically, Figure 3 Taking specific application scenarios as examples, this further explains Figure 2 The configuration method shown is as follows: Figures 4-6 Let's take a specific application interface as an example to further explain. Figure 2 The configuration method shown.
[0161] Figure 3 It is a flowchart of configuration steps in an application scenario. Figure 3 In the application scenario shown, the analysis model configured by the user needs to perform data analysis based on two parameters: "year-on-year net sales revenue" and "target threshold." The "year-on-year net sales revenue" parameter requires both "current year's net sales revenue" and "last year's net sales revenue." Therefore, the analysis model needs parameters including "current year's net sales revenue," "last year's net sales revenue," and "target threshold." Thus, steps S210-S220 can be executed to establish model mapping relationships between these three parameters and nodes in the knowledge graph of the semantic layer 220, as follows: Figure 3 As shown, a model mapping relationship is established between the "Net Sales Revenue This Year" parameter and the "Net Sales Revenue This Year" node, the "Net Sales Revenue Last Year" parameter and the "Net Sales Revenue Last Year" node, and the "Target Threshold" parameter and the "Target Threshold" node.
[0162] 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". Among these, in... Figure 3 In the example shown.
[0163] Furthermore, establish a physical mapping relationship between the metadata “ydt” and the field “ydt” in table “XXX1”, establish a physical mapping relationship between the metadata “hst” and the field “hst” in table “XXX2”, and establish a physical mapping relationship between the metadata “target” and the field “target” in table “XXX3”.
[0164] Furthermore, the data analysis system 200 can generate edges between nodes in the knowledge graph, for example, Figure 3 In the diagram shown, an edge relationship is established between the "Net Sales Revenue This Year" node and the "Time" node. The "Net Sales Revenue This Year" node is also established with the "Subsidiary A" node. The "Subsidiary A" node can be a physical node, and the "Time" node can be a dimension node. Figure 3 Bold straight lines represent edge relationships between nodes, while thin curves 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... Figure 3The “time node” shown establishes a semantic mapping relationship with multiple metadata “time”. Different metadata “time” can establish a physical mapping relationship with the “time” field in different tables. Examples will not be elaborated here.
[0165] Understandable, establish well Figure 3 After configuring the analysis model, semantic mapping relationship, and physical mapping relationship, the data analysis system 200 can execute S230 to start data analysis. First, it determines the parameters to be obtained according to the logical rules of the analysis model, namely "net sales revenue this year", "net sales revenue last year", and "target threshold". Then, it determines the three nodes corresponding to these three parameters through the model mapping relationship. Next, it determines the metadata corresponding to these three nodes according to the semantic mapping relationship. Finally, it obtains the table data of "net sales revenue this year", "net sales revenue last year", and "target threshold" according to the physical mapping relationship. Based on the table data, it completes the data analysis and obtains the analysis results.
[0166] Furthermore, the data analysis system 200 executes S240 to store the analysis results in the storage system 300, that is... Figure 3 The various tables shown at the bottom are then processed by S250, which generates metadata based on the table data, establishes physical mapping relationships, creates new nodes in the knowledge graph, generates node labels based on the semantics of the metadata, and updates the edge relationships between nodes in the knowledge graph.
[0167] Understandable. Figure 3 The analytical models in this system are actually associated with nodes in the knowledge graph, rather than the underlying table data. Through multi-layered mapping relationships, the analytical models can be decoupled from the underlying table data. Changes in the underlying table data will not affect the configuration of the analytical models, making the creation of analytical models more flexible and the system architecture highly scalable. Analysts can flexibly set up analytical models according to business needs. The system can even recommend the creation of analytical models that can further process the analysis results, guiding users to further mine and explore the data, and improving the user experience. It needs to be explained that, Figure 3 In the example shown, it is assumed that the label of the "Net Sales Revenue This Year" node has the same semantics as its associated metadata "ydt", so a semantic mapping relationship is established between the two. In some other embodiments, the semantics of a node may be the name of an indicator, and the metadata involved in the calculation of that indicator is linked to the node. For example, if Figure 3In the scenario shown, if the storage system 300 does not have a table that directly calculates the net sales revenue for the year, then the metadata with the semantic meaning of "total sales revenue for the year" and the metadata with the semantic meaning of "total sales cost for the year" can be semantically mapped to the "net sales revenue for the year" node based on the formula: net sales revenue for the year = total sales revenue for the year - total sales cost for the year. This will not be explained further here.
[0168] It needs to be explained that, Figure 3 In the example shown, metadata in the metadata layer is illustrated using fields. As mentioned earlier, metadata can also include database names, table names, field values, etc. Furthermore, there are hierarchical relationships between metadata. Based on these relationships, a metadata graph can be created, where each node represents a piece of metadata, and the edges between nodes represent the hierarchical relationships between metadata. Figure 3 This is just one example, and this application does not limit it.
[0169] To better understand the configuration methods described in S210~S250 above, the following will be combined with... Figures 4-6 Further explanation is needed. Specifically, Figures 4-6 These are some exemplary interfaces provided in this application, wherein, Figure 4 The interface shown is used by analysts to configure the labels of indicator nodes. Analysts can configure information such as the name and formula of the indicator through this interface. Figure 5 This is another exemplary interface in the data analysis method provided in this application, which is used for the analysis user to configure semantic mapping relationships. Figure 6 Another exemplary interface provided in this application for the data analysis method is used to allow the analysis user to configure model mapping relationships. The following describes... Figures 4-6 Provide an explanation.
[0170] Figure 4 This is an exemplary interface from a data analysis method provided in this application. This interface is primarily used to configure the labels of nodes for indicator / dimension names, which are the nodes in the semantic indicator / dimension layer shown in Table 1, such as indicator nodes and dimension nodes. Specifically, Figure 4 The interface shown is for configuration Figure 3 The "Net Sales Revenue for the Year" node shown is used as an example for illustration.
[0171] like Figure 4 As shown, 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, a related indicator selection area 450, and a save control 460. The following sections will describe each area and control in the interface.
[0172] The indicator name input area 410 is used to input the indicator name, which can serve as the label for the node. Specifically, it can be one of the attributes contained in the label, such as... Figure 4 The metric set is "net sales revenue".
[0173] The indicator formula input area 420 is used to input the calculation formula of the indicator formula, which is the natural language expression of the indicator formula.
[0174] The expression input area 430 is used to input the expression of the indicator formula. This expression is the expression of the processing logic of the indicator formula. The analysis user can choose to call functions and input fields 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 input 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.
[0175] The statistical period selection area 440 is used to input the time dimension of the indicator, which includes annual net sales revenue and monthly net sales revenue. The generated indicators can include net sales revenue for the current year and last year, net sales revenue for this month and net sales revenue for last month, etc. This application does not make specific limitations.
[0176] The associated metric selection area 450 is used to input the associated metric type. This type can be used as some attributes of the label, such as derived metrics. For details, please refer to the description of metric nodes in Table 1. The attributes of metric nodes can include atomic metrics, derived metrics, scenarios, scenario values, time periods, etc.
[0177] The 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. The node's label is the indicator name entered in the indicator name input area 410, such as "net sales revenue". Then, based on the indicator formula input area 420 and the indicator formula described in the expression input area 430, the system determines the metadata involved in the calculation of the indicator and establishes a semantic mapping relationship between the metadata and the node.
[0178] It needs to be explained that, Figure 4 The interface shown illustrates a scenario where indicator node labels are manually configured. Users can also import indicator data, such as by configuring an indicator management platform interface. By connecting to the indicator management platform, they can obtain information such as indicator names and formulas for multiple indicators. The data analysis system 200 can then generate node labels based on the indicator names and establish a semantic mapping relationship between metadata and nodes based on the indicator formulas. Figure 4 After configuring the metric name, you can... Figure 5 The interface shown completes the semantic mapping relationship between metadata and nodes.
[0179] Figure 5 This is another exemplary interface for a data analysis method provided in this application. This interface allows the analysis user to configure the mapping relationship between metadata and semantics. This 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... Figure 5 This is one example of configuring a physical field node. Other node types shown in Table 1 can also be configured according to... Figure 5 The configuration is done through a similar interface shown, which will not be repeated here.
[0180] like Figure 5 As shown, 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.
[0181] The metadata selection area 510 is used to display the metadata that needs to be configured, with each metadata element corresponding to a connection control. Figure 5 Each metadata element has a circular control to its right. A semantic mapping relationship between metadata and nodes is established by connecting the metadata's connection control with the semantic connection control displayed in the semantic configuration area 520 on the right. It should be noted that... Figure 5 The example provided uses metadata as the field name, so... Figure 5 The metadata displayed in area 510 of the metadata selection section consists entirely of field names. As mentioned earlier, metadata can also include table names, database names, metric names, etc. Other types of metadata can be selected through... Figure 5 The interface shown is used for configuration; examples will not be provided here.
[0182] The semantic configuration area 520 is used to display the node's label, or the semantics of its metadata. Each semantic element corresponds to a connection control. Figure 5 Each semantic element has a circular control on its left. 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.
[0183] Table display area 530 is used to display tables with configured semantics, whose headers include the original fields and the semantics configured by the user.
[0184] The table selection control 540 is used for users to select tables for configuration. After the user selects the table to be configured, the fields in the table can be displayed in the metadata selection area 510.
[0185] It should be noted that the analysis of users through Figure 4The interface shown creates new metrics "Net Sales Revenue This Year" and "Net Sales Revenue Last Year". Once created, Figure 5 The semantic configuration area 520 shown can display the created metric "Net Sales Revenue". Users can establish a semantic mapping relationship between the two by connecting the metadata "dt" on the left with "Net Sales Revenue".
[0186] For example, Figure 5 by Figure 3 Taking the application scenario shown as an example, Figure 3 In Table XXX3, the field `target` has a semantic mapping relationship with the target threshold node, and the field `trail` has a semantic mapping relationship with the subsidiary A node. Similarly, Figure 3 Other nodes in the displayed knowledge graph can also be followed... Figure 5 The interface shown is used for configuration; examples will not be provided here.
[0187] It should be noted that the metadata selection area 510 and the semantic configuration area 520 can also display some metadata and semantics that have already established semantic mapping relationships. Analysts can modify the mapping relationship between metadata and semantics through the connection control. For example, if the system automatically establishes a semantic mapping relationship by performing semantic recognition on the metadata, and the analyst feels that this semantic is not accurate enough, then a custom semantic can be added through the semantic insertion control, and then the custom semantic can be connected to the metadata.
[0188] 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 without actual semantic meaning, so... Figure 5 The interface shown analyzes user input custom semantics and then connects metadata with that custom semantics.
[0189] Figure 6 This is an example diagram of another configuration node interface provided in this application. This interface is used by the analysis user to configure the analysis model and the model mapping relationship between the analysis model and the node. Specifically... Figure 6 The interface shown is for configuration Figure 3 The analysis model shown is used as an example for illustration.
[0190] like Figure 6 As shown, 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.
[0191] The data model selection area 610 allows users to select nodes from the knowledge graph for arrangement. Nodes participating in the arrangement can establish a model mapping relationship with the analysis model. Users can create analysis models by dragging and dropping nodes from the knowledge graph into the model arrangement area 620.
[0192] The model orchestration area 620 is used by analysis users to orchestrate analysis models. Analysis users can drag and drop nodes from the data model selection area 610 and select connection tools or parameter setting tools from the toolbar 640 to configure the analysis logic of the analysis model. For example, Figure 3 The analytical model can be established in the manner described above. Figure 6 The interface shown is implemented.
[0193] The modeling standard selection area 630 is used to provide analysis users with modeling standards for different business needs. Analysis users can select modeling standards to create analysis models according to their own business needs. It should be understood that modeling standards can reduce model errors and improve modeling efficiency.
[0194] Toolbar 640 is used to provide analysis users with various modeling tools, such as connection tools for connecting various parameters, and saving tools for saving analysis models, etc. This application does not limit the tools in the toolbar.
[0195] It should be understood that, through Figure 6 As shown in the interface, users can flexibly configure analysis models through a visual interface and by dragging and dropping elements. They can also flexibly establish model mapping relationships between analysis models and nodes. The configured analysis model can automatically obtain the data required by the analysis model through model mapping relationships, semantic mapping relationships, and physical mapping relationships. Then, it analyzes the data according to the analysis logic configured by the user, obtaining analysis results. These results can be stored in storage system 300. Data analysis system 200 can generate metadata based on the table data of the analysis results, establish physical mapping relationships, and then create nodes in the knowledge graph based on this metadata, establishing semantic mapping relationships. If a user needs to query the analysis results, due to the existence of the knowledge graph, the user can directly input natural language to perform the query.
[0196] The above text passed Figures 2-6 This paper details the steps and flow of the configuration method in the data analysis method provided in this application. The following section, in conjunction with... Figures 7-8 The steps and procedures of the search method provided in this application are explained.
[0197] Figure 7 This is a flowchart illustrating the configuration steps of a data analysis method provided in this application, as shown below. Figure 7 As shown, the method includes the following steps: S710: Client 100 sends a data query request to data analysis system 200. This step can be performed by... Figure 1 The extraction unit 233 in the embodiment is implemented.
[0198] In practice, data query requests include query text, which is natural language text. For example, natural language query text could be: "I want this year's sales report," "Please give me the sales data for all products in the fourth quarter of last year," "How many interns are there in Department S," and so on. It should be understood that traditional query statements are usually programming-like, such as SQL. Natural language query text is closer to everyday human language than SQL, allowing non-technical users to easily perform data queries and reducing their learning curve. Traditional query statements not only require learning the structure of the query language but also memorizing the names of various tables. For example, the name of the balance sheet might be a string, which users would need to input when using SQL. Using the method in this application, users can simply input: "I need the balance sheet." Users can directly input the terms to obtain the corresponding query results, resulting in higher efficiency.
[0199] It should be noted that the query text in the data query request can be the text directly entered by the querying user, or it can be the text generated by speech recognition technology after the querying user enters voice. This application does not make any specific limitations.
[0200] S720: Data analysis system 200 determines the keywords corresponding to the query text. This step can be performed by... Figure 1 The extraction unit 233 in the embodiment is implemented.
[0201] 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 keywords from the multiple word segments, where the keywords are word segments related to the data query. Specifically, word segmentation methods can include statistical word segmentation, dictionary-based word segmentation, machine learning word segmentation, etc. After obtaining multiple word segments, keywords can be filtered from them using various filtering methods such as stop word-based filtering, part-of-speech-based filtering, word frequency-based filtering, and TF-IDF filtering. Descriptions of these multiple word segmentation methods and filtering methods can be found in [reference needed]. Figure 1 The relevant descriptions in the embodiments will not be repeated here.
[0202] S730: The data analysis system 200 matches keywords with the graph to determine the target node and the corresponding target metadata. This step can be performed by... Figure 1 The map query unit 224 in the embodiment is implemented.
[0203] 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 then return a prompt message to the client 100 based on the matching results. This prompt message encourages the query user to input more detailed query text. Based on the more detailed query text input by the query user, the target node is further confirmed, and thus the target metadata is determined. Specifically, the data analysis system 200 can pre-set various script templates. Based on the multiple nodes matched by the keywords corresponding to the query text previously entered by the query user, the system determines the script to be sent to the query user next time. Then, based on the query text returned by the query user next time, new keywords are determined, and so on. Through continuous communication with the query user, the system ultimately determines the target node corresponding to the target data requested by the query user and obtains the metadata of that target node.
[0204] 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 user may correspond to multiple target metadata. For example, if the user requests to query 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 "balance sheet". The above example is for illustration and is not specifically limited in this application.
[0205] It should be understood that traditional data queries can only obtain the actual semantics of the query text through natural language processing first, and then retrieve the database based on the semantics, providing feedback messages based on the search results. This process of natural language processing followed by retrieval results in a slow system response, especially for large and complex databases. This application uses knowledge graph matching to obtain nodes that match the keywords, and sends feedback messages to the query user based on the metadata corresponding to the nodes. Due to the existence of the knowledge graph, the system response is much faster, improving the user experience.
[0206] S740: Data analysis system 200 acquires target data based on target metadata. This step can be performed by... Figure 1 The table query unit 214 in the embodiment is implemented.
[0207] In its implementation, the data analysis system 200 can retrieve target data from 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 contain multiple fields, and the querying user may only want to see 2-3 fields, or want to see field 1 from table A and field 2 from table B. After establishing a semantic mapping relationship between the metadata of each field and semantic nodes, when the querying user performs a data query, they only need to enter the fields contained in the table they want to see. The system can automatically generate the table required by the querying user through semantic node matching, making the query method more flexible.
[0208] S750: Data analysis system 200 sends target data to client 100. This step can be performed by... Figure 1 The table query unit 214 in the embodiment is implemented.
[0209] It should be understood that the field of data analysis is characterized by large data scale, rapid data change, and wide data range. If data is queried using traditional retrieval methods, the query efficiency is limited by the data scale. This application realizes data query based on knowledge graph. The nodes in the knowledge graph are configured with semantic tags, and each node also establishes a mapping relationship with metadata, which makes data query a simple node matching. It can not only realize natural language query, but also has a faster query efficiency and improves the user experience.
[0210] To make this application better understood, the following is combined with Figure 8 The above S710~S750 are explained.
[0211] Figure 8 This application provides an exemplary interface for data querying, which may include a question input area 810, a system response area 820, and a historical question display area 830.
[0212] The question input area 810 is used for users to input query text, which is natural language text.
[0213] The system response area 820 is used to display the query results of the query text to the querying user.
[0214] The historical issues display area 830 is used to display historical issues to querying users.
[0215] exist Figure 8 In the example shown, the user's first query text was: "I want to see the analysis results of the analysis model," combined with... Figures 3-6As shown in the example, after the analysis model is configured, the generated analysis results are stored as new table data in storage system 300. Data analysis system 200 can generate metadata for the analysis results, establish a physical mapping relationship between physical metadata and analysis results, and then create nodes corresponding to this metadata in the knowledge graph, establishing a semantic mapping relationship between nodes and metadata. The node label can be "analysis result". Thus, the query can be entered by the user. Figure 8 After receiving the query text shown, the data analysis system 200 can execute steps S710-S750 above. First, it extracts the keyword "analysis result" from the query text. Then, it matches the keyword with the labels of nodes in the knowledge graph to determine the target node corresponding to the keyword "analysis result." Next, it reads the target data based on the target node's metadata. The data analysis system 200 can then combine this with a script template to generate... Figure 8 The returned message is: "Okay, here is the link to the analysis results."
[0216] Furthermore, the second query text entered by the user was: "Give me a table of net sales revenue," combined with... Figure 3 As shown in the knowledge graph, there are nodes for last year's net sales revenue and this year's net sales revenue. Therefore, after receiving the query text, the data analysis system 200 can execute steps S710-S730 to determine that there are two nodes matching the query text, namely the aforementioned nodes for last year's net sales revenue and this year's net sales revenue. At this point, the data analysis system can combine the script template to generate a message such as... Figure 8 The prompt message is: "Okay, which year's net sales revenue would you like to see?" The user can enter supplementary text: "Last year's." The data analysis system combines the analysis of the user's supplementary text to determine the target node "Last year's net sales revenue" that matches the user's second query text. Based on the metadata corresponding to this target node, the system retrieves the target data and returns it in accordance with the prompt message. Figure 8 The script shown is: "Okay, here is the link to last year's net sales revenue table."
[0217] Understandably, this application is approved. Figure 8 The interface shown enables data querying. Users can obtain query results simply by entering natural language. Users do not need to learn about databases or the names of various tables, which reduces the learning cost, improves query efficiency, and enhances the user experience.
[0218] In summary, the data analysis method provided in this application establishes a physical mapping relationship between metadata and the underlying physical table data, a semantic mapping relationship between nodes and metadata (where the semantics of node tags are related to metadata), and a model mapping relationship between the analysis model and nodes. This multi-layered mapping allows the analysis model to be decoupled from the underlying table data, ensuring that changes in the underlying data do not affect the analysis model. The analysis model possesses strong flexibility and adaptability, eliminating the need for users to adjust it and improving the user experience. Furthermore, because nodes in the knowledge graph contain semantic tags, users can query data using natural language. The data analysis system can match keywords in the user's query text with the semantic tags of nodes to determine the first node corresponding to the keywords. This transforms the data query process from retrieval to matching, resulting in higher query efficiency. Moreover, users do not need to learn database query instructions; they can query data simply by inputting natural language, reducing the learning cost and improving the user experience.
[0219] The data analysis system and data analysis methods provided in this application have been described in detail above. The following section will combine... Figure 9 The computing device provided in this application will be explained.
[0220] Figure 9 This is a schematic diagram of the structure of a computing device 900 provided in this application. The computing device 900 can be the data analysis system described above. Further, 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 also via wireless transmission or other means.
[0221] Processor 901 comprises multiple general-purpose processors, such as a CPU. The aforementioned hardware chip is an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD can be 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. Processor 901 executes various types of digital memory instructions, such as software or firmware programs stored in memory unit 902, enabling computing device 900 to provide a wide range of services.
[0222] In a specific implementation, as one embodiment, the processor 901 includes one or more CPUs, for example... Figure 9 CPU0 and CPU1 are shown in the diagram.
[0223] In a specific implementation, as one example, the computing device 900 also includes multiple processors, for example... Figure 9 The processors 901 and 906 are shown. Each of these processors can be a single-core processor (CPU) or a multi-core processor (CPU). Here, a processor refers to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).
[0224] Storage unit 902 is used to store program code, and its execution is controlled by processor 901 to perform the above-mentioned tasks. Figures 1-8 The data analysis processing steps in any embodiment. The program code includes one or more software units. The aforementioned one or more software units are... Figure 1 The embodiment includes a metadata configuration unit, a node configuration unit, a model configuration unit, a generation unit, a mapping unit, an extraction unit, a graph query unit, and a table query unit. The metadata configuration unit is used to create metadata based on the user's metadata configuration request and establish a physical mapping relationship between metadata and table data. Specifically, it can be used to implement... Figure 2 S210, S220 and their optional steps in the embodiment; the mapping unit is used to generate metadata based on the table structure information of the table data, and establish a semantic mapping relationship between the metadata and the table data, which can be specifically used to implement Figure 2 S250 and its optional steps in the embodiment; the node configuration unit is used to create nodes according to the user's node configuration request, configure the node's tags, and establish a semantic mapping relationship between nodes and metadata, specifically for implementing Figure 2 S210 and S230 are optional machine steps in the embodiment; the generation unit is used to generate node tags based on the semantics of metadata, indicator data, and entity data, and establish a semantic mapping relationship between nodes and metadata, specifically for implementing... Figure 2 S250 and its optional steps in the embodiment; the model configuration unit is used to create an analysis model according to the user's model configuration request, and establish a model mapping relationship between the analysis model and nodes, specifically for implementing Figure 2 The embodiments include steps S210-S220 and their optional steps; the extraction unit is used to receive the query request input by the user and extract keywords from the query text in the query request, specifically for implementing... Figure 7 In the embodiments, steps S710 and S720 and their optional steps, the graph query unit is used to match keywords with the knowledge graph to determine the target node and the target metadata corresponding to the target node, specifically for implementing... Figure 7 S730 and its optional steps in the embodiment; the table query unit is used to obtain target data based on target metadata and return the target data to the user, specifically for implementing Figure 7 S740, S750 and their optional steps in the embodiments.
[0225] Storage unit 902 includes read-only memory and random access memory, and provides instructions and data to processor 901. Storage unit 902 also includes non-volatile random access memory. Storage unit 902 is volatile memory or non-volatile memory, or a combination of both. The non-volatile memory is read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory is random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are used, such as static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDR SDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (SLDRAM), and direct rambus RAM (DR RAM). Other examples include hard disks, USB flash drives, flash memory, SD cards, Memory Sticks, etc., where hard disks include hard disk drives (HDDs), solid-state drives (SSDs), and mechanical hard disks (HDDs), etc., which are not specifically limited in this application.
[0226] Storage medium 903 is a carrier for storing data, such as hard disk, USB flash drive, flash memory, SD card, memory stick, etc. The hard disk can be a hard disk drive (HDD), solid state disk (SSD), mechanical hard disk (HDD), etc. This application does not make specific limitations.
[0227] The communication interface 904 is a wired interface (e.g., an Ethernet interface), an internal interface (e.g., a Peripheral Component Interconnect express (PCIe) bus interface), a wired interface (e.g., an Ethernet interface), or a wireless interface (e.g., a cellular network interface or a wireless LAN interface) for communicating with other servers or units.
[0228] The 905 bus is a Peripheral Component Interconnect Express (PCIe) bus, or an Extended Industry Standard Architecture (EISA) bus, a unified bus (Ubus or UB), a compute express link (CXL) bus, a cache coherent interconnect for accelerators (CCIX) bus, etc. The 905 bus is divided into address bus, data bus, and control bus.
[0229] In addition to the data bus, bus 905 also includes the power bus, control bus, and status signal bus. However, for clarity, all buses are labeled as bus 905 in the diagram.
[0230] It needs to be explained that, Figure 9 This is merely one possible implementation of an embodiment of this application. In practical applications, the computing device 900 may include more or fewer components, and this is not a limitation. For content not shown or described in the embodiments of this application, please refer to the foregoing. Figures 1-6 The relevant descriptions in the embodiments will not be repeated here.
[0231] This application embodiment also provides a computing device cluster, which can be the data analysis system described above. The computing device cluster includes at least one computing device 900. The storage units 902 of one or more computing devices 900 in the computing device cluster may store the same or different instructions for executing data analysis methods.
[0232] This application also provides a computer program product containing instructions. The computer program product may be a software or program product containing instructions, capable of running on a computing device or stored on any usable medium. When the computer program product is run on at least one computing device, it causes the at least one computing device to perform a data analysis method.
[0233] This application also provides a computer-readable storage medium. The computer-readable storage medium can be any available medium that a computing device can store, or a data storage device such as a data center containing one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., 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 perform a data analysis method.
[0234] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. A computer program product includes a plurality of computer instructions. When the computer program instructions are loaded or executed on a computer, all or part of the flow or function according to the embodiments of this application is generated. 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.
[0235] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A data analysis method, characterized in that, The method is applied to a data analysis system, and the method includes: Obtain the keywords of the query text, which is the text input by the first user; The query results of the query text are obtained based on the keywords, semantic mapping relationship and physical mapping relationship. The query results include data in a first table. The semantic mapping relationship and the physical mapping relationship are stored in the data analysis system. The semantic mapping relationship is used to indicate the correspondence between the semantics of the node tags in the knowledge graph and the metadata. The physical mapping relationship is used to indicate the mapping relationship between the metadata and the table data. Send the data from the first table to the first user.
2. The method according to claim 1, characterized in that, The data analysis system includes a metadata layer and a semantic layer. The metadata layer is used to store the 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 the semantic mapping relationship between the 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.
3. The method according to claim 1 or 2, characterized in that, The process of obtaining query results based on the keywords, semantic mapping relationships, and physical mapping relationships includes: Based on the keywords associated with the query text, the tags of multiple nodes in the knowledge graph are matched to determine the first node; Determine the first metadata associated with the first node based on the semantic mapping relationship; The first table data associated with the first metadata is determined based on the physical mapping relationship.
4. The method according to any one of claims 1 to 3, characterized in that, The data analysis system further includes a model layer, which stores the analysis model and the model mapping relationship between the analysis model and the first node. The analysis model is used to obtain the data of the first table through the model mapping relationship, the semantic mapping relationship, and the physical mapping relationship, and to complete the data analysis based on the data of the first table.
5. The method according to claim 4, characterized in that, The method further includes: Receive a data analysis request sent by a second user, the data analysis request including information about the analysis model; Obtain the analysis model; Based on the model mapping relationship in the model layer, the first node of the analysis model mapping is determined; Based on the semantic mapping relationship in the semantic layer, determine the first metadata mapped by the first node; Based on the physical mapping relationship in the metadata layer, determine the first table data of the first metadata mapping; The data in the first table is input into the analysis model to obtain the data in the second table, and the data in the second table is stored.
6. The method according to claim 5, characterized in that, After storing the data in the second table, the method further includes: Based on the storage address and table structure information of the second table data, second metadata is generated, and a physical mapping relationship between the second metadata and the second table data is established in the metadata layer.
7. The method according to claim 6, characterized in that, The method further includes: A second node is created in the knowledge graph of the semantic layer. The semantic information of the second metadata is determined based on the semantic recognition model. The label of the second node is generated according to the semantic information. A semantic mapping relationship between the second node and the second metadata is established in the semantic layer.
8. The method according to claim 6, characterized in that, The method further includes: 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. The node configuration request includes the label of the second node and the semantic mapping relationship between the second node and the second metadata.
9. The method according to any one of claims 5 to 7, characterized in that, Before receiving the data analysis request sent by the second user, the method further includes: Obtain the model configuration request sent by the second user. The model configuration request includes the model data of the analysis model requested 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 tags of the nodes in the knowledge graph. Create the analysis model and establish a model mapping relationship between the analysis model and the first node.
10. The method according to any one of claims 1 to 9, characterized in that, The semantics of the label of the first node related to the first metadata include: The semantics of the tag of the first node are the same as the table structure information in the first metadata, and the table structure information includes one or more of the following: fields, table name, and database name.
11. The method according to any one of claims 1 to 10, 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 are the names of indicators or dimensions, and the data in the first table corresponding to the first metadata participates in the calculation of the indicator or dimension.
12. The method according to any one of claims 1 to 11, characterized in that, The semantics of the label of the first node related to the first metadata include: The semantics of the tag of the first node is the name of the entity, which is an object that exists in the physical world. The first metadata has an entity association relationship with the entity, which includes one or more of the following: dependency relationship, cooperation relationship, subordinate relationship, purchase relationship, location relationship, and upstream and downstream relationship.
13. A data analysis system, characterized in that, The data analysis system includes a graph query unit and a table query unit, wherein... The graph query unit is used to obtain keywords in the query text, which is the text input by the first user. The table query unit is used to obtain query results of the query text based on the keywords, semantic mapping relationship, and physical mapping relationship. The query results include first table data. The semantic mapping relationship and the physical mapping relationship are stored in the data analysis system. The semantic mapping relationship is used to indicate the correspondence between the semantics of the node tags in the knowledge graph and the metadata. The physical mapping relationship is used to indicate the mapping relationship between the metadata and the table data. The first table data is sent to the first user.
14. The system according to claim 13, characterized in that, The data analysis system includes a metadata layer and a semantic layer. The metadata layer is used to store the 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 the semantic mapping relationship between the 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.
15. The system according to claim 13 or 14, characterized in that, The graph query unit is used to match the tags of multiple nodes in the knowledge graph based on the keywords associated with the query text, and determine the first node; The graph query unit is used to determine the first metadata associated with the first node based on the semantic mapping relationship; The table query unit is used to determine the first table data associated with the first metadata based on the physical mapping relationship.
16. The system according to any one of claims 13 to 15, characterized in that, The data analysis system further includes a model layer, which stores the analysis model and the model mapping relationship between the analysis model and the first node. The analysis model is used to obtain the data of the first table through the model mapping relationship, the semantic mapping relationship, and the physical mapping relationship, and to complete the data analysis based on the data of the first table.
17. The system according to claim 16, characterized in that, The system includes an extraction unit. The extraction unit is used to receive a data analysis request sent by a second user, the data analysis request including information about the analysis model; The extraction unit is used to acquire the analysis model; The graph query unit is used to determine the first node of the analysis model mapping based on the model mapping relationship in the model layer; The graph query unit is used to determine the first metadata mapped by the first node based on the semantic mapping relationship in the semantic layer; The table query unit is used to determine the first table data of the first metadata mapping based on the physical mapping relationship in the metadata layer; The table query unit is used to input the data from the first table into the analysis model to obtain the data from the second table, and to store the data from the second table.
18. The system according to claim 17, characterized in that, The system includes a mapping unit. The mapping unit is used to generate second metadata based on the storage address and table structure information of the second table data, and to establish a physical mapping relationship between the second metadata and the second table data in the metadata layer.
19. The system according to claim 18, characterized in that, The system includes a generation unit. The generation unit is used to create a second node in the knowledge graph of the semantic layer, determine the semantic information of the second metadata based on the semantic recognition model, generate a label for the second node according to the semantic information, and establish a semantic mapping relationship between the second node and the second metadata in the semantic layer.
20. The system according to claim 18, characterized in that, The system includes a node configuration unit. The node configuration unit is used to 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. The node configuration request includes the label of the second node and the semantic mapping relationship between the second node and the second metadata.
21. The system according to any one of claims 17 to 19, characterized in that, The system includes a model configuration unit. The model configuration unit is used to obtain the model configuration request sent by the second user. The model configuration request includes 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 tags of the nodes 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.
22. The system according to any one of claims 1 to 21, characterized in that, The semantics of the label of the first node related to the first metadata include: The semantics of the tag of the first node are the same as the table structure information in the first metadata, and the table structure information includes one or more of the following: fields, table name, and database name.
23. The system according to any one of claims 1 to 22, 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 are the names of indicators or dimensions, and the data in the first table corresponding to the first metadata participates in the calculation of the indicator or dimension.
24. The system according to any one of claims 1 to 23, characterized in that, The semantics of the label of the first node related to the first metadata include: The semantics of the tag of the first node is the name of the entity, which is an object that exists in the physical world. The first metadata has an entity association relationship with the entity, which includes one or more of the following: dependency relationship, cooperation relationship, subordinate relationship, purchase relationship, location relationship, and upstream and downstream relationship.
25. A computer device, characterized in that, The computing device includes a processor and a memory, the memory being used to store instructions and the processor being used to execute the instructions such that the computing device implements the method as claimed in any one of claims 1 to 12.
26. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores instructions that, when executed by a computing device or a cluster of computing devices, implement the method as claimed in any one of claims 1 to 12.