Enterprise indicator tree construction method, device, equipment and medium

By obtaining metadata tables from the configuration database, building a collection of relational words and word, generating a basic fact wide table, and automatically naming indicators, the problem of unclear indicator construction of insurance companies is solved, and the development efficiency and data processing accuracy is improved. Supports data-based operations.

CN114510489BActive Publication Date: 2024-11-05CHINA PING AN LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210176747.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-25
Publication Date
2024-11-05
Estimated Expiration
2042-02-25

AI Technical Summary

Technical Problem

In the existing technology, when insurance companies build data indicator systems, development efficiency is low, indicator classification is unclear, and technical method guidance is lacking, resulting in unclear business indicator construction.

Method used

By obtaining metadata tables from the configuration database, extracting relational words to construct a collection of relational words, traversing relational tables to obtain foreign key IDs, constructing a collection of subject words and object words, generating a basic fact wide table, generating a tree node based on measurement statements, and using naming The template automatically naming indicators to realize the automatic construction of the indicator tree.

Benefits of technology

It improves the efficiency and accuracy of data processing, reduces human participation, and the generated indicator trees are clearer and more accurate, supports data-based operations, and improves corporate operating efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114510489B_ABST
    Figure CN114510489B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of data processing, and provides a method, device, equipment and medium for constructing an enterprise indicator tree, which can extract the subject words and object words in the relationship table, prepare for the association of subsequent data, and integrate the attribute data of each object into the relationship table to form a basic fact wide table, so that the data in the table is more comprehensive, and then the indicator tree generated subsequently is more accurate, and the tree node is generated based on the traceability method, and the name of the indicator is automatically generated, reducing human participation, and the indicator tree of the target business is generated based on the name of the indicator under each tree node and the relationship table, and then according to the attribute field and the measurement logic, the owner label of the indicator is automatically derived, and the automatic construction of the indicator tree is realized, without human participation, and the efficiency and accuracy of data processing are improved. The present invention also relates to blockchain technology, and the indicator tree can be stored on the blockchain node.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, equipment and medium for constructing an enterprise indicator tree. Background Art

[0002] With the continuous development of data management technology, more and more insurance companies are undergoing digital transformation, conducting data modeling and analysis on their businesses, and realizing data-driven operations to improve business efficiency. Among them, building a data indicator system is the core link of data-driven operations.

[0003] For example, in sales areas such as insurance companies, it is necessary to build a data indicator system to support insurance sales business.

[0004] However, in the prior art, the commonly used approach is for technical developers to analyze requirements and design SQL (Structured Query Language) codes based on experience to perform data statistics to obtain indicators, and then manually name and classify them. Since developers lack technical method guidance in the process of indicator design and development, it is easy to cause problems such as low development efficiency and unclear indicator classification. Summary of the invention

[0005] The embodiments of the present invention provide a method, device, equipment and medium for constructing an enterprise indicator tree, aiming to solve the problem of unclear construction of business indicators.

[0006] In a first aspect, an embodiment of the present invention provides a method for constructing an enterprise indicator tree, which includes:

[0007] In response to an instruction to construct an indicator tree for a target business, a metadata table of the target business is obtained from a configuration database as a relationship table, and relationship words are extracted from the relationship table to construct a relationship word set;

[0008] For each relation word in the relation word set, traverse the relation table to obtain the foreign key ID of each relation word, and construct the subject word set and the object word set of each relation word according to the foreign key ID of each relation word;

[0009] By using the foreign key ID of each relation word, the relation table, the subject word set and each object in the object word set are associated to obtain a basic fact wide table;

[0010] Obtaining a non-foreign key ID of each relational word and a pre-configured constraint word set, selecting constraint words from the constraint word set to construct a modifier word set, and generating a filter statement according to the modifier word set and the non-foreign key ID, wherein the owner label of each modifier word in the modifier word set is configured according to the corresponding relational word;

[0011] arbitrarily selecting at least one object from the basic fact wide table as a target dimension, and generating a grouping statement based on the target dimension;

[0012] Measuring each object in the basic fact wide table based on the measurement statement, and generating at least one tree node based on the measurement result of the measurement statement;

[0013] Concatenate the filtering statement, the grouping statement, and the measurement statement to obtain a target statement;

[0014] Using the target statement to traverse the data in the configuration database, obtaining the index under each tree node;

[0015] Obtain a pre-configured naming template, and use the indicator under each tree node to match the naming template to generate the name of the indicator under each tree node;

[0016] An indicator tree of the target business is generated based on the name of the indicator under each tree node and the relationship table.

[0017] According to a preferred embodiment of the present invention, constructing a subject word set and an object word set of each relation word according to the foreign key ID of each relation word includes:

[0018] Obtain the attribute field corresponding to the foreign key ID of each relational word from the relational table;

[0019] Extract the field name of the attribute field corresponding to the foreign key ID of each relational word;

[0020] When the field name corresponds to a user, the attribute field corresponding to the field name is added as a subject word to the subject word set, and the owner tag of each subject word in the subject word set is configured as the corresponding field name; or

[0021] When the field name corresponds to a non-user, the attribute field corresponding to the field name is added to the object word set as an object word, and the owner tag of each object word in the object word set is configured as the corresponding field name.

[0022] According to a preferred embodiment of the present invention, associating the relationship table, the subject word set and each object in the object word set through the foreign key ID of each relationship word to obtain the basic fact wide table includes:

[0023] Acquire a data table of each subject word in the subject word set and acquire a data table of each object word in the object word set from the configuration database;

[0024] Build a join statement based on the foreign key ID of each relational term;

[0025] The relation table is associated with the data table of each subject word and the data table of each object word by using the relational statement to obtain the basic fact wide table.

[0026] According to a preferred embodiment of the present invention, measuring each object in the basic fact wide table based on the measurement statement, and generating at least one tree node based on the measurement result of the measurement statement includes:

[0027] A COUNT statement is used to measure each object in the basic fact wide table to obtain the number of each object as a first basic indicator, and an owner label of each object is obtained as a tree node corresponding to the first basic indicator;

[0028] The SUM statement is used to measure the numerical objects corresponding to the non-foreign key IDs in the basic fact wide table, and the sum of each numerical object is obtained as the second basic indicator, and the owner label of each numerical object is obtained as the tree node corresponding to the second basic indicator;

[0029] The COUNT statement and the SUM statement are used to compound each object in the basic fact wide table to obtain a composite object, and the composite object is compared and measured to obtain the ratio of the composite object as a composite indicator, and the tree node corresponding to the numerator of the ratio of the composite object is obtained as the tree node of the composite indicator.

[0030] According to a preferred embodiment of the present invention, the use of the indicator under each tree node to match the naming template to generate the name of the indicator under each tree node includes:

[0031] Obtain the target dimension, the constraint word, the table name of the relationship table, and the measurement name corresponding to the measurement result from the indicators under each tree node;

[0032] The target dimension, the constraint word, the table name of the relationship table, and the measurement name corresponding to the measurement result are sequentially concatenated to obtain the name of the indicator under each tree node.

[0033] According to a preferred embodiment of the present invention, generating the indicator tree of the target business based on the name of the indicator under each tree node and the relationship table includes:

[0034] Obtaining the table name of the relationship table, and establishing a root node according to the table name of the relationship table;

[0035] Connect each tree node using the root node as a starting point to obtain a topic layer;

[0036] The subject layer is expanded according to the name of the indicator under each tree node to obtain the indicator tree of the target business.

[0037] According to a preferred embodiment of the present invention, after generating the indicator tree of the target business based on the name of the indicator under each tree node and the relationship table, the method further includes:

[0038] Generate a query statement according to the indicators in the indicator tree;

[0039] Acquire data in the configuration database based on the query statement;

[0040] Send the acquired data to the specified terminal device.

[0041] In a second aspect, an embodiment of the present invention provides a device for constructing an enterprise indicator tree, which includes:

[0042] A construction unit, configured to, in response to an indicator tree construction instruction for a target business, obtain a metadata table of the target business from a configuration database as a relationship table, and extract relationship words from the relationship table to construct a relationship word set;

[0043] The construction unit is further used to traverse the relationship table for each relationship word in the relationship word set, obtain the foreign key ID of each relationship word, and construct the subject word set and the object word set of each relationship word according to the foreign key ID of each relationship word;

[0044] an associating unit, configured to associate each object in the relationship table, the subject word set and the object word set through a foreign key ID of each relationship word to obtain a basic fact wide table;

[0045] a generating unit, configured to obtain a non-foreign key ID of each relational word and a pre-configured constraint word set, select constraint words from the constraint word set to construct a modifier word set, and generate a filtering statement according to the modifier word set and the non-foreign key ID, wherein the owner label of each modifier word in the modifier word set is configured according to the corresponding relational word;

[0046] The generating unit is further configured to arbitrarily select at least one object from the basic fact wide table as a target dimension, and generate a grouping statement based on the target dimension;

[0047] The generating unit is further configured to measure each object in the basic fact wide table based on the measurement statement, and generate at least one tree node based on the measurement result of the measurement statement;

[0048] A concatenation unit, used for concatenating the filtering statement, the grouping statement and the measurement statement to obtain a target statement;

[0049] A traversal unit, used to traverse the data in the configuration database using the target statement to obtain an indicator under each tree node;

[0050] The generating unit is further used to obtain a pre-configured naming template, and use the indicator under each tree node to match the naming template to generate the name of the indicator under each tree node;

[0051] The generating unit is further configured to generate an indicator tree of the target business based on the name of the indicator under each tree node and the relationship table.

[0052] In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the enterprise indicator tree construction method described in the first aspect when executing the computer program.

[0053] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor executes the enterprise indicator tree construction method described in the first aspect above.

[0054] The embodiment of the present invention provides a method, device, equipment and medium for constructing an enterprise indicator tree, which can respond to an indicator tree construction instruction for a target business, obtain a metadata table of the target business from a configuration database as a relationship table, extract relationship words from the relationship table to construct a relationship word set, traverse the relationship table for each relationship word set to obtain a foreign key ID of each relationship word, and construct a subject word set and an object word set of each relationship word according to the foreign key ID of each relationship word, extract the subject words and object words in the relationship table to prepare for the association of subsequent data, associate the relationship table, the subject word set and each object in the object word set with the foreign key ID of each relationship word to obtain a basic fact wide table, merge the attribute data of each object into the relationship table, and form the basic fact wide table, so that the data in the table is more comprehensive, and thus the indicator tree generated subsequently is more accurate, obtain the non-foreign key ID of each relationship word and a pre-configured constraint word set, select a constraint word from the constraint word set to construct a modifier word set, and construct a modifier word set according to the modifier word set and the non-foreign key ID of each relationship word. D generates a filtering statement, wherein the owner label of each modifier in the modifier set is configured according to the corresponding relationship word, at least one object is arbitrarily selected from the basic fact wide table as the target dimension, and a grouping statement is generated based on the target dimension, each object in the basic fact wide table is measured based on the measurement statement, and at least one tree node is generated based on the measurement result of the measurement statement, and a tree node is generated based on a traceability method, the filtering statement, the grouping statement and the measurement statement are spliced ​​to obtain a target statement, and the target statement is used to traverse the data in the configuration database to obtain the indicator under each tree node, a pre-configured naming template is obtained, and the indicator under each tree node is matched in the naming template to generate the name of the indicator under each tree node, and the name of the indicator is automatically generated to reduce human participation, and the indicator tree of the target business is generated based on the name of the indicator under each tree node and the relationship table. The present invention automatically derives the owner label of the indicator according to the attribute field and the measurement logic, and realizes the automatic construction of the indicator tree without human participation, thereby improving the efficiency and accuracy of data processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.

[0056] Figure 1 A flowchart of a method for constructing an enterprise indicator tree provided by an embodiment of the present invention;

[0057] Figure 2 A schematic block diagram of a device for constructing an enterprise indicator tree provided by an embodiment of the present invention;

[0058] Figure 3 A schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0059] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0060] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0061] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0062] It should be further understood that the term "and / or" used in the present description and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0063] See also Figure 1 , which is a flow chart of the enterprise indicator tree construction method provided in an embodiment of the present invention.

[0064] S10, in response to an instruction to construct an indicator tree for a target business, obtaining a metadata table of the target business from a configuration database as a relationship table, and extracting relationship words from the relationship table to construct a relationship word set.

[0065] In at least one embodiment of the present invention, the target business may include any business process of an enterprise, such as a business process of an insurance agent visiting a customer online.

[0066] In at least one embodiment of the present invention, the indicator tree construction instruction may be triggered by a developer of related technologies, which is not limited by the present invention.

[0067] In at least one embodiment of the present invention, obtaining the metadata table of the target service from the configuration database as a relational table includes:

[0068] Obtaining the business name of the target business;

[0069] Searching the configuration database according to the service name;

[0070] The queried metadata table corresponding to the business name is used as the relationship table, and the table name of the metadata table is used as the table name of the relationship table.

[0071] The configuration database may include a database of an enterprise executing the target business.

[0072] For example, for an agent's online visit to a customer, the relationship table may be an online visit table.

[0073] In at least one embodiment of the present invention, extracting relation words from the relation table to construct a relation word set includes:

[0074] Obtain a relation field in the relation table, and use a value corresponding to the relation field as the relation word;

[0075] The relation words are combined to obtain the relation word set.

[0076] For example, for an agent's online visit to a customer's business process, the related words may include, but are not limited to: sharing, online visit.

[0077] S11, for each relation word in the relation word set, traverse the relation table to obtain the foreign key ID of each relation word, and construct the subject word set and object word set of each relation word according to the foreign key ID of each relation word.

[0078] In at least one embodiment of the present invention, constructing a subject word set and an object word set for each relation word according to the foreign key ID of each relation word includes:

[0079] Obtain the attribute field corresponding to the foreign key ID of each relational word from the relational table;

[0080] Extract the field name of the attribute field corresponding to the foreign key ID of each relational word;

[0081] When the field name corresponds to a user, the attribute field corresponding to the field name is added as a subject word to the subject word set, and the owner tag of each subject word in the subject word set is configured as the corresponding field name; or

[0082] When the field name corresponds to a non-user, the attribute field corresponding to the field name is added to the object word set as an object word, and the owner tag of each object word in the object word set is configured as the corresponding field name.

[0083] Continuing with the above example, for the relational word "online visit", the attribute fields agent, customer, and reception room are obtained through the foreign key ID in the relational table, among which agent and customer belong to the user type, therefore, agent and customer are added to the subject word set, and the corresponding owner tags are configured as "agent" and "customer"; reception room does not belong to the user type, therefore, reception room is added to the object word set, and the corresponding owner tag is configured as "reception room".

[0084] Through the above implementation, the subject words and object words in the relationship table can be extracted to prepare for the subsequent data association.

[0085] S12, through the foreign key ID of each relationship word, associate each object in the relationship table, the subject word set and the object word set to obtain a basic fact wide table.

[0086] In at least one embodiment of the present invention, associating the relationship table, the subject word set, and each object in the object word set through the foreign key ID of each relationship word to obtain the basic fact wide table includes:

[0087] Acquire a data table of each subject word in the subject word set and acquire a data table of each object word in the object word set from the configuration database;

[0088] Build a join statement based on the foreign key ID of each relational term;

[0089] The relation table is associated with the data table of each subject word and the data table of each object word by using the relational statement to obtain the basic fact wide table.

[0090] Continuing with the above example, the relationship table is an online visit table, and the subject word set and each object in the object word set corresponding to the foreign key ID are agent, customer, reception room, and solution material, respectively. The data tables corresponding to the agent, customer, reception room, and solution material are obtained from the configuration database (agent table, customer table, reception room table, and solution material table), and JOIN is used to construct association statements for association, and then the relationship table, agent table, customer table, reception room table, and solution material table are combined as sub-tables to obtain the basic fact wide table.

[0091] Specifically, the data table corresponding to each object is used to store the attribute data of each object. For example, the agent table can store data such as the agent's gender, age, working hours, etc.

[0092] Specifically, the constructed association statement may be a SQL (Structured Query Language) statement, and the association is performed using a JOIN statement in SQL. The obtained association statement may be expressed as follows:

[0093] Online Visit Form

[0094] JOIN agent table ON online visit table.agent = agent table.ID

[0095] JOIN customer table ON online visit table.customer = customer table.ID

[0096] JOIN reception room table ON online visit table. reception room = reception room table. ID

[0097] JOIN plan material table ON online visit table.plan material = plan material table.ID.

[0098] In the above implementation, by associating the relationship table with each object in the subject word set and the object word set, the attribute data of each object (i.e., each subject word and each object word) can be integrated into the relationship table to form the basic fact wide table, making the data in the table more comprehensive and thus making the subsequently generated indicator tree more accurate.

[0099] S13, obtaining the non-foreign key ID of each relational word and a pre-configured constraint word set, selecting constraint words from the constraint word set to construct a modifier word set, and generating a filter statement based on the modifier word set and the non-foreign key ID, wherein the owner label of each modifier word in the modifier word set is configured according to the corresponding relational word.

[0100] In this embodiment, the constraint word set is used to store words with a constraint effect. Specifically, the constraint word set may include words for constraining time, words for constraining location, and the like.

[0101] Continuing with the above example, the constraint word set may include visiting time and visiting location.

[0102] In this embodiment, the constraint word set may be obtained by analyzing historical business data, or may be formulated by relevant staff, which is not limited by the present invention.

[0103] Furthermore, constraint words may be selected from the constraint word set to construct a modifier word set according to received business requirements, or constraint words may be randomly selected from the constraint word set to construct a modifier word set, which is not limited in the present invention.

[0104] Continuing with the above example, we can select visit time as the constraint word from the constraint word set. The owner tag corresponding to the visit time can be configured as "online visit". The constraint word value is the past 30 days. We get the key-value pair date_key = online visit table.visit time, date_value = the past 30 days (30day), and generate the filtering statement:

[0105] WHERE DATE(online visit table.visit time)>=DATE_SUB(CURDATE(),INTERVAL 30day).

[0106] S14, arbitrarily select at least one object from the basic fact wide table as a target dimension, and generate a grouping statement based on the target dimension.

[0107] Following the above example, if "organization" is selected as the target dimension from the at least one object, the generated grouping statement can be expressed as:

[0108] GROUP BY agent_table.Agency.

[0109] Furthermore, the agents in the sub-table "agent table" of the basic fact wide table are grouped by the dimension "institution".

[0110] S15, measuring each object in the basic fact wide table based on the measurement statement, and generating at least one tree node based on the measurement result of the measurement statement.

[0111] Specifically, measuring each object in the basic fact wide table based on the measurement statement, and generating at least one tree node based on the measurement result of the measurement statement includes:

[0112] A COUNT statement is used to measure each object in the basic fact wide table to obtain the number of each object as a first basic indicator, and an owner label of each object is obtained as a tree node corresponding to the first basic indicator;

[0113] The SUM statement is used to measure the numerical objects corresponding to the non-foreign key IDs in the basic fact wide table, and the sum of each numerical object is obtained as the second basic indicator, and the owner label of each numerical object is obtained as the tree node corresponding to the second basic indicator;

[0114] The COUNT statement and the SUM statement are used to compound each object in the basic fact wide table to obtain a composite object, and the composite object is compared and measured to obtain the ratio of the composite object as a composite indicator, and the tree node corresponding to the numerator of the ratio of the composite object is obtained as the tree node of the composite indicator.

[0115] Continuing with the above example, the measurement statement can be:

[0116] COUNT (Online Visit Table.Agent), the measurement name is "Number of Agents". Since the "Online Visit Table.Agent" field is a foreign key ID, its owner label is "Agent", so the owner label of the indicator is derived as "Agent";

[0117] COUNT(Online Visit Table.Customer), the measurement name is "Number of Customers". Since the "Online Visit Table.Customer" field is a foreign key ID, its owner label is "Customer", so the indicator owner label is derived as "Customer"; SUM(Online Visit Table.Duration), the measurement name is "Total Duration". The indicator owner is "Online Visit". Since the "Online Visit Table.Duration" field is a non-foreign key, its owner label is "Online Visit", so the indicator owner label is derived as "Online Visit"; SUM(Online Visit Table.Duration) / COUNT(Online Visit Table.Agent), the measurement name is "Total Duration_Number of Agents_Ratio". The indicator owner is "Online Visit". Since the owner label of the main indicator (numerator) "SUM(Online Visit Table.Duration)" is "Online Visit", the indicator owner label is derived as "Online Visit".

[0118] Through the above implementation, tree nodes can be generated based on the tracing method.

[0119] S16, concatenating the filtering statement, the grouping statement and the measurement statement to obtain a target statement.

[0120] For example, the complete target sentence after concatenation can be:

[0121] SELECT COUNT(basic fact table.subject id)

[0122] FROM relation table JOIN subject table ON relation table.subject id = subject table.id

[0123] JOIN subject table ON relation table.object id = object table.id

[0124] JOIN…

[0125] WHERE TRUE AND key_1=value_1…AND key_n=value_n

[0126] GROUP BY dimention_1,dimention_2,…,dimention_n.

[0127] In this embodiment, the target statement is obtained by concatenating the filter statement, the grouping statement and the measurement statement, so as to query data in the configuration database.

[0128] In the above implementation, the generated target statement is close to being usable in production, thereby improving development efficiency.

[0129] S17, using the target statement to traverse the data in the configuration database to obtain the index under each tree node.

[0130] By traversing, the specific indicator value under each tree node can be obtained from the configuration database.

[0131] S18, obtaining a pre-configured naming template, and using the indicator under each tree node to match the naming template, to generate a name of the indicator under each tree node.

[0132] In this embodiment, the naming template can be configured according to actual needs. The naming template only plays a role of standardization and guidance. Therefore, the configuration method is not limited.

[0133] In at least one embodiment of the present invention, the using the indicator under each tree node to match the naming template to generate the name of the indicator under each tree node includes:

[0134] Obtain the target dimension, the constraint word, the table name of the relationship table, and the measurement name corresponding to the measurement result from the indicators under each tree node;

[0135] The target dimension, the constraint word, the table name of the relationship table, and the measurement name corresponding to the measurement result are sequentially concatenated to obtain the name of the indicator under each tree node.

[0136] Continuing with the above example, the constraint word is the past 30 days, the dimension word corresponding to the target dimension is organization, and the table name of the relationship table is single online visit. The indicator name generation rule is: dimension word_modifier value_business process name_measurement name, applied to the previously generated indicators, to get the name of each indicator:

[0137] I1: Institution_Recent 30 days_Single person online visit_Number of agents, the indicator main label is "agent"

[0138] I2: Organization_Number of customers visited by a single person online in the past 30 days, the indicator’s main label is “customer”

[0139] I3: Institution_last 30 days_single person online visit_total duration, the indicator main label is "online visit"

[0140] I4: Institution_Recent 30 days_Total duration of single-person online visits_Number of agents_Ratio, the main label of the indicator is "Online visits".

[0141] Through the above implementation, the name of the indicator can be automatically generated, reducing human participation.

[0142] S19, generating an indicator tree of the target business based on the name of the indicator under each tree node and the relationship table.

[0143] In at least one embodiment of the present invention, generating the indicator tree of the target business based on the name of the indicator under each tree node and the relationship table includes:

[0144] Obtaining the table name of the relationship table, and establishing a root node according to the table name of the relationship table;

[0145] Connect each tree node using the root node as a starting point to obtain a topic layer;

[0146] The subject layer is expanded according to the name of the indicator under each tree node to obtain the indicator tree of the target business.

[0147] Continuing with the above example, first, create a single online visit for the root node of the tree.

[0148] Then, three sub-nodes, namely, agent, customer, and online visit, are created as the subject layer.

[0149] Each data indicator is further mounted under the corresponding tree node in the subject layer. For example, for the indicator "Institution_Recent 30 Days_Single Person Online Visit_Number of Agents", the indicator owner label is "Agent", find the tree node corresponding to "Agent" from the subject layer, and create a leaf node named "Institution_Recent 30 Days_Single Person Online Visit_Number of Agents" under the tree node to complete the automatic classification of indicators, and so on, to form an indicator tree for the agent's online visit to the customer business process.

[0150] This embodiment can automatically derive the owner label of the indicator according to the attribute field and measurement logic, and realize the automatic construction of the indicator tree without human participation, thereby improving the efficiency and accuracy of data processing.

[0151] In at least one embodiment of the present invention, after generating the indicator tree of the target business based on the name of the indicator under each tree node and the relationship table, the method further includes:

[0152] Generate a query statement according to the indicators in the indicator tree;

[0153] Acquire data in the configuration database based on the query statement;

[0154] Send the acquired data to the specified terminal device.

[0155] In this embodiment, the designated terminal device may be a terminal device of a relevant staff member, such as a smart terminal of an insurance agent.

[0156] Through the above implementation, it is possible to further obtain data from the database in a targeted manner based on the constructed indicator tree, facilitate data analysis and modeling, realize data-based operations, and improve enterprise operating efficiency.

[0157] It should be noted that in order to further ensure the security of the data and prevent the data from being maliciously tampered with, the indicator tree can be stored on the blockchain node.

[0158] It can be seen from the above technical scheme that the present invention can respond to the indicator tree construction instruction for the target business, obtain the metadata table of the target business from the configuration database as a relationship table, and extract relationship words from the relationship table to construct a relationship word set. For each relationship word in the relationship word set, traverse the relationship table to obtain the foreign key ID of each relationship word, and construct the subject word set and object word set of each relationship word according to the foreign key ID of each relationship word, extract the subject word and object word in the relationship table to prepare for the subsequent data association, associate each object in the relationship table, the subject word set and the object word set through the foreign key ID of each relationship word, obtain the basic fact wide table, merge the attribute data of each object itself into the relationship table, and form the basic fact wide table, so that the data in the table is more comprehensive, and thus the subsequently generated indicator tree is more accurate, obtain the non-foreign key ID of each relationship word and the pre-configured constraint word set, select the constraint word from the constraint word set to construct the modifier word set, and generate a filter statement according to the modifier word set and the non-foreign key ID. Among them, the owner label of each modifier in the modifier set is configured according to the corresponding relationship word, at least one object is arbitrarily selected from the basic fact wide table as the target dimension, and a grouping statement is generated based on the target dimension, each object in the basic fact wide table is measured based on the measurement statement, and at least one tree node is generated based on the measurement result of the measurement statement, and the tree node is generated based on the traceability method, the filter statement, the grouping statement and the measurement statement are spliced ​​to obtain the target statement, and the data in the configuration database is traversed by using the target statement to obtain the indicator under each tree node, a pre-configured naming template is obtained, and the indicator under each tree node is matched in the naming template to generate the name of the indicator under each tree node, and the name of the indicator is automatically generated to reduce human participation, and the indicator tree of the target business is generated based on the name of the indicator under each tree node and the relationship table. The present invention automatically derives the owner label of the indicator according to the attribute field and the measurement logic, and realizes the automatic construction of the indicator tree without human participation, thereby improving the efficiency and accuracy of data processing.

[0159] The embodiment of the present invention also provides a device for constructing an enterprise index tree, which is used to execute any embodiment of the above-mentioned method for constructing an enterprise index tree. Figure 2 , Figure 2 It is a schematic block diagram of a device for constructing an enterprise indicator tree provided by an embodiment of the present invention.

[0160] like Figure 2 As shown, the enterprise indicator tree construction device 100 includes: a construction unit 101, an association unit 102, a generation unit 103, a splicing unit 104, and a traversal unit 105.

[0161] In response to the indicator tree construction instruction for the target business, the construction unit 101 obtains the metadata table of the target business from the configuration database as a relationship table, and extracts relationship words from the relationship table to construct a relationship word set.

[0162] In at least one embodiment of the present invention, the target business may include any business process of an enterprise, such as a business process of an insurance agent visiting a customer online.

[0163] In at least one embodiment of the present invention, the indicator tree construction instruction may be triggered by a developer of related technologies, which is not limited by the present invention.

[0164] In at least one embodiment of the present invention, obtaining the metadata table of the target service from the configuration database as a relational table includes:

[0165] Obtaining the business name of the target business;

[0166] Searching the configuration database according to the service name;

[0167] The queried metadata table corresponding to the business name is used as the relationship table, and the table name of the metadata table is used as the table name of the relationship table.

[0168] The configuration database may include a database of an enterprise executing the target business.

[0169] For example, for an agent's online visit to a customer, the relationship table may be an online visit table.

[0170] In at least one embodiment of the present invention, the constructing unit 101 extracts relation words from the relation table to construct a relation word set, including:

[0171] Obtain a relation field in the relation table, and use a value corresponding to the relation field as the relation word;

[0172] The relation words are combined to obtain the relation word set.

[0173] For example, for an agent's online visit to a customer's business process, the related words may include, but are not limited to: sharing, online visit.

[0174] For each relation word in the relation word set, the construction unit 101 traverses the relation table to obtain the foreign key ID of each relation word, and constructs the subject word set and the object word set of each relation word according to the foreign key ID of each relation word.

[0175] In at least one embodiment of the present invention, the constructing unit 101 constructs the subject word set and the object word set of each relation word according to the foreign key ID of each relation word, including:

[0176] Obtain the attribute field corresponding to the foreign key ID of each relational word from the relational table;

[0177] Extract the field name of the attribute field corresponding to the foreign key ID of each relational word;

[0178] When the field name corresponds to a user, the attribute field corresponding to the field name is added as a subject word to the subject word set, and the owner tag of each subject word in the subject word set is configured as the corresponding field name; or

[0179] When the field name corresponds to a non-user, the attribute field corresponding to the field name is added to the object word set as an object word, and the owner tag of each object word in the object word set is configured as the corresponding field name.

[0180] Continuing with the above example, for the relational word "online visit", the attribute fields agent, customer, and reception room are obtained through the foreign key ID in the relational table, among which agent and customer belong to the user type, therefore, agent and customer are added to the subject word set, and the corresponding owner tags are configured as "agent" and "customer"; reception room does not belong to the user type, therefore, reception room is added to the object word set, and the corresponding owner tag is configured as "reception room".

[0181] Through the above implementation, the subject words and object words in the relationship table can be extracted to prepare for the subsequent data association.

[0182] The associating unit 102 associates each object in the relationship table, the subject word set and the object word set through the foreign key ID of each relationship word to obtain a basic fact wide table.

[0183] In at least one embodiment of the present invention, the association unit 102 associates each object in the relationship table, the subject word set, and the object word set through the foreign key ID of each relationship word, and obtains a basic fact wide table including:

[0184] Acquire a data table of each subject word in the subject word set and acquire a data table of each object word in the object word set from the configuration database;

[0185] Build a join statement based on the foreign key ID of each relational term;

[0186] The relation table is associated with the data table of each subject word and the data table of each object word by using the relational statement to obtain the basic fact wide table.

[0187] Continuing with the above example, the relationship table is an online visit table, and the subject word set and each object in the object word set corresponding to the foreign key ID are agent, customer, reception room, and solution material, respectively. The data tables corresponding to the agent, customer, reception room, and solution material are obtained from the configuration database (agent table, customer table, reception room table, and solution material table), and JOIN is used to construct association statements for association, and then the relationship table, agent table, customer table, reception room table, and solution material table are combined as sub-tables to obtain the basic fact wide table.

[0188] Specifically, the data table corresponding to each object is used to store the attribute data of each object. For example, the agent table can store data such as the agent's gender, age, working hours, etc.

[0189] Specifically, the constructed association statement may be a SQL (Structured Query Language) statement, and the association is performed using a JOIN statement in SQL. The obtained association statement may be expressed as follows:

[0190] Online Visit Form

[0191] JOIN agent table ON online visit table.agent = agent table.ID

[0192] JOIN customer table ON online visit table.customer = customer table.ID

[0193] JOIN reception room table ON online visit table. reception room = reception room table. ID

[0194] JOIN plan material table ON online visit table.plan material = plan material table.ID.

[0195] In the above implementation, by associating the relationship table with each object in the subject word set and the object word set, the attribute data of each object (i.e., each subject word and each object word) can be integrated into the relationship table to form the basic fact wide table, making the data in the table more comprehensive and thus making the subsequently generated indicator tree more accurate.

[0196] The generation unit 103 obtains the non-foreign key ID of each relational word and a pre-configured constraint word set, selects constraint words from the constraint word set to construct a modifier word set, and generates a filtering statement based on the modifier word set and the non-foreign key ID, wherein the owner label of each modifier word in the modifier word set is configured according to the corresponding relational word.

[0197] In this embodiment, the constraint word set is used to store words with a constraint effect. Specifically, the constraint word set may include words for constraining time, words for constraining location, and the like.

[0198] Continuing with the above example, the constraint word set may include visiting time and visiting location.

[0199] In this embodiment, the constraint word set may be obtained by analyzing historical business data, or may be formulated by relevant staff, which is not limited by the present invention.

[0200] Furthermore, constraint words may be selected from the constraint word set to construct a modifier word set according to received business requirements, or constraint words may be randomly selected from the constraint word set to construct a modifier word set, which is not limited in the present invention.

[0201] Continuing with the above example, we can select visit time as the constraint word from the constraint word set. The owner tag corresponding to the visit time can be configured as "online visit". The constraint word value is the past 30 days. We get the key-value pair date_key = online visit table.visit time, date_value = the past 30 days (30day), and generate the filtering statement:

[0202] WHERE DATE(online visit table.visit time)>=DATE_SUB(CURDATE(),INTERVAL 30day).

[0203] The generating unit 103 arbitrarily selects at least one object from the basic fact wide table as a target dimension, and generates a grouping statement based on the target dimension.

[0204] Following the above example, if "organization" is selected as the target dimension from the at least one object, the generated grouping statement can be expressed as:

[0205] GROUP BY agent_table.Agency.

[0206] Furthermore, the agents in the sub-table "agent table" of the basic fact wide table are grouped by the dimension "institution".

[0207] The generating unit 103 measures each object in the basic fact wide table based on the measurement statement, and generates at least one tree node based on the measurement result of the measurement statement.

[0208] Specifically, the generating unit 103 measures each object in the basic fact wide table based on the measurement statement, and generates at least one tree node based on the measurement result of the measurement statement, including:

[0209] A COUNT statement is used to measure each object in the basic fact wide table to obtain the number of each object as a first basic indicator, and an owner label of each object is obtained as a tree node corresponding to the first basic indicator;

[0210] The SUM statement is used to measure the numerical objects corresponding to the non-foreign key IDs in the basic fact wide table, and the sum of each numerical object is obtained as the second basic indicator, and the owner label of each numerical object is obtained as the tree node corresponding to the second basic indicator;

[0211] The COUNT statement and the SUM statement are used to compound each object in the basic fact wide table to obtain a composite object, and the composite object is compared and measured to obtain the ratio of the composite object as a composite indicator, and the tree node corresponding to the numerator of the ratio of the composite object is obtained as the tree node of the composite indicator.

[0212] Continuing with the above example, the measurement statement can be:

[0213] COUNT (Online Visit Table.Agent), the measurement name is "Number of Agents". Since the "Online Visit Table.Agent" field is a foreign key ID, its owner label is "Agent", so the owner label of the indicator is derived as "Agent";

[0214] COUNT(Online Visit Table.Customer), the measurement name is "Number of Customers". Since the "Online Visit Table.Customer" field is a foreign key ID, its owner label is "Customer", so the indicator owner label is derived as "Customer"; SUM(Online Visit Table.Duration), the measurement name is "Total Duration". The indicator owner is "Online Visit". Since the "Online Visit Table.Duration" field is a non-foreign key, its owner label is "Online Visit", so the indicator owner label is derived as "Online Visit"; SUM(Online Visit Table.Duration) / COUNT(Online Visit Table.Agent), the measurement name is "Total Duration_Number of Agents_Ratio". The indicator owner is "Online Visit". Since the owner label of the main indicator (numerator) "SUM(Online Visit Table.Duration)" is "Online Visit", the indicator owner label is derived as "Online Visit".

[0215] Through the above implementation, tree nodes can be generated based on the tracing method.

[0216] The concatenation unit 104 concatenates the filtering statement, the grouping statement and the measurement statement to obtain a target statement.

[0217] For example, the complete target sentence after concatenation can be:

[0218] SELECT COUNT(basic fact table.subject id)

[0219] FROM relation table JOIN subject table ON relation table.subject id = subject table.id

[0220] JOIN subject table ON relation table.object id = object table.id

[0221] JOIN…

[0222] WHERE TRUE AND key_1=value_1…AND key_n=value_n

[0223] GROUP BY dimention_1,dimention_2,…,dimention_n.

[0224] In this embodiment, the target statement is obtained by concatenating the filter statement, the grouping statement and the measurement statement, so as to query data in the configuration database.

[0225] In the above implementation, the generated target statement is close to being usable in production, thereby improving development efficiency.

[0226] The traversal unit 105 traverses the data in the configuration database using the target statement to obtain an indicator under each tree node.

[0227] By traversing, the specific indicator value under each tree node can be obtained from the configuration database.

[0228] The generating unit 103 obtains a pre-configured naming template, and uses the indicator under each tree node to match the naming template to generate the name of the indicator under each tree node.

[0229] In this embodiment, the naming template can be configured according to actual needs. The naming template only plays a role of standardization and guidance. Therefore, the configuration method is not limited.

[0230] In at least one embodiment of the present invention, the generating unit 103 uses the indicator under each tree node to match the name template, and generates the name of the indicator under each tree node, including:

[0231] Obtain the target dimension, the constraint word, the table name of the relationship table, and the measurement name corresponding to the measurement result from the indicators under each tree node;

[0232] The target dimension, the constraint word, the table name of the relationship table, and the measurement name corresponding to the measurement result are sequentially concatenated to obtain the name of the indicator under each tree node.

[0233] Continuing with the above example, the constraint word is the past 30 days, the dimension word corresponding to the target dimension is organization, and the table name of the relationship table is single online visit. The indicator name generation rule is: dimension word_modifier value_business process name_measurement name, applied to the previously generated indicators, to get the name of each indicator:

[0234] I1: Institution_Recent 30 days_Single person online visit_Number of agents, the indicator main label is "agent"

[0235] I2: Organization_Number of customers visited by a single person online in the past 30 days, the indicator’s main label is “customer”

[0236] I3: Institution_last 30 days_single person online visit_total duration, the indicator main label is "online visit"

[0237] I4: Institution_Recent 30 days_Total duration of single-person online visits_Number of agents_Ratio, the main label of the indicator is "Online visits".

[0238] Through the above implementation, the name of the indicator can be automatically generated, reducing human participation.

[0239] The generating unit 103 generates the indicator tree of the target business based on the name of the indicator under each tree node and the relationship table.

[0240] In at least one embodiment of the present invention, the generating unit 103 generates the indicator tree of the target business based on the name of the indicator under each tree node and the relationship table, including:

[0241] Obtaining the table name of the relationship table, and establishing a root node according to the table name of the relationship table;

[0242] Connect each tree node using the root node as a starting point to obtain a topic layer;

[0243] The subject layer is expanded according to the name of the indicator under each tree node to obtain the indicator tree of the target business.

[0244] Continuing with the above example, first, create a single online visit for the root node of the tree.

[0245] Then, three sub-nodes, namely, agent, customer, and online visit, are created as the subject layer.

[0246] Each data indicator is further mounted under the corresponding tree node in the subject layer. For example, for the indicator "Institution_Recent 30 Days_Single Person Online Visit_Number of Agents", the indicator owner label is "Agent", find the tree node corresponding to "Agent" from the subject layer, and create a leaf node named "Institution_Recent 30 Days_Single Person Online Visit_Number of Agents" under the tree node to complete the automatic classification of indicators, and so on, to form an indicator tree for the agent's online visit to the customer business process.

[0247] This embodiment can automatically derive the owner label of the indicator according to the attribute field and measurement logic, and realize the automatic construction of the indicator tree without human participation, thereby improving the efficiency and accuracy of data processing.

[0248] In at least one embodiment of the present invention, after generating the indicator tree of the target business based on the name of the indicator under each tree node and the relationship table, generating a query statement according to the indicator in the indicator tree;

[0249] Acquire data in the configuration database based on the query statement;

[0250] Send the acquired data to the specified terminal device.

[0251] In this embodiment, the designated terminal device may be a terminal device of a relevant staff member, such as a smart terminal of an insurance agent.

[0252] Through the above implementation, it is possible to further obtain data from the database in a targeted manner based on the constructed indicator tree, facilitate data analysis and modeling, realize data-based operations, and improve enterprise operating efficiency.

[0253] It should be noted that in order to further ensure the security of the data and prevent the data from being maliciously tampered with, the indicator tree can be stored on the blockchain node.

[0254] It can be seen from the above technical scheme that the present invention can respond to the indicator tree construction instruction for the target business, obtain the metadata table of the target business from the configuration database as a relationship table, and extract relationship words from the relationship table to construct a relationship word set. For each relationship word in the relationship word set, traverse the relationship table to obtain the foreign key ID of each relationship word, and construct the subject word set and object word set of each relationship word according to the foreign key ID of each relationship word, extract the subject word and object word in the relationship table to prepare for the subsequent data association, associate each object in the relationship table, the subject word set and the object word set through the foreign key ID of each relationship word, obtain the basic fact wide table, merge the attribute data of each object itself into the relationship table, and form the basic fact wide table, so that the data in the table is more comprehensive, and thus the subsequently generated indicator tree is more accurate, obtain the non-foreign key ID of each relationship word and the pre-configured constraint word set, select the constraint word from the constraint word set to construct the modifier word set, and generate a filter statement according to the modifier word set and the non-foreign key ID. Among them, the owner label of each modifier in the modifier set is configured according to the corresponding relationship word, at least one object is arbitrarily selected from the basic fact wide table as the target dimension, and a grouping statement is generated based on the target dimension, each object in the basic fact wide table is measured based on the measurement statement, and at least one tree node is generated based on the measurement result of the measurement statement, and the tree node is generated based on the traceability method, the filter statement, the grouping statement and the measurement statement are spliced ​​to obtain the target statement, and the data in the configuration database is traversed by using the target statement to obtain the indicator under each tree node, a pre-configured naming template is obtained, and the indicator under each tree node is matched in the naming template to generate the name of the indicator under each tree node, and the name of the indicator is automatically generated to reduce human participation, and the indicator tree of the target business is generated based on the name of the indicator under each tree node and the relationship table. The present invention automatically derives the owner label of the indicator according to the attribute field and the measurement logic, and realizes the automatic construction of the indicator tree without human participation, thereby improving the efficiency and accuracy of data processing.

[0255] The enterprise index tree construction device can be implemented in the form of a computer program. The computer program can be used in Figure 3 Runs on the computer device shown.

[0256] See also Figure 3 , Figure 35 is a schematic block diagram of a computer device provided in an embodiment of the present invention. The computer device 500 is a server, which can be an independent server or a server cluster composed of multiple servers. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0257] Among them, Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0258] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0259] See also Figure 3 The computer device 500 includes a processor 502 , a memory and a network interface 505 connected via a system bus 501 , wherein the memory may include a storage medium 503 and an internal memory 504 .

[0260] The storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, the processor 502 may execute a method for constructing an enterprise indicator tree.

[0261] The processor 502 is used to provide computing and control capabilities to support the operation of the entire computer device 500 .

[0262] The internal memory 504 provides an environment for the operation of the computer program 5032 in the storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute the enterprise indicator tree construction method.

[0263] The network interface 505 is used for network communication, such as providing data information transmission, etc. Those skilled in the art will understand that Figure 3The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device 500 to which the solution of the present invention is applied. The specific computer device 500 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0264] The processor 502 is used to run the computer program 5032 stored in the memory to implement the enterprise indicator tree construction method disclosed in the embodiment of the present invention.

[0265] Those skilled in the art will understand that Figure 3 The embodiments of the computer device shown in the figure do not constitute a limitation on the specific composition of the computer device. In other embodiments, the computer device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, in some embodiments, the computer device may only include a memory and a processor. In such embodiments, the structure and function of the memory and the processor are the same as those of the embodiment of the present invention. Figure 3 The embodiments shown are consistent and will not be described again here.

[0266] It should be understood that in the embodiment of the present invention, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0267] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. The computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the enterprise indicator tree construction method disclosed in the embodiment of the present invention is implemented.

[0268] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0269] It should be noted that the data involved in this case were all obtained legally.

[0270] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, the specific working process of the above-described equipment, devices and units can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here. Those of ordinary skill in the art can appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to the function. Whether these functions are executed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present invention.

[0271] In the several embodiments provided by the present invention, it should be understood that the disclosed equipment, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. Units with the same function may also be combined into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, or may be an electrical, mechanical or other form of connection.

[0272] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.

[0273] The present invention can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronic devices, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present invention can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present invention can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.

[0274] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0275] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), disk or optical disk and other media that can store program codes.

[0276] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for constructing an enterprise indicator tree, characterized in that: include: In response to an instruction to construct an indicator tree for a target business, a metadata table of the target business is obtained from a configuration database as a relationship table, and relationship words are extracted from the relationship table to construct a relationship word set; For each relation word in the relation word set, traverse the relation table to obtain the foreign key ID of each relation word, and construct the subject word set and the object word set of each relation word according to the foreign key ID of each relation word; By using the foreign key ID of each relation word, the relation table, the subject word set and each object in the object word set are associated to obtain a basic fact wide table; Obtaining a non-foreign key ID of each relational word and a pre-configured constraint word set, selecting constraint words from the constraint word set to construct a modifier word set, and generating a filter statement according to the modifier word set and the non-foreign key ID, wherein the owner label of each modifier word in the modifier word set is configured according to the corresponding relational word; arbitrarily selecting at least one object from the basic fact wide table as a target dimension, and generating a grouping statement based on the target dimension; Measuring each object in the basic fact wide table based on the measurement statement, and generating at least one tree node based on the measurement result of the measurement statement; Concatenate the filtering statement, the grouping statement, and the measurement statement to obtain a target statement; Using the target statement to traverse the data in the configuration database, obtaining the index under each tree node; Obtain a pre-configured naming template, and use the indicator under each tree node to match the naming template to generate the name of the indicator under each tree node; Generate an indicator tree for the target business based on the name of the indicator under each tree node and the relationship table; The process of constructing a subject word set and an object word set for each relation word according to the foreign key ID of each relation word includes: Obtain the attribute field corresponding to the foreign key ID of each relational word from the relational table; Extract the field name of the attribute field corresponding to the foreign key ID of each relational word; When the field name corresponds to a user, the attribute field corresponding to the field name is added as a subject word to the subject word set, and the owner tag of each subject word in the subject word set is configured as the corresponding field name; or When the field name corresponds to a non-user, adding the attribute field corresponding to the field name as an object word to the object word set, and configuring the owner tag of each object word in the object word set to the corresponding field name; The basic fact wide table is obtained by associating the relationship table, the subject word set and each object in the object word set through the foreign key ID of each relationship word, including: Acquire a data table of each subject word in the subject word set and acquire a data table of each object word in the object word set from the configuration database; Build a join statement based on the foreign key ID of each relational term; Using the association sentence to associate the relationship table with the data table of each subject word, and to associate the relationship table with the data table of each object word, to obtain the basic fact wide table; The step of measuring each object in the basic fact wide table based on the measurement statement and generating at least one tree node based on the measurement result of the measurement statement includes: A COUNT statement is used to measure each object in the basic fact wide table to obtain the number of each object as a first basic indicator, and an owner label of each object is obtained as a tree node corresponding to the first basic indicator; The SUM statement is used to measure the numerical objects corresponding to the non-foreign key IDs in the basic fact wide table, and the sum of each numerical object is obtained as the second basic indicator, and the owner label of each numerical object is obtained as the tree node corresponding to the second basic indicator; The COUNT statement and the SUM statement are used to compound each object in the basic fact wide table to obtain a composite object, and the composite object is compared and measured to obtain the ratio of the composite object as a composite indicator, and the tree node corresponding to the numerator of the ratio of the composite object is obtained as the tree node of the composite indicator.

2. The method for constructing an enterprise indicator tree according to claim 1, characterized in that: The use of the indicator under each tree node to match the naming template to generate the name of the indicator under each tree node includes: Obtain the target dimension, the constraint word, the table name of the relationship table, and the measurement name corresponding to the measurement result from the indicators under each tree node; The target dimension, the constraint word, the table name of the relationship table, and the measurement name corresponding to the measurement result are sequentially concatenated to obtain the name of the indicator under each tree node.

3. The method for constructing an enterprise indicator tree according to claim 1, characterized in that: The generating the indicator tree of the target business based on the name of the indicator under each tree node and the relationship table includes: Obtaining the table name of the relationship table, and establishing a root node according to the table name of the relationship table; Connect each tree node using the root node as a starting point to obtain a topic layer; The subject layer is expanded according to the name of the indicator under each tree node to obtain the indicator tree of the target business.

4. The method for constructing an enterprise indicator tree according to claim 1, characterized in that: After generating the indicator tree of the target business based on the name of the indicator under each tree node and the relationship table, the method further includes: Generate a query statement according to the indicators in the indicator tree; Acquire data in the configuration database based on the query statement; Send the acquired data to the specified terminal device.

5. A device for constructing an enterprise indicator tree, characterized in that: include: A construction unit, configured to, in response to an indicator tree construction instruction for a target business, obtain a metadata table of the target business from a configuration database as a relationship table, and extract relationship words from the relationship table to construct a relationship word set; The construction unit is further used to traverse the relationship table for each relationship word in the relationship word set, obtain the foreign key ID of each relationship word, and construct the subject word set and the object word set of each relationship word according to the foreign key ID of each relationship word; an associating unit, configured to associate each object in the relationship table, the subject word set and the object word set through a foreign key ID of each relationship word, to obtain a basic fact wide table; a generating unit, configured to obtain a non-foreign key ID of each relational word and a pre-configured constraint word set, select constraint words from the constraint word set to construct a modifier word set, and generate a filtering statement according to the modifier word set and the non-foreign key ID, wherein the owner label of each modifier word in the modifier word set is configured according to the corresponding relational word; The generating unit is further configured to arbitrarily select at least one object from the basic fact wide table as a target dimension, and generate a grouping statement based on the target dimension; The generating unit is further configured to measure each object in the basic fact wide table based on the measurement statement, and generate at least one tree node based on the measurement result of the measurement statement; A concatenation unit, used for concatenating the filtering statement, the grouping statement and the measurement statement to obtain a target statement; A traversal unit, used to traverse the data in the configuration database using the target statement to obtain an indicator under each tree node; The generating unit is further used to obtain a pre-configured naming template, and use the indicator under each tree node to match the naming template to generate the name of the indicator under each tree node; The generating unit is further configured to generate an indicator tree of the target business based on the name of the indicator under each tree node and the relationship table; The construction unit constructs a subject word set and an object word set of each relation word according to the foreign key ID of each relation word, including: Obtain the attribute field corresponding to the foreign key ID of each relational word from the relational table; Extract the field name of the attribute field corresponding to the foreign key ID of each relational word; When the field name corresponds to a user, the attribute field corresponding to the field name is added as a subject word to the subject word set, and the owner tag of each subject word in the subject word set is configured as the corresponding field name; or When the field name corresponds to a non-user, adding the attribute field corresponding to the field name as an object word to the object word set, and configuring the owner tag of each object word in the object word set to the corresponding field name; The association unit associates the relationship table, the subject word set and each object in the object word set through the foreign key ID of each relationship word, and obtains a basic fact wide table including: Acquire a data table of each subject word in the subject word set and acquire a data table of each object word in the object word set from the configuration database; Build a join statement based on the foreign key ID of each relational term; Using the association sentence to associate the relationship table with the data table of each subject word, and to associate the relationship table with the data table of each object word, to obtain the basic fact wide table; The generating unit measures each object in the basic fact wide table based on the measurement statement, and generates at least one tree node based on the measurement result of the measurement statement, including: A COUNT statement is used to measure each object in the basic fact wide table to obtain the number of each object as a first basic indicator, and an owner label of each object is obtained as a tree node corresponding to the first basic indicator; The SUM statement is used to measure the numerical objects corresponding to the non-foreign key IDs in the basic fact wide table, and the sum of each numerical object is obtained as the second basic indicator, and the owner label of each numerical object is obtained as the tree node corresponding to the second basic indicator; The COUNT statement and the SUM statement are used to compound each object in the basic fact wide table to obtain a composite object, and the composite object is compared and measured to obtain the ratio of the composite object as a composite indicator, and the tree node corresponding to the numerator of the ratio of the composite object is obtained as the tree node of the composite indicator.

6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for constructing an enterprise indicator tree according to any one of claims 1 to 4 is implemented.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, enables the processor to execute the enterprise indicator tree construction method according to any one of claims 1 to 4.