A resource data statistics method, device, meta-platform equipment and storage medium

Through major category modeling and metadata models, the problems of complexity and high development costs of traditional resource data models are solved, and the rapid and flexible data statistics and reporting functions are realized, which improves the reusability and operational efficiency of the application.

CN114090653BActive Publication Date: 2024-12-17CHINA COMM SERVICE APPL & SOLUTION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111364567.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-17
Publication Date
2024-12-17
Estimated Expiration
2041-11-17

AI Technical Summary

Technical Problem

The traditional resource data model is based on one-to-one 'hard modeling' method, resulting in the dispersion of relationships between concepts, and new or changes affecting data tables. It is impossible to support applications through metadata drivers. Modifying the metadata structure requires shutdown and restart, and it is impossible to directly perform entity operations. Requirements statistics, development is complex and costly.

Method used

Using the principle of major category modeling to establish a metadata model, the metadata model instance business language is used to implement intensive management and metadata-driven interface, and the page configuration is used to generate structured query language SQL statements, which supports Multi-dimensional reports and data extraction block complex development details and reduce costs.

Benefits of technology

It realizes the functions of quickly supporting data extraction and multi-dimensional reporting, improves the reusability of statistical applications, reduces development costs and operational efficiency, supports flexible expansion, avoids application codes to directly access the database, and realizes metadata-driven hot deployment and online updates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114090653B_ABST
    Figure CN114090653B_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data application, and discloses a resource data statistics method, device, meta-platform equipment and storage medium, that is, after a metadata model of a resource database that can cover all entity information and database storage methods is established according to the principle of large-category modeling, a pre-designed template that makes metadata configurable is used to perform page configuration, and metadata and corresponding conditions that need to be counted are extracted by configuring entity specifications, statistical conditions and statistical attributes, and then SQL statements for database statistics are spliced ​​according to statistical rules, and finally the statistical requirements of configurable application pages are realized by executing SQL statements in the database, so that the purpose of intensive application management, model configurability and metadata-driven interface can be achieved by using the metadata model instance business language, thereby maximizing the reusability of statistical applications, shielding complex development details, and finally reducing development costs and improving operational efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of data application technology, and specifically relates to entity digitization and application and implementation of data update algorithms, and provides in detail a resource data statistics method, device, meta-platform equipment and storage medium. Background Art

[0002] Simply put, the meta-platform describes the business model through metadata and implements the mapping from entities, relationships, components to relational models, so that upper-level applications can be implemented directly through metadata, shielding the complex details of the database, reducing the burden of application development, and displaying statistical reports on the corresponding data.

[0003] In the process of enterprise development, various enterprise data statistical applications have diversified and complex business characteristics. The statistical tools that need to provide support must be quick to use, flexible and configurable, and support diverse business characteristics. However, the traditional resource data model is based on a one-to-one "hard modeling" method, and the relationship construction is very complex, which makes the traditional statistical application method have the following shortcomings: (1) Because it is a "hard modeling" that builds tables for real concepts one-to-one, the relationships between concepts are scattered in various storage tables of real concepts; (2) The addition and change of concepts will affect the data table; (3) The addition and change of relationships will affect the outline schema of the data table; (4) It is impossible to drive the support application through metadata, and there are problems such as modifying the meta table structure and requiring shutdown and restart; (5) It is impossible to directly perform statistics on entity needs, and it is necessary to develop functions separately. Summary of the invention

[0004] In order to solve the above-mentioned shortcomings of traditional statistical application methods, the purpose of the present invention is to provide a new type of resource data statistics method, device, meta-platform equipment and computer-readable storage medium, which can use metadata model instance business language to achieve the purpose of intensive application management, model configurability and metadata-driven interface, and then quickly support statistical functions such as data extraction and multi-dimensional reporting, maximize the reusability of statistical applications, shield complex development details, and ultimately reduce development costs and improve operational efficiency.

[0005] In a first aspect, the present invention provides a resource data statistics method, comprising:

[0006] A metadata model of a resource database is established according to the principle of large-category modeling, wherein the resource database is used to store data information of all product entities, and the metadata model includes library table metadata, field metadata, entity specification metadata, relationship specification metadata and relationship metadata. The library tables in the library table metadata include all tables in the resource database, the fields in the field metadata include all fields in the resource database, the entity specifications in the entity specification metadata include large-category entities, detailed category entities and specification entities, the large-category entities refer to entity categories distinguished according to product functions, product attributes and / or product characteristics, the detailed category entities refer to entity categories distinguished according to product uses for large-category entities, the specification entities refer to entity categories distinguished according to specific business objects and relationships for detailed category entities, the relationship specifications in the relationship specification metadata include large-category relationships, detailed category relationships and specification relationships, the large-category relationships refer to the relationships between a large-category entity and another large-category entity, the detailed category entities refer to the relationships between a detailed category entity and another detailed category entity, the specification relationships refer to the relationships between a specification entity and another specification entity, and the relationships in the relationship metadata include the relationships between library tables and entity specifications and the relationships between library tables and relationship specifications;

[0007] In response to user operations, a template to be configured that meets the user's statistical report requirements is obtained from a template model, wherein the template model includes a plurality of pre-designed templates used to convey required metadata to the metadata model after parameter configuration;

[0008] Displaying the template to be configured on the human-computer interaction page;

[0009] Obtaining a configured template according to configuration parameters input on the template to be configured, wherein the configuration parameters include selection results for entity specifications, selection results for statistical conditions, and selection results for statistical attributes;

[0010] According to the configured template, the required metadata is communicated to the metadata model to obtain the metadata to be counted, wherein the metadata to be counted includes the library table metadata and field metadata found according to the configuration parameters;

[0011] According to the statistical rules and the metadata to be counted, a structured query language SQL statement for database statistics is assembled;

[0012] The structured query language SQL statement is executed on the resource database to obtain statistical results.

[0013] Based on the above invention, a meta-platform service solution for resource data statistics based on metadata and templates is provided, that is, after a metadata model of a resource database is established according to the principle of large-category modeling and capable of covering all entity information and database storage methods, a pre-designed template that makes metadata configurable is used to configure the page, and the metadata and corresponding conditions that need to be counted are extracted by configuring entity specifications, statistical conditions and statistical attributes, and then SQL statements for database statistics are spliced ​​according to statistical rules, and finally the statistical requirements of configurable application pages are realized by executing SQL statements in the database, so that the purpose of intensive application management, model configurability and metadata-driven interface can be achieved by using the metadata model instance business language, and then statistical functions such as data extraction and multi-dimensional reports can be quickly supported, the reusability of statistical applications can be maximized, complex development details can be shielded, and development costs can be reduced and operational efficiency can be improved. In addition, the direct access of application code to the database can be shielded, and metadata can be used for translation, without downtime, and the model can be hot-deployed to ensure flexible and rapid expansion of the model. In addition, compared with the traditional statistical application method, the resource data statistical method provided in this embodiment has the following advantages: (1) Through the modeling of major categories + metadata, the relationship between concepts is concentrated on the main table of the major categories, and the metadata is used for dynamic expansion; (2) The convergence dimension and convergence granularity of the major category modeling are clarified, and the rationality of the major category modeling is theoretically ensured; (3) Triggered from the perspective of resource application, the management granularity of resource business objects is clarified, and a resource specification catalog is constructed; (4) The results of the major category modeling can be demonstrated and verified to ensure that the IT language can be effectively translated into the business language; (5) The cloud platform can basically maintain the stability of the core major categories and relationship entities, and only needs to inherit and expand the relationship and attributes of the major category entities, update the metadata online, and add the extension table (optional) to support it, basically without downtime! (6) Based on the support of the two sets of models on the cloud platform, all business entities and database attributes are summarized, and the correct SQL statements can be directly driven according to the necessary information provided in the metadata to access the database to achieve statistics.

[0014] In a possible design, the metadata model also includes specification attribute metadata, wherein the specification attributes in the specification attribute metadata are used to record whether the attribute component is displayed, whether it is required, whether it is readable, whether it is updateable, whether it supports multiple selections and / or default values, and the attribute component refers to a component formed by grouping the attributes of the entity specification / relationship specification.

[0015] In a possible design, the metadata model further includes dictionary value metadata and dictionary type metadata, wherein the dictionary value in the dictionary value metadata includes a storage data keyword and an entry pair, and the dictionary type in the dictionary type metadata includes all grouping and classification of the dictionary values ​​required for the attribute;

[0016] The relationship in the relationship metadata further includes the relationship between specification attributes and dictionary values ​​and the relationship between dictionary types and dictionary values.

[0017] In a possible design, the metadata model further includes domain metadata, wherein the domain in the domain metadata includes different locations of all product entities;

[0018] The relationships in the relationship metadata also include relationships between domains and entity specifications.

[0019] In a possible design, the template model also includes a menu and a menu application template, wherein the menu is used to record the required menu directory name and display tree hierarchy, and the menu application template is used to record the relationship between the menu and the template to be configured.

[0020] In a possible design, the template to be configured includes template subject information, template relationship information, template attribute information, attribute verification information, template form information, form grouping information, grouping element information, template table information, table element information and query condition information, wherein the template subject information is used to record the template name and the associated entity specifications in the metadata model, the template relationship information is used to record the relationship specifications used by the template, the template attribute information is used to record the specification attributes used by the template, the attribute verification information is used to record the attribute verification conditions, the template form information is used to record the length, width and height of the template display form, the form grouping information is used to record the page form group display name, the grouping element information is used to record the attributes and control length, width and height in the grouped form, the template table information is used to record the row number of the template table, the table element is used to record the attributes displayed in the table, and the query condition information is used to record the query conditions and sorting of the template.

[0021] In a possible design, after executing the structured query language SQL statement on the resource database to obtain statistical results, the method further includes:

[0022] The statistical results are displayed on the human-computer interaction page, wherein the statistical results include report-style statistical results and / or graphical statistical results, and the graphical statistical results include pie chart statistical results and / or bar chart statistical results.

[0023] In a second aspect, the present invention provides a resource data statistics device, comprising a model building unit and an operation response unit, a template display unit, a parameter configuration unit, a data transmission unit, a statement splicing unit and a statistics execution unit which are sequentially connected in communication;

[0024] The model building unit is used to build a metadata model of a resource database according to the principle of large-category modeling, wherein the resource database is used to store data information of all product entities, and the metadata model includes library table metadata, field metadata, entity specification metadata, relationship specification metadata and relationship metadata. The library tables in the library table metadata include all tables in the resource database, the fields in the field metadata include all fields in the resource database, and the entity specifications in the entity specification metadata include large-category entities, detailed-category entities and specification entities. The large-category entities refer to entities that are differentiated according to product functions, product attributes and / or product characteristics. The sub-category entity refers to the entity category distinguished from the major category entity according to the different product uses, the specification entity refers to the entity category distinguished from the sub-category entity according to the different specific business objects and relationships, the relationship specifications in the relationship specification metadata include major category relationships, sub-category relationships and specification relationships, the major category relationship refers to the relationship between a major category entity and another major category entity, the sub-category entity refers to the relationship between a sub-category entity and another sub-category entity, the specification relationship refers to the relationship between a specification entity and another specification entity, and the relationship in the relationship metadata includes the relationship between the library table and the entity specification and the relationship between the library table and the relationship specification;

[0025] The operation response unit is used to respond to user operations and obtain a template to be configured that meets the user's statistical report requirements from the template model, wherein the template model includes a number of pre-designed templates used to convey required metadata to the metadata model after parameter configuration;

[0026] The template display unit is used to display the template to be configured on the human-computer interaction page;

[0027] The parameter configuration unit is used to obtain a configured template according to the configuration parameters input on the template to be configured, wherein the configuration parameters include the selection results for entity specifications, the selection results for statistical conditions and the selection results for statistical attributes;

[0028] The data transmission unit is used to transmit the required metadata to the metadata model according to the configured template to obtain the metadata to be counted, wherein the metadata to be counted includes the library table metadata and field metadata found according to the configuration parameters;

[0029] The statement concatenation unit is used to concatenate structured query language SQL statements for database statistics according to statistical rules and the metadata to be counted;

[0030] The statistical execution unit is used to execute the structured query language SQL statement on the resource database to obtain statistical results.

[0031] In a third aspect, the present invention provides a meta-platform device, comprising a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store computer programs, the transceiver is used to send and receive data, and the processor is used to read the computer program and execute the resource data statistics method as described in the first aspect or any possible design of the first aspect.

[0032] In a fourth aspect, the present invention provides a computer-readable storage medium having instructions stored thereon. When the instructions are executed on a computer, the resource data statistics method as described in the first aspect or any possible design of the first aspect is executed.

[0033] In a fifth aspect, the present invention provides a computer program product comprising instructions, which, when executed on a computer, causes the computer to execute the resource data statistics method as described in the first aspect or any possible design of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0035] Figure 1 It is a flow chart of the resource data statistics method provided by the present invention.

[0036] Figure 2 It is a schematic diagram of the design pattern and access method of the general category modeling principle provided by the present invention.

[0037] Figure 3 It is a schematic diagram of the application of the general modeling principle provided by the present invention.

[0038] Figure 4 It is a structural schematic diagram of the metadata model provided by the present invention.

[0039] Figure 5 It is an example diagram of the metadata model provided by the present invention.

[0040] Figure 6 This is the first example diagram of the template management page provided by the present invention.

[0041] Figure 7 This is a second example diagram of the template management page provided by the present invention.

[0042] Figure 8This is the third example diagram of the template management page provided by the present invention.

[0043] Fig. 9 It is a structural schematic diagram of the template model provided by the present invention.

[0044] Fig.10 It is a functional point schematic diagram of the template provided by the present invention.

[0045] Fig.11 It is a schematic diagram of the functions implemented based on metadata provided by the present invention.

[0046] Fig.12 It is an example diagram of the design state and operation state of the template provided by the present invention.

[0047] Fig.13 This is an example diagram of the table page display provided by the present invention.

[0048] Fig.14 This is an example diagram of the form page display provided by the present invention.

[0049] Fig.15 This is an example diagram of the statistics page display provided by the present invention.

[0050] Fig.16 It is an example diagram for displaying the pie chart statistical results and the bar chart statistical results provided by the present invention.

[0051] Fig.17 It is a structural schematic diagram of the resource data statistics device provided by the present invention.

[0052] Fig.18 It is a structural schematic diagram of the meta-platform device provided by the present invention. DETAILED DESCRIPTION

[0053] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments. It should be noted that although the description of these embodiments is used to help understand the present invention, it does not constitute a limitation of the present invention. The specific structures and functional details disclosed herein are only used to describe the embodiments of the present invention. However, the present invention can be embodied in many alternative forms, and it should not be understood that the present invention is limited to the embodiments set forth herein.

[0054] It should be understood that although the terms first and second, etc. may be used herein to describe various objects, these objects should not be limited by these terms. These terms are only used to distinguish one object from another object. For example, a first object can be referred to as a second object, and similarly, a second object can be referred to as a first object without departing from the scope of the exemplary embodiments of the present invention.

[0055] It should be understood that the term "and / or" that may appear in this article is merely a description of the association relationship between associated objects, indicating that there may be three relationships. For example, A and / or B can represent three situations: A exists alone, B exists alone, or A and B exist at the same time; the term " / and" that may appear in this article describes another type of association object relationship, indicating that there may be two relationships. For example, A / and B can represent two situations: A exists alone or A and B exist at the same time; in addition, the character " / " that may appear in this article generally indicates that the previous and next associated objects are in an "or" relationship.

[0056] like Figures 1 to 16 As shown, the resource data statistics method provided in the first aspect of this embodiment can be executed by, but is not limited to, a computer device with certain computing resources, such as a personal computer (PC, referring to a multi-purpose computer with a size, price and performance suitable for personal use; desktops, laptops, small laptops, tablets and ultrabooks are all personal computers), smart phones, personal digital assistants (PAD) or wearable devices and other electronic devices, so that after establishing a metadata model of a resource database that can cover all entity information and database storage methods according to the principle of large-category modeling, a pre-designed template that makes metadata configurable is used to configure the page, and the metadata and corresponding conditions that need to be counted are extracted by configuring entity specifications, statistical conditions and statistical attributes, and then SQL statements for database statistics are spliced ​​according to statistical rules, and finally the statistical requirements of configurable application pages are realized by executing SQL statements in the database, so that the purpose of intensive application management, model configurability and metadata-driven interface can be achieved by using the metadata model instance business language, and then statistical functions such as data extraction and multi-dimensional reports can be quickly supported, the reusability of statistical applications can be maximized, complex development details can be shielded, and finally development costs can be reduced and operational efficiency can be improved. like Figure 1 As shown, the resource data statistics method may include but is not limited to the following steps S1 to S7.

[0057] S1. Establish a metadata model of a resource database based on the principle of macro-category modeling, wherein the resource database is used to store data information of all product entities, and the metadata model includes but is not limited to library table metadata, field metadata, entity specification metadata, relationship specification metadata, and relationship metadata, etc. The library tables in the library table metadata include all tables in the resource database, the fields in the field metadata include all fields in the resource database, and the entity specifications in the entity specification metadata include macro-category entities, sub-category entities, and specification entities. The macro-category entities refer to entities distinguished according to different product functions, product attributes, and / or product characteristics. Entity category, the subcategory entity refers to the entity category distinguished from the major category entity according to the different product uses, the specification entity refers to the entity category distinguished from the subcategory entity according to the different specific business objects and relationships, the relationship specifications in the relationship specification metadata include major category relationships, subcategory relationships and specification relationships, the major category relationship refers to the relationship between a major category entity and another major category entity, the subcategory entity refers to the relationship between a subcategory entity and another subcategory entity, the specification relationship refers to the relationship between a specification entity and another specification entity, the relationships in the relationship metadata include but are not limited to the relationship between library tables and entity specifications and the relationship between library tables and relationship specifications, etc.

[0058] In step S1, the major category modeling principle refers to dividing the major categories by metadata technology and then combining them to form a data model of the management object. The major category modeling principle provided in this embodiment, its design mode and access method can be as follows: Figure 2 As shown, its structural relationship and application method can be as follows Figure 3 As shown, the goal is to stabilize the major categories of objects and relationships, and thus stabilize the physical storage (i.e., master tables and relationship tables), as well as to expand business objects and business relationships. There is no need to adjust the physical master tables and relationship master tables, but only to configure metadata, add business objects and usage relationships of master table attributes, and, when necessary, add or use existing physical extension tables to manage attributes.

[0059] In step S1, each metadata in the metadata model is used to describe the attribute information of the corresponding object (i.e., library table, field, entity specification, relationship specification or relationship, etc.). In detail, the metadata model also includes but is not limited to specification attribute metadata, dictionary value metadata, dictionary type metadata and / or domain metadata, wherein the specification attribute in the specification attribute metadata is used to record whether the attribute component is displayed, required, readable, updateable, supports multiple selections and / or default values, etc. The attribute component refers to a component formed by grouping the attributes of the entity specification / relationship specification, the dictionary value in the dictionary value metadata contains storage data keywords and entry pairs, the dictionary type in the dictionary type metadata contains all grouping classifications of the dictionary values ​​required for the attribute, the domain in the domain metadata contains different locations of all product entities, and the relationship in the relationship metadata also contains the relationship between the specification attribute and the dictionary value, the relationship between the dictionary type and the dictionary value, and / or the relationship between the domain and the entity specification. The metadata model structural relationship based on the aforementioned multiple objects is as follows: Figure 4 and 5 As shown, the metadata rules of each object under the general modeling principle are described one by one below.

[0060] (1) Library table (mm_table): In order to more specifically manage the purpose and function of the database table, a table model is formed: confirm the table name, primary key and table type. Among them, the table type can be classified into four categories: main horizontal table, extended horizontal table, extended vertical table and multi-select relationship table. The upper-level application can read the primary key and the purpose of the corresponding table type according to the confirmed table name to determine the applicability. In addition, the main horizontal table and the extended vertical table can be managed by the major entity. The specification entity can only inherit and redefine, and it is not allowed to exceed the scope of the major entity to which it belongs.

[0061] (2) Field (mm_fleld): In a database, most of the time, the "columns" of a table are called "fields". Each field contains information about a certain topic. Therefore, the corresponding field metadata records the database field properties, such as the table to which it belongs, field size, format, default value, whether the field is required, validity rules, validity text and / or index, etc.

[0062] (3) Entity Specification (mm_entity_spec): An entity is an abstraction of the physical, logical, and things in the real world. An entity can be defined as an abstract entity or a concrete entity. There is an inheritance relationship between entities. Therefore, this embodiment divides entities into three categories: major entity, minor entity, and specification entity. The major entity is the top-level abstraction of the resource model and can be used to manage the main table and vertical table. The minor entity is used to manage business objects and relationships, constrain extension tables, improve management efficiency, and reduce management difficulty. The specification entity is the content used and understood by business personnel and is used to manage relationships, attributes, and extension tables.

[0063] (4) Relationship specification (mm_relation_spec): A relationship is used to describe the connection between two entity instances. A variety of relationships can be applied to relationships, such as container / particle relationships, connection relationships, and hierarchical relationships. For some application scenarios, it is necessary to record related attributes on the relationship instances of two entities. For entities A and B, if their relationship is a one-to-many relationship or a many-to-one relationship, then you can consider defining the relationship table on a certain attribute of entity A. If entities A and B are in a many-to-many relationship, use an independent relationship table.

[0064] (5) The relationship between the library table and entity / relationship specifications (mr_table_spec): It is used to record the relationship between the entity specifications and the relationship specifications, and the table in which they are stored. Specifically, the relationship rules between the library table and the entity specifications are as follows: (a) The general category entity can be associated with the main table and the vertical table, but cannot be associated with two tables of the same type at the same time; (b) The subcategory entity is not allowed to be unassociated with any table; (c) The specification entity is only allowed to be associated with the extension table, and can be associated with a maximum of 2 extension tables. The relationship rules between the library table and the relationship specifications are as follows: (a) The general category relationship is only allowed to be associated with one main table or relationship table, and currently the relationship is not allowed to be stored as an extension table; (b) The subcategory relationship and the specification relationship are not associated with any table.

[0065] (6) Specification attribute (mm_Spec_Attribute): For the convenience of management and reusability, the attributes of entity specifications and relationship specifications are grouped to form components. A component contains one or more specific attributes and methods. Components can be reused between different entity specifications (relationship specifications), or they can only belong to a certain entity specification (relationship specification). Such as identification group, basic component, life cycle group, etc. It is composed of attributes and is used to describe the characteristics of the entity specification (relationship specification). Components support inheritance, that is, the child entity specification (relationship specification) automatically inherits all the attributes of the large category specification. Specifically, the attribute rules of entity specifications are as follows: (a) Large category entities can only configure the main table attributes and vertical table attributes, and the attributes must be configured on the premise that the table is configured; (b) Sub-category entities are not associated with any attributes; (c) Specification entities are associated with extended table attributes, and the attributes of large category entities can also be configured separately. At this time, the large category attributes defined on the specification entity override the attributes defined on the large category entity to which it belongs. The attribute rules for relationship specifications are as follows: (a) Attributes are configured for large-category relationships only when they are stored as relationship tables; (b) Attributes are not configured for detailed-category relationships and specification relationships, and they directly inherit large-category relationships.

[0066] (7) Dictionary value (mm_dictvalue): Dictionary value objects are used to store data keyword and entry pairs (i.e., in a format similar to "key=value"). They can access entries of any form of data. Each entry is associated with a unique keyword. The keyword is used to retrieve a single entry, usually an integer or a string, and can be of any type except an array.

[0067] (8) Dictionary type (mm_dicttype): Group and classify the dictionary values ​​required by the attributes, and use the dictionary type to manage the dictionary values ​​to facilitate attribute confirmation. High-dimensional data consists of data of corresponding types of key values ​​and is organized in an object manner.

[0068] (9) Relationship between dictionary type and dictionary value (mr_dicttype_dictvalue): It is used to record the relationship between dictionary type and dictionary value, so that different dictionary types can reuse the same dictionary value and avoid redundancy of dictionary values.

[0069] (10) Relationship between specification attributes and dictionary values ​​(mr_dictvalue_attr): used to record specific dictionary values ​​under specification attributes.

[0070] (11) Domain (mm_domain): Multiple enterprises and multiple regions can be divided into domains. Metadata management can be performed according to different domains. They can also be managed mutually as needed, so that data resources can be shared and managed between different domains.

[0071] (12) Relationship between domain and entity specifications (mr_domain_object): records the relationship between the domain and the metamodel. The metamodel can be confirmed according to the needs of the domain to build applications, and the different needs of multiple domains can be diversified.

[0072] Based on the above metadata rule description, it can be seen that since the management of entities, components, attributes and entity relationship models is based on metadata, the calls of various methods in the table refresh algorithm are also based on it.

[0073] S2. In response to user operations, a template to be configured that meets the user's statistical report requirements is obtained from the template model, wherein the template model includes a number of pre-designed templates used to convey required metadata to the metadata model after parameter configuration.

[0074] In step S2, the user operation refers to Figures 6 to 8The human-computer interaction operation is performed on the template management page shown in the figure (the main menu is displayed on the left and the configuration page is displayed on the right). The template management page includes but is not limited to the following contents: the main menu on the left (the main menu directory tree is taken by default), menu item information (after clicking the left menu, the menu item information on the right displays the menu configuration information by default), query conditions (used to query unassociated entity management templates), unassociated entity management templates (used to display query results, moved into the "associated entity management template" list on the right by moving in to associate templates) and associated entity management templates (used to display associated entity management template information, resource strings must be entered here), etc. Parameter configuration is added to the template application, and corresponding parameters can be passed in during page loading to control the display of different templates under the same page and the same specifications through different parameter controls. At present, the module control parameters are in text mode, and whether to add parameters can be selected in the template application. Display template control, if the passed parameter is not empty, search for the corresponding template according to the parameter. If there is no corresponding template for the parameter, it is displayed by default without the parameter. If multiple templates are found, the first template data found is displayed by default. The corresponding template control parameters are passed into the parameter in the page data dataset to distinguish and display different templates. The key of the parameter added to the parameter of the page dataset is param_value. When the page is displayed, the data and the template application table field param_value are obtained from it to make judgments and distinguish different templates.

[0075] In step S2, in order to realize the configurability of the interface, this embodiment has developed a set of Fig. 9The template model shown is used to configure the template for the entity specification. Specifically, the template model also includes a menu and a menu application template, wherein the menu is used to record the required menu directory name and display tree level, and the menu application template is used to record the relationship between the menu and the template to be configured. The template to be configured includes template subject information, template relationship information, template attribute information, attribute verification information, template form information, form grouping information, grouping element information, template table information, table element information and query condition information, wherein the template subject information is used to record the template name and the associated entity specifications in the metadata model, the template relationship information is used to record the relationship specifications used by the template, the template attribute information is used to record the specification attributes used by the template, the attribute verification information is used to record the attribute verification conditions (i.e. the attribute cannot be empty or the relationship is required, etc.), the template form information is used to record the length, width and height of the template display form, the form grouping information is used to record the page form grouping display name, the grouping element information is used to record the attributes and control length, width and height in the grouped form, the template table information is used to record the row number of the template table, the table element is used to record the attributes displayed in the table, and the query condition information is used to record the query conditions and sorting of the template.

[0076] In step S2, the template is a general interface configuration function provided by elements and frameworks, so as to control the display of the interface through template description attributes for entity objects. The content controlled by the template mainly includes the query conditions, form display and table display of the object, such as Fig.10As shown in the figure, the template attribute function points include: field check (used to check the field in the entity entry function, including field length, non-empty and regular expression check, etc.), whether the field is a query condition (used to control whether the field is a query condition, if so, the query condition of the field will be added in the management interface), whether it is read-only (used to control whether the field in the form is read-only) and / or display name (used to control the overall display name of a field in the interface), etc.; the template relationship function points include: whether the relationship is a query condition (that is, the relationship of the current entity is used as a query condition), query pre-parameters (that is, the pre-parameters can be configured when querying through the relationship to reduce the condition selection operation), relationship display name (that is, the relationship of the current entity The entity is used as a query condition to define the query condition name) and / or custom general query interface (that is, when the general relationship is used as a query condition, the general query interface is opened, but the query interface can be written separately to replace the general query interface), etc.; the template form function points include: form grouping (used to display entity object attributes in groups and put related attributes in a group for easy search and maintenance), form element management (used to add, delete and modify attributes in the form) The functions of template table are: display name (used to control the display name of a field in the form), table attribute maintenance (used to add, delete and sort attributes in the table), combined column configuration (that is, a large table header for related attribute collections), read-only (used to control whether the table attributes are allowed to be changed), multiple attribute display of relationship objects (that is, multiple attribute display of the relationship counterpart entity) and / or custom attribute hiding (used to hide the development of custom fields); the functions of template copy, delete and template application are template copy (used to copy all template attributes such as template attributes, attribute verification, relationship, query conditions, form and table), template deletion (used to delete templates and corresponding cached data), template application (used to control the effectiveness of templates on a certain page) and template application control parameters (that is, different display methods for the same specification data on certain pages, and different templates are displayed according to different parameters through control parameters).

[0077] In step S2, according to Fig.11 The functions based on metadata shown in the figure can record all business layers in the form of forms, and then render the presentation layer through the meta-platform established by metadata and templates, so as to realize the configurability of the interface, drive the meta-platform and the forms, tables and statistical reports that can meet the configuration requirements. Fig.12The template design and running examples shown in the figure are read in sequence according to the metadata and template configuration to realize the display of forms, tables and query conditions. Only configuration is required to complete the display and presentation of the entire interface. That is, the page rendering process is as follows: render in sequence according to the mode of attribute type -> query conditions and form-related controls -> table-related controls, and then read the rendering of menus and buttons according to the user's permissions to complete the loading of the entire interface. For example, the table page display can be as follows Fig.13 As shown in the figure, the upper side shows the template configuration query conditions; the middle is the button; the lower side shows the template configuration table display. The form page display can be as follows Fig.14 As shown, the upper left corner shows the name of the form group configured according to the template, which can be clicked to expand and clicked to block; the middle shows the elements of the form group configured according to the template. The statistics page can be displayed as follows Fig.15 As shown, the upper side displays the template configuration query conditions; the lower side displays the statistical report display.

[0078] S3. Display the template to be configured on the human-computer interaction page.

[0079] S4. Obtain a configured template according to the configuration parameters input on the template to be configured, wherein the configuration parameters include selection results for entity specifications, selection results for statistical conditions, and selection results for statistical attributes.

[0080] In step S4, the statistical condition refers to the judgment condition for screening the objects required for statistics. For example, a statistical condition requires that the product entity has a launch period of less than one year, that is, the relevant metadata of all entities with a launch period of less than one year can be screened based on the statistical condition. The statistical attribute refers to the first row in the form. In addition, during the parameter configuration process, all metadata in the metadata model can be conveyed through a template to provide accurate optional ranges for the entity specifications, the statistical conditions, and the statistical attributes.

[0081] S5. According to the configured template, the required metadata is communicated to the metadata model to obtain the metadata that needs to be counted, wherein the metadata that needs to be counted includes but is not limited to the library table metadata and field metadata found according to the configuration parameters.

[0082] In step S5, the library table metadata and field metadata found according to the configuration parameters include but are not limited to: confirming which library table metadata and field metadata meet the selection results for entity specifications, the selection results for statistical conditions, and the selection results for statistical attributes.

[0083] S6. According to the statistical rules and the metadata to be counted, a structured query language SQL statement for database statistics is assembled.

[0084] In step S6, the statistical rules are predefined rules used for database statistics, which can be specifically predefined in the template, and then the structured query language SQL (Structured Query Language, a special-purpose programming language, a database query and programming language used to access data and query, update and manage relational database systems) statements can be spliced ​​out in a conventional manner.

[0085] S7. Execute the structured query language SQL statement on the resource database to obtain statistical results.

[0086] In step S7, the process of executing the structured query language SQL statement is a conventional process. After step S7, the method further includes but is not limited to: displaying the statistical results on the human-computer interaction page, wherein the statistical results include but are not limited to report-style statistical results and / or graphical statistical results, and the graphical statistical results include but are not limited to pie chart statistical results and / or bar chart statistical results. Fig.16 As shown, the pie chart statistical results and the bar chart statistical results can be displayed at the same time.

[0087] Based on the resource data statistics method described in the above steps S1 to S7, a meta-platform service solution for resource data statistics based on metadata and templates is provided, that is, after establishing a metadata model of a resource database that can cover all entity information and database storage methods according to the principle of large-category modeling, a pre-designed template that makes metadata configurable is used to configure the page, and the metadata and corresponding conditions that need to be counted are extracted by configuring entity specifications, statistical conditions and statistical attributes, and then SQL statements for database statistics are spliced ​​according to statistical rules, and finally the configurable statistical requirements of the application page are realized by executing SQL statements in the database, so that the purpose of intensive application management, model configurability and metadata-driven interface can be achieved by using the metadata model instance business language, and then statistical functions such as data extraction and multi-dimensional reports can be quickly supported, the reusability of statistical applications can be maximized, complex development details can be shielded, and development costs can be reduced and operational efficiency can be improved. In addition, the direct access of application code to the database can be shielded, and metadata can be used for translation, without downtime, and the model can be hot-deployed to ensure flexible and rapid expansion of the model. In addition, compared with the traditional statistical application method, the resource data statistical method provided in this embodiment has the following advantages: (1) Through the modeling of major categories + metadata, the relationship between concepts is concentrated on the main table of the major categories, and the metadata is used for dynamic expansion; (2) The convergence dimension and convergence granularity of the major category modeling are clarified, and the rationality of the major category modeling is theoretically ensured; (3) Triggered from the perspective of resource application, the management granularity of resource business objects is clarified, and a resource specification catalog is constructed; (4) The results of the major category modeling can be demonstrated and verified to ensure that the IT language can be effectively translated into the business language; (5) The cloud platform can basically maintain the stability of the core major categories and relationship entities, and only needs to inherit and expand the relationship and attributes of the major category entities, update the metadata online, and add the extension table (optional) to support it, basically without downtime! (6) Based on the support of the two sets of models on the cloud platform, all business entities and database attributes are summarized, and the correct SQL statements can be directly driven according to the necessary information provided in the metadata to access the database to achieve statistics.

[0088] like Fig.17 As shown, the second aspect of this embodiment provides a virtual device for implementing the resource data statistics method described in the first aspect, including a model building unit and an operation response unit, a template display unit, a parameter configuration unit, a data communication unit, a statement splicing unit and a statistics execution unit that are sequentially connected in communication;

[0089] The model building unit is used to build a metadata model of a resource database according to the principle of large-category modeling, wherein the resource database is used to store data information of all product entities, and the metadata model includes library table metadata, field metadata, entity specification metadata, relationship specification metadata and relationship metadata. The library tables in the library table metadata include all tables in the resource database, the fields in the field metadata include all fields in the resource database, and the entity specifications in the entity specification metadata include large-category entities, detailed-category entities and specification entities. The large-category entities refer to entities that are differentiated according to product functions, product attributes and / or product characteristics. The sub-category entity refers to the entity category distinguished from the major category entity according to the different product uses, the specification entity refers to the entity category distinguished from the sub-category entity according to the different specific business objects and relationships, the relationship specifications in the relationship specification metadata include major category relationships, sub-category relationships and specification relationships, the major category relationship refers to the relationship between a major category entity and another major category entity, the sub-category entity refers to the relationship between a sub-category entity and another sub-category entity, the specification relationship refers to the relationship between a specification entity and another specification entity, and the relationship in the relationship metadata includes the relationship between the library table and the entity specification and the relationship between the library table and the relationship specification;

[0090] The operation response unit is used to respond to user operations and obtain a template to be configured that meets the user's statistical report requirements from the template model, wherein the template model includes a number of pre-designed templates used to convey required metadata to the metadata model after parameter configuration;

[0091] The template display unit is used to display the template to be configured on the human-computer interaction page;

[0092] The parameter configuration unit is used to obtain a configured template according to the configuration parameters input on the template to be configured, wherein the configuration parameters include the selection results for entity specifications, the selection results for statistical conditions and the selection results for statistical attributes;

[0093] The data transmission unit is used to transmit the required metadata to the metadata model according to the configured template to obtain the metadata to be counted, wherein the metadata to be counted includes the library table metadata and field metadata found according to the configuration parameters;

[0094] The statement concatenation unit is used to concatenate structured query language SQL statements for database statistics according to statistical rules and the metadata to be counted;

[0095] The statistical execution unit is used to execute the structured query language SQL statement on the resource database to obtain statistical results.

[0096] The working process, working details and technical effects of the aforementioned device provided in the second aspect of this embodiment can be found in the resource data statistics method described in the first aspect, and will not be described in detail here.

[0097] like Fig.18 As shown, the third aspect of this embodiment provides a meta-platform device for executing the resource data statistics method described in the first aspect, including a memory, a processor and a transceiver connected in sequence, wherein the memory is used to store a computer program, the transceiver is used to send and receive data, and the processor is used to read the computer program and execute the resource data statistics method described in the first aspect. Specifically, the memory may include, but is not limited to, a random access memory (Random-Access Memory, RAM), a read-only memory (Read-Only Memory, ROM), a flash memory (FlashMemory), a first-in-first-out memory (First Input First Output, FIFO) and / or a first-in-last-out memory (First Input Last Output, FILO), etc.; the processor may include, but is not limited to, a microprocessor of the STM32F105 series. In addition, the meta-platform device may also include, but is not limited to, a power module, a display screen and other necessary components.

[0098] The working process, working details and technical effects of the aforementioned meta-platform device provided in the third aspect of this embodiment can be referred to the resource data statistics method described in the first aspect, and will not be repeated here.

[0099] In a fourth aspect of this embodiment, there is provided a computer-readable storage medium storing instructions including the resource data statistics method described in the first aspect, that is, the computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the resource data statistics method described in the first aspect is executed. The computer-readable storage medium refers to a carrier for storing data, which may include but is not limited to computer-readable storage media such as floppy disks, optical disks, hard disks, flash memory, USB flash drives, and / or memory sticks, and the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.

[0100] The working process, working details and technical effects of the aforementioned computer-readable storage medium provided in the fourth aspect of this embodiment can be found in the resource data statistics method described in the first aspect, and will not be repeated here.

[0101] The fifth aspect of this embodiment provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the resource data statistics method as described in the first aspect. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.

[0102] Finally, it should be noted that the present invention is not limited to the above optional implementations, and anyone can derive other various forms of products under the enlightenment of the present invention. The above specific implementations should not be understood as limiting the scope of protection of the present invention. The scope of protection of the present invention should be based on the definition in the claims, and the description can be used to interpret the claims.

Claims

1. A resource data statistics method, characterized in that: include: A metadata model of a resource database is established according to the principle of macro-category modeling, wherein the resource database is used to store data information of all product entities, and the metadata model includes library table metadata, field metadata, entity specification metadata, relationship specification metadata, specification attribute metadata, dictionary value metadata, dictionary type metadata, domain metadata and relationship metadata. The library tables in the library table metadata include all tables in the resource database, the fields in the field metadata include all fields in the resource database, the entity specifications in the entity specification metadata include macro-category entities, sub-category entities and specification entities, the macro-category entities refer to entity categories distinguished according to differences in product functions, product attributes and / or product characteristics, the sub-category entities refer to entity categories distinguished according to differences in product uses for macro-category entities, the specification entities refer to entity categories distinguished according to differences in specific business objects and relationships for sub-category entities, and the relationship specifications in the relationship specification metadata include There are major category relationships, minor category relationships and specification relationships. The major category relationship refers to the relationship between a major category entity and another major category entity, the minor category entity refers to the relationship between a minor category entity and another minor category entity, the specification relationship refers to the relationship between a specification entity and another specification entity, the specification attribute in the specification attribute metadata is used to record whether the attribute component is displayed, required, readable, updateable, supports multiple selections and / or default values, the attribute component refers to a component formed by grouping the attributes of entity specifications / relationship specifications, the dictionary value in the dictionary value metadata contains storage data keywords and entry pairs, the dictionary type in the dictionary type metadata contains all grouping classifications of the dictionary values ​​required for the attributes, the domain in the domain metadata contains the different locations of all product entities, and the relationship in the relationship metadata contains the relationship between the library table and the entity specification, the relationship between the library table and the relationship specification, the relationship between the specification attribute and the dictionary value, the relationship between the dictionary type and the dictionary value, and the relationship between the domain and the entity specification; In response to user operations, a template to be configured that meets the user's statistical report requirements is obtained from a template model, wherein the template model includes a number of pre-designed templates used to convey required metadata to the metadata model after parameter configuration, and the template model also includes a menu and a menu application template, wherein the menu is used to record the required menu directory name and display tree level, and the menu application template is used to record the relationship between the menu and the template to be configured; The template to be configured is displayed on a human-computer interaction page, wherein the template to be configured includes template subject information, template relationship information, template attribute information, attribute verification information, template form information, form grouping information, grouping element information, template table information, table element information and query condition information, wherein the template subject information is used to record the template name and the associated entity specifications in the metadata model, the template relationship information is used to record the relationship specifications used by the template, the template attribute information is used to record the specification attributes used by the template, the attribute verification information is used to record the attribute verification conditions, the template form information is used to record the length, width and height of the template display form, the form grouping information is used to record the page form grouping display name, the grouping element information is used to record the attributes in the grouped form and the length, width and height of the controls, the template table information is used to record the row number of the template table, the table element is used to record the attributes displayed by the table, and the query condition information is used to record the query conditions and sorting of the template; Obtaining a configured template according to configuration parameters input on the template to be configured, wherein the configuration parameters include selection results for entity specifications, selection results for statistical conditions, and selection results for statistical attributes; According to the configured template, the required metadata is communicated to the metadata model to obtain the metadata to be counted, wherein the metadata to be counted includes the library table metadata and field metadata found according to the configuration parameters; According to the statistical rules and the metadata to be counted, a structured query language SQL statement for database statistics is assembled; The structured query language SQL statement is executed on the resource database to obtain statistical results.

2. The resource data statistics method according to claim 1, characterized in that: After executing the structured query language SQL statement on the resource database to obtain statistical results, the method further includes: The statistical results are displayed on the human-computer interaction page, wherein the statistical results include report-style statistical results and / or graphical statistical results, and the graphical statistical results include pie chart statistical results and / or bar chart statistical results.

3. A resource data statistics device, characterized in that: It includes a model building unit and an operation response unit, a template display unit, a parameter configuration unit, a data transmission unit, a statement splicing unit and a statistical execution unit which are sequentially connected in communication; The model building unit is used to build a metadata model of a resource database according to the principle of large-category modeling, wherein the resource database is used to store data information of all product entities, and the metadata model includes library table metadata, field metadata, entity specification metadata, relationship specification metadata, specification attribute metadata, dictionary value metadata, dictionary type metadata, domain metadata and relationship metadata. The library tables in the library table metadata include all tables in the resource database, the fields in the field metadata include all fields in the resource database, and the entity specifications in the entity specification metadata include large-category entities, detailed category entities and specification entities. The large-category entities refer to entity categories distinguished according to differences in product functions, product attributes and / or product characteristics, and the detailed category entities refer to entity categories distinguished according to differences in product uses for large-category entities. The specification entities refer to entity categories distinguished according to differences in specific business objects and relationships for detailed category entities, and the relationship specification metadata The relationship specification includes a major category relationship, a minor category relationship and a specification relationship. The major category relationship refers to the relationship between a major category entity and another major category entity. The minor category entity refers to the relationship between a minor category entity and another minor category entity. The specification relationship refers to the relationship between a specification entity and another specification entity. The specification attribute in the specification attribute metadata is used to record whether the attribute component is displayed, required, readable, updateable, supports multiple selections and / or default values. The attribute component refers to a component formed by grouping the attributes of the entity specification / relationship specification. The dictionary value in the dictionary value metadata includes a pair of storage data keywords and entries. The dictionary type in the dictionary type metadata includes all grouping classifications of the dictionary values ​​required for the attribute. The domain in the domain metadata includes different regions where all product entities are located. The relationship in the relationship metadata includes the relationship between the library table and the entity specification, the relationship between the library table and the relationship specification, the relationship between the specification attribute and the dictionary value, the relationship between the dictionary type and the dictionary value, and the relationship between the domain and the entity specification. The operation response unit is used to respond to user operations and obtain a template to be configured that meets the user's statistical report requirements from a template model, wherein the template model includes a number of pre-designed templates used to convey required metadata to the metadata model after parameter configuration, and the template model also includes a menu and a menu application template, wherein the menu is used to record the required menu directory name and display tree hierarchy, and the menu application template is used to record the relationship between the menu and the template to be configured; The template display unit is used to display the template to be configured on the human-computer interaction page, wherein the template to be configured includes template subject information, template relationship information, template attribute information, attribute verification information, template form information, form grouping information, grouping element information, template table information, table element information and query condition information, the template subject information is used to record the template name and the associated entity specifications in the metadata model, the template relationship information is used to record the relationship specifications used by the template, the template attribute information is used to record the specification attributes used by the template, the attribute verification information is used to record the attribute verification conditions, the template form information is used to record the length, width and height of the template display form, the form grouping information is used to record the page form grouping display name, the grouping element information is used to record the attributes in the grouped form and the length, width and height of the controls, the template table information is used to record the row number of the template table, the table element is used to record the attributes displayed by the table, and the query condition information is used to record the query conditions and sorting of the template; The parameter configuration unit is used to obtain a configured template according to the configuration parameters input on the template to be configured, wherein the configuration parameters include the selection results for entity specifications, the selection results for statistical conditions and the selection results for statistical attributes; The data transmission unit is used to transmit the required metadata to the metadata model according to the configured template to obtain the metadata to be counted, wherein the metadata to be counted includes the library table metadata and field metadata found according to the configuration parameters; The statement concatenation unit is used to concatenate structured query language SQL statements for database statistics according to statistical rules and the metadata to be counted; The statistical execution unit is used to execute the structured query language SQL statement on the resource database to obtain statistical results.

4. A meta-platform device, characterized in that: It includes a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store computer programs, the transceiver is used to send and receive data, and the processor is used to read the computer program to execute the resource data statistics method as described in any one of claims 1 to 2.

5. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed on the computer, the resource data statistics method as described in any one of claims 1 to 2 is executed.

Citation Information

Patent Citations

  • Metadata based rapid statistic form generation method and system

    CN105320690A

  • Data management method and device for big data

    CN107256247A